mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 08:03:37 +00:00
* fix(terminal): send CSI-u Shift+Enter to kitty TUIs (droid) on Windows (#7620) On Windows, Shift+Enter was always sent as the Alt+Enter byte ESC+CR (added in #2418 for Codex, which reads win32-input-mode and ignores CSI-u). droid speaks the kitty keyboard protocol, parses CSI-u directly, and treats ESC+CR as a plain Enter — so Shift+Enter SUBMITTED the message instead of inserting a newline. droid works in other terminals (Windows Terminal, Warp) because those honor win32-input-mode / kitty; Orca (xterm.js) withholds kitty from local Windows ConPTY panes and emits neither. Make the Windows Shift+Enter byte pane-aware: latch whether a pane's program advertised the kitty keyboard protocol (query CSI ? u, push CSI > .. u, or set CSI = .. u) and send CSI-u (\x1b[13;2u) to those panes, keeping the Codex-compatible ESC+CR for win32-input-mode-only TUIs. Non-Windows is unchanged (always CSI-u). Verified end-to-end against the real droid and Codex CLIs through the actual production functions: droid now newlines, Codex still newlines. * fix(terminal): route Windows Shift+Enter safely for Droid --------- Co-authored-by: Neil <neil@stably.ai> Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
23 lines
673 B
TypeScript
23 lines
673 B
TypeScript
// Error classes shared across the daemon protocol boundary (client, server,
|
|
// host). Split from types.ts, which is capped for wire-shape declarations.
|
|
export class TerminalAttachCanceledError extends Error {
|
|
constructor(sessionId: string) {
|
|
super(`Attach canceled for session ${sessionId}`)
|
|
this.name = 'TerminalAttachCanceledError'
|
|
}
|
|
}
|
|
|
|
export class DaemonProtocolError extends Error {
|
|
constructor(message: string) {
|
|
super(message)
|
|
this.name = 'DaemonProtocolError'
|
|
}
|
|
}
|
|
|
|
export class SessionNotFoundError extends Error {
|
|
constructor(sessionId: string) {
|
|
super(`Session not found: ${sessionId}`)
|
|
this.name = 'SessionNotFoundError'
|
|
}
|
|
}
|