You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To what extent is the Cthulhu.jl interface built around having direct access to stdout for display and stdin for user input? Looking at the code it seems this is somewhat assumed.
Seems there's two ways forward:
Generalize Cthulhu to allow stdout and stdin to be swapped in some way. Eg, make sure a REPL.Terminals.TTYTerminal is consistently passed around in a way we can override it (or should that be Base.TTY?). Perhaps make the TTY overridable with a task local variable. Cthulhu implicitly uses REPL.TerminalMenus.readkey to read keys from the user; eventually that needs to end up as a read to the client-side TTY.
Alternatively, invent a way for RemoteREPL to redirect and steal the global stdout and stdin of the server process. Certainly this is possible for stdout; for stdin I'm not sure how this could work. Presumably it'd need to involve a TTY.
The tricky part seems to be finding a way to detect that the server code is waiting on a read of the serverside TTY so that we can forward this read to the client. But without blocking the client TTY by trying to read from it when the server isn't waiting for input.
😅
The text was updated successfully, but these errors were encountered: