UNPKG

@code-yeongyu/senpi

Version:

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

53 lines • 2.75 kB
import type { Component, EditorOptions, EditorTheme, TUI } from "@earendil-works/pi-tui"; import type { AgentSession } from "../../../core/agent-session.ts"; import type { WorkingIndicatorOptions } from "../../../core/extensions/index.ts"; import type { ReadonlyFooterDataProvider } from "../../../core/footer-data-provider.ts"; import type { KeybindingsManager } from "../../../core/keybindings.ts"; import { CustomEditor } from "../components/custom-editor.ts"; import { WorkingStatusIndicator } from "../components/status-indicator.ts"; import type { ToolExecutionPresentation } from "../components/tool-execution.ts"; export interface InteractiveFooter extends Component { setSession(session: AgentSession): void; setAutoCompactEnabled(enabled: boolean): void; /** Optional: mark the context meter while an external owner compacts natively. */ setCompactionDelegated?(delegated: boolean): void; invalidate(): void; dispose(): void; } export type EditorBorderContext = { readonly isBashMode: boolean; readonly thinkingLevel: string; }; /** * Mode-owned chrome seam for InteractiveMode. Extensions continue to own their * editor factory; this strategy only creates and decorates the base editor. */ export interface InteractiveChrome { readonly toolPresentation: ToolExecutionPresentation; createBaseEditor(context: { ui: TUI; keybindings: KeybindingsManager; editorOptions: EditorOptions; }): CustomEditor; getEditorTheme(): EditorTheme; createFooter(session: AgentSession, footerData: ReadonlyFooterDataProvider): InteractiveFooter; createWelcomeContent(appName: string, version: string): Component; createWorkingIndicator(ui: TUI, message: string, indicator?: WorkingIndicatorOptions): WorkingStatusIndicator; getEditorBorderColor(context: EditorBorderContext): (text: string) => string; arrangeRoot(children: readonly Component[], ui?: TUI): Component[]; } export declare class GrokChrome implements InteractiveChrome { readonly toolPresentation: "grok"; createBaseEditor({ ui, keybindings, editorOptions, }: { ui: TUI; keybindings: KeybindingsManager; editorOptions: EditorOptions; }): CustomEditor; getEditorTheme(): EditorTheme; createFooter(session: AgentSession, footerData: ReadonlyFooterDataProvider): InteractiveFooter; createWelcomeContent(appName: string, version: string): Component; createWorkingIndicator(ui: TUI, message: string, indicator?: WorkingIndicatorOptions): WorkingStatusIndicator; getEditorBorderColor(_context: EditorBorderContext): (text: string) => string; arrangeRoot(children: readonly Component[], ui?: TUI): Component[]; } //# sourceMappingURL=chrome.d.ts.map