UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

22 lines • 1.5 kB
/** * The terminal control endpoint's session controls: a model switch, a thinking level and an interrupt. * Each one runs the pane's own path (`/model`, the thinking-level selector, Esc) through the surface, * so validation, the footer and persistence are the ones the user gets typing it there. */ import type { ThinkingLevel } from "@earendil-works/pi-agent-core"; import type { Model } from "@earendil-works/pi-ai"; import type { AgentSession } from "../../core/agent-session.ts"; import { type ControlCommand } from "./session-control-server.ts"; export interface TuiSessionControls { /** The `/model` path: switches, updates the footer and records the default; throws a refusal. */ selectModel(model: Model<string>): Promise<{ readonly systemPromptName?: string; } | undefined>; /** The thinking-level selector: `remember` is its Ctrl+S (the model's remembered level). */ selectThinkingLevel(level: ThinkingLevel, remember: boolean): void; /** Esc on a running turn: queued input returns to the editor, the turn aborts and settles. */ interruptTurn(): Promise<void>; } export declare const SESSION_CONTROL_COMMANDS: readonly ["get_available_models", "get_available_thinking_levels", "set_model", "set_thinking_level", "interrupt"]; export declare function runSessionControlCommand(session: AgentSession, controls: TuiSessionControls, command: ControlCommand): Promise<object | undefined>; //# sourceMappingURL=session-control-session-commands.d.ts.map