Files
pipelines/internal/server/chat_shell_terminal_other.go
alan 355b722a1d 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.
2026-11-09 19:57:46 +00:00

24 lines
576 B
Go

//go:build !(darwin || linux)
package server
import (
"errors"
"os"
"os/exec"
"git.a-wan.net/alan/pipelines/internal/protocol"
)
// chatShellTerminals is false here: operator commands keep plain pipes, and
// input and resize are refused with protocol.ChatShellTerminalUnsupported.
const chatShellTerminals = false
func startChatShellTerminal(*exec.Cmd, int, int) (*os.File, error) {
return nil, errors.New(protocol.ChatShellTerminalUnsupported)
}
func resizeChatShellTerminal(*os.File, int, int) error {
return errors.New(protocol.ChatShellTerminalUnsupported)
}