(agent: string | null | undefined)
| 15 | } |
| 16 | |
| 17 | export 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 | |
| 30 | export function describeTerminalInput(data: string): string { |
| 31 | return Array.from(data) |
no outgoing calls
no test coverage detected