/** Composer input, command routing, attachments, and one-shot composer animations. */ import { type ReactElement } from 'react'; import type { CommandDescriptor } from '@deepseek-ai/dsh-commands'; import type { ContentBlock, FileBlock, ImageBlock } from '@deepseek-ai/dsh-llm'; import { type FilePathInspection, type ImagePathInspection } from './attachments.ts'; import type { SkillRow } from './skills.ts'; import { type MentionCandidate } from './mentions.ts'; import { type ReviewSelection } from './git-workflow.ts'; import { type LanguageName } from './i18n.ts'; import { type DeepseekWaveStyle, type DeepseekWaveTier } from './render/animations.ts'; import type { TranscriptEntry } from './render/projection.ts'; import type { NoticeTone, QueueMutation } from './ui/ui-contract.ts'; /** * The prompt box: TUI-local slash commands handled locally, other lines * dispatched; input editing keeps a cursor with history and completion. * While a modal (approval / question / model panel) owns the keys, the * box passes every key through untouched. */ export declare function Composer({ active, frozen, frozenHint, busy, descriptors, skills, dispatch, steer, submitMode, cycleSubmitMode, interrupt, quit, openModel, openEffort, openHelp, openMode, openPermission, openResume, openSearch, openPlugin, openUpdate, openSchedule, openJobs, openStatusline, openTheme, openLanguage, saveLanguage, openHistory, openQueue, openAgents, openSubagent, openTodos, openUsage, openDelete, openDiff, openReviewPicker, reviewChanges, deleteConfirm, confirmDelete, cancelDelete, createSession, forkSession, cancelSessionSwitch, notify, applyEditorKeys, hasNotice, dismissNotice, toggleReasoning, openVerbose, clearView, refresh, loadMentions, inspectImages, prepareImages, inspectFiles, prepareFiles, cycleMode, exportTranscript, renameTitle, copyLastResponse, recallSpace, recordLocal, recordHistory, queued, updateQueued, historyFill, historyConsumed, animations, applyAnimations, applyRainbow, rainbowBurstId, waveTier, waveStyle, maxRows, anchorRowsBelow, tabTitle, onEditorRows, onMenuRows, sessionKey }: { active: boolean; frozen: boolean; /** Frozen-band hint naming the surface that owns the keyboard; an empty * draft otherwise advertises typing that the composer cannot accept. */ frozenHint?: string; busy: boolean; descriptors: readonly CommandDescriptor[]; skills: readonly SkillRow[]; dispatch: (text: string, attachments?: readonly ContentBlock[], origin?: string) => void; /** Submit as steering into the running turn (see {@link AppProps.steer}). */ steer: (text: string, attachments?: readonly ContentBlock[], origin?: string) => void; /** Delivery mode the next submission uses; Tab on an empty composer flips it. */ submitMode: 'queue' | 'steer'; /** Flip {@link submitMode} and report the new mode. */ cycleSubmitMode: () => void; /** The full current session identity ('' while pending); the delivery origin. */ sessionKey: string; interrupt: () => boolean; quit: () => void; openModel: () => void; openEffort: () => void; openHelp: () => void; openMode: () => void; openPermission: () => void; openResume: () => void; /** Open the /search panel with an optional seed query. */ openSearch: (query: string) => void; openPlugin: (query?: string) => void; /** Open the /update panel (aligned upgrade surface). */ openUpdate: () => void; /** Open the /schedule reminder panel (read-only catalog). */ openSchedule: () => void; openJobs: () => void; openStatusline: () => void; openTheme: () => void; /** Open the /language picker (bare /language). */ openLanguage: () => void; /** Apply and persist a language chosen by argument. */ saveLanguage: (name: LanguageName) => void; openHistory: () => void; openQueue: () => void; /** Open the /agents panel (live subagent feed + transcript entry). */ openAgents: () => void; /** Open the /subagent model panel. */ openSubagent: () => void; /** Open the /todos subpage (full todo list in one bounded panel). */ openTodos: () => void; openUsage: () => void; /** Open the dedicated /delete picker, optionally pre-armed on one id. */ openDelete: (id?: string) => void; openDiff: (argument: string) => void; reviewChanges: (selection: ReviewSelection) => void; /** Open the /review candidate picker (bare /review). */ openReviewPicker: () => void; /** The row id awaiting y/n in this box, when a deletion is pending. */ deleteConfirm?: string; /** Confirm the pending deletion (y in the box). */ confirmDelete: () => void; /** Cancel the pending deletion (any other key in the box). */ cancelDelete: () => void; createSession: (mode?: string) => void; forkSession: (argument: string) => void; cancelSessionSwitch: () => boolean; notify: (text: string, tone?: NoticeTone) => void; /** Apply the Ctrl+R passthrough to the detected editor (/vscode-keys); resolves to a one-line summary. */ applyEditorKeys: () => Promise; hasNotice: boolean; dismissNotice: () => void; toggleReasoning: () => void; openVerbose: () => void; clearView: () => void; refresh: () => void; loadMentions: (query: string, signal?: AbortSignal) => Promise; inspectImages: (paths: readonly string[]) => Promise; prepareImages: (paths: readonly string[], signal?: AbortSignal) => Promise; inspectFiles: (paths: readonly string[]) => Promise; prepareFiles: (paths: readonly string[], signal?: AbortSignal) => Promise; cycleMode: () => string; exportTranscript: (argument: string) => Promise; renameTitle: (argument: string) => string; copyLastResponse: () => Promise; /** Newest-first recall space (persistent + in-session, deduped). */ recallSpace: readonly string[]; /** Record one in-session submission (deduped, local only). */ recordLocal: (text: string) => void; /** Persist one submission to the global history file. */ recordHistory: (text: string) => void; /** Next-turn inbox rows, ordered exactly as the durable inbox. */ queued: readonly Extract[]; updateQueued?: (messageId: string, action: QueueMutation) => void; /** Accepted /history entry waiting to be placed into the composer. */ historyFill: { text: string; index: number; } | undefined; /** Marks the accepted entry consumed (called after the fill is applied). */ historyConsumed: () => void; /** Whether decorative animations run; caret and busy activity stay live. */ animations: boolean; /** Apply and report one /animation toggle (App persists through the runner). */ applyAnimations: (enabled: boolean) => void; /** Reroll or pin the rainbow palette (switches to rainbow if needed). */ applyRainbow: (seed?: number) => void; /** Monotonic id of the in-flight /rainbow composer burst; 0 means none. */ rainbowBurstId: number; /** DeepSeek easter-egg wave tier of the applied route (null otherwise): * official DeepSeek models drive their flash/pro tiers, non-DeepSeek * models running an effort above high drive the "Into the Unknown" * variant. Drives the persistent prompt glyph/accent and the sparkle * tier. */ waveTier: DeepseekWaveTier | null; /** The ignition style running, if any: Wave / Aurora / Pulse. */ waveStyle: DeepseekWaveStyle | null; /** Maximum physical editor rows the composer may occupy (see composerMaxRows). */ maxRows: number; /** Terminal rows below the composer the editor does not own: the status * footer and Ink's parked cursor row. The IME anchor adds these to the * caret's in-band offset to reach that parked position. */ anchorRowsBelow: number; /** The managed terminal tab label; re-asserted on terminal focus-in so a * background process sharing the console cannot keep it overwritten. */ tabTitle: string; /** Reports the editor's current physical row count so the live budget stays exact. */ onEditorRows: (rows: number) => void; /** Reports the open completion menu's physical row count (0 when closed) * for the same reason: the dynamic budget must reserve it, not overflow. */ onMenuRows: (rows: number) => void; }): ReactElement; /** One cached settled row: the row Box plus its roomy-prompt spacers. */