MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / keyMapForAgent

Function keyMapForAgent

ui/src/components/workspace/terminalInput.ts:17–28  ·  view source on GitHub ↗
(agent: string | null | undefined)

Source from the content-addressed store, hash-verified

15}
16
17export function keyMapForAgent(agent: string | null | undefined): KeyMap | undefined {
18 switch (agent) {
19 case 'claude':
20 return { 'shift+enter': '\x1b\r' }
21 case 'codex':
22 // Codex is a crossterm TUI. It handles multiline as the modified
23 // Shift+Enter key event, not as a bare LF byte.
24 return { 'shift+enter': '\x1b[13;2u' }
25 default:
26 return undefined
27 }
28}
29
30export function describeTerminalInput(data: string): string {
31 return Array.from(data)

Callers 2

WorkspacePageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected