Run chat shell commands in a pseudo-terminal with typed input and resize
Commands start in a PTY (creack/pty; macOS and Linux) of the client's size with TERM=xterm-256color in their own session. chat_shell_input writes typed UTF-8 text in order through a bounded queue; chat_shell_resize sets the size. Output stays the raw terminal stream with byte offsets as sequence numbers, chat_shell_run_output resumes from an offset, and a plain-text rendering is persisted for Copy output and Send to agent. Input is never stored or logged.
This commit is contained in:
@@ -255,7 +255,8 @@ func handleChat(ctx context.Context, request protocol.Message, broker chatBroker
|
||||
case protocol.ChatShellOutput:
|
||||
handleChatShellOutput(ctx, request, broker, registry, write)
|
||||
return true
|
||||
case protocol.ChatShellRun, protocol.ChatShellStop, protocol.ChatShellRuns, protocol.ChatShellRunOutput, protocol.ChatShellShare:
|
||||
case protocol.ChatShellRun, protocol.ChatShellStop, protocol.ChatShellRuns, protocol.ChatShellRunOutput, protocol.ChatShellShare,
|
||||
protocol.ChatShellInput, protocol.ChatShellResize:
|
||||
handleChatShellRunRequest(ctx, request, broker, hub, registry, clientID, write)
|
||||
return true
|
||||
case protocol.ChatAttachmentImage:
|
||||
|
||||
Reference in New Issue
Block a user