/** * ink-app.tsx — Phase 2: full Ink-based REPL with pinned input at the bottom. * * Layout (always stable, never disrupted by agent output): * * ┌────────────────────────────────────────────┐ * │ output lines (last N that fit) │ scrollable area * ├────────────────────────────────────────────┤ * │ project · ░░░░░░░░░░ 0% 5h · $0.01 · model│ status bar * │ ↳ accept-edits · shift+tab │ mode line * ├────────────────────────────────────────────┤ * │ ❯ user input here │ input — ALWAYS VISIBLE * └────────────────────────────────────────────┘ * * Features: * - Streaming: for await (const event of agent.send()) → OutputLine updates * - Line budget scroll: render only last N lines that fit terminal height * - Queue while processing: pending prompts accumulate, run after turn ends * - History ↑↓: up/down arrow navigates past inputs * - Ctrl+C abort: calls agent.abortCurrent() mid-turn * - Shift+Tab mode cycle: cycles through default/accept-edits/plan/bypass * - Slash commands: /cmd → handleCommand(), no agent call * - Tool rendering with icons, diff lines for Edit/Write, task snapshots */ import React from 'react'; import type { SqAgent } from '../agent/agent.js'; import type { SqConfig } from '../config.js'; import { type CustomCommand } from './custom-commands.js'; export type OutputLineKind = 'user_header' | 'user_body' | 'agent_header' | 'agent_body' | 'agent_code_fence_open' | 'agent_code' | 'agent_code_fence_close' | 'tool_start' | 'diff_remove' | 'diff_add' | 'task_item' | 'turn_end' | 'error' | 'info' | 'thinking'; export interface OutputLine { id: number; kind: OutputLineKind; text: string; /** Language label shown on fence_open (e.g. "typescript", "bash"). */ lang?: string; /** 1-based index of the code block within the current agent message. * Used by the Ctrl+N shortcut and by the rendered pseudo-button. */ blockIndex?: number; } export interface AppProps { agent: SqAgent; config: SqConfig; cwd: string; projectName: string; resumedInfo?: { sessionId: string; turns: number; }; version: string; authStatus: { anthropic: boolean; openai: boolean; google: boolean; }; customCommands?: CustomCommand[]; } export declare function App({ agent, config, cwd, projectName, resumedInfo, version, authStatus, customCommands }: AppProps): React.ReactElement; //# sourceMappingURL=ink-app.d.ts.map