import type { ThinkingLevel } from "@kolisachint/hoocode-agent-core"; import type { Transport } from "@kolisachint/hoocode-ai"; import { SettingsList } from "@kolisachint/hoocode-tui"; import type { MarketplacePlatform } from "../../../core/extensions/plugins/formats/types.js"; import type { ExternalToolStatus } from "../../../core/external-tools.js"; import type { PromptSurface } from "../../../core/light.js"; import type { LearnSettingKey, WarningSettings } from "../../../core/settings-manager.js"; import { type ToolOutputView } from "../../../core/tool-output-view.js"; import { InputFrame } from "./input-frame.js"; interface ToolToggleInfo { /** Tool name (e.g. "read", "bash"). */ name: string; /** Whether the tool is currently enabled (not in the persisted disabled set). */ enabled: boolean; /** * What this tool's serialized schema costs on every request. Priced whether or * not it is on: for a tool that is off, this is what turning it on will cost. * Undefined for a tool that was disabled before launch, whose schema this * session never built. */ tokens?: number; } interface FlagInfo { /** Flag name (without the leading --). */ name: string; description?: string; type: "boolean" | "string"; /** Current effective value. */ value: boolean | string; } interface ToolGroupInfo { /** Group identifier (e.g. "web", "embsearch"). */ id: string; label: string; description: string; /** Whether the group is currently enabled (its tools are available). */ enabled: boolean; } export interface SettingsConfig { autoCompact: boolean; tools: ToolToggleInfo[]; toolGroups: ToolGroupInfo[]; /** * The external Rust binaries and whether each one is present. Rendered as * its own top-level category, and used to annotate the rows that are gated * on a binary that is not installed. */ externalTools: ExternalToolStatus[]; flags: FlagInfo[]; toolOutputView: ToolOutputView; toolOutputMaxBytes: number; toolOutputMaxLines: number; contextGc: boolean; showImages: boolean; imageWidthCells: number; autoResizeImages: boolean; blockImages: boolean; enableSkillCommands: boolean; light: boolean; pluginInstallScope: "user" | "project"; enablePluginTools: boolean; /** * settings.json keys the project file sets. A pane row writes user scope, so * anything listed here wins again on the next session however the row is set. */ projectPinnedSettings: string[]; /** Platform layouts in force this session (empty = unset, per-consumer defaults apply). */ platform: MarketplacePlatform[]; steeringMode: "all" | "one-at-a-time"; followUpMode: "all" | "one-at-a-time"; transport: Transport; thinkingLevel: ThinkingLevel; availableThinkingLevels: ThinkingLevel[]; currentTheme: string; availableThemes: string[]; hideThinkingBlock: boolean; collapseChangelog: boolean; enableInstallTelemetry: boolean; doubleEscapeAction: "fork" | "tree" | "none"; treeFilterMode: "default" | "no-tools" | "user-only" | "labeled-only" | "all"; showHardwareCursor: boolean; editorBorder: "rule" | "box"; editorPaddingX: number; autocompleteMaxVisible: number; quietStartup: boolean; tipsEnabled: boolean; clearOnShrink: boolean; showTerminalProgress: boolean; warnings: WarningSettings; voiceSilenceMs: number; webtoolsTimeoutSecs: number; learn: Record; /** * Re-measure the fixed per-turn surface (system prompt + active tool schemas). * Called on open and after every change, so a toggle that costs tokens shows * what it cost. Omitted by callers that have no session to measure. */ measureTokenSurface?: () => PromptSurface; } export interface SettingsCallbacks { onAutoCompactChange: (enabled: boolean) => void; onToolEnabledChange: (name: string, enabled: boolean) => void; onToolGroupChange: (id: string, enabled: boolean) => void; onToolOutputViewChange: (view: ToolOutputView) => void; onToolOutputMaxBytesChange: (bytes: number) => void; onToolOutputMaxLinesChange: (lines: number) => void; onContextGcChange: (enabled: boolean) => void; onFlagChange: (name: string, value: boolean | string) => void; onShowImagesChange: (enabled: boolean) => void; onImageWidthCellsChange: (width: number) => void; onAutoResizeImagesChange: (enabled: boolean) => void; onBlockImagesChange: (blocked: boolean) => void; onEnableSkillCommandsChange: (enabled: boolean) => void; onLightChange: (enabled: boolean) => void; onPluginInstallScopeChange: (scope: "user" | "project") => void; onEnablePluginToolsChange: (enabled: boolean) => void; onPlatformChange: (platforms: MarketplacePlatform[]) => void; onSteeringModeChange: (mode: "all" | "one-at-a-time") => void; onFollowUpModeChange: (mode: "all" | "one-at-a-time") => void; onTransportChange: (transport: Transport) => void; onThinkingLevelChange: (level: ThinkingLevel) => void; onThemeChange: (theme: string) => void; onThemePreview?: (theme: string) => void; onHideThinkingBlockChange: (hidden: boolean) => void; onCollapseChangelogChange: (collapsed: boolean) => void; onEnableInstallTelemetryChange: (enabled: boolean) => void; onDoubleEscapeActionChange: (action: "fork" | "tree" | "none") => void; onTreeFilterModeChange: (mode: "default" | "no-tools" | "user-only" | "labeled-only" | "all") => void; onShowHardwareCursorChange: (enabled: boolean) => void; onEditorBorderChange: (border: "rule" | "box") => void; onEditorPaddingXChange: (padding: number) => void; onAutocompleteMaxVisibleChange: (maxVisible: number) => void; onQuietStartupChange: (enabled: boolean) => void; onTipsEnabledChange: (enabled: boolean) => void; onClearOnShrinkChange: (enabled: boolean) => void; onShowTerminalProgressChange: (enabled: boolean) => void; onWarningsChange: (warnings: WarningSettings) => void; onVoiceSilenceMsChange: (ms: number) => void; onWebtoolsTimeoutSecsChange: (secs: number) => void; onLearnSettingChange: (key: LearnSettingKey, value: number) => void; onCancel: () => void; } /** * Main settings selector component. */ export declare class SettingsSelectorComponent extends InputFrame { private settingsList; private surfaceLine?; private measureTokenSurface?; constructor(config: SettingsConfig, callbacks: SettingsCallbacks); /** Re-price the pane after a change that may have altered what each turn sends. */ private refreshTokenSurface; getSettingsList(): SettingsList; } export {}; //# sourceMappingURL=settings-selector.d.ts.map