import { type AppIconThemeName } from "./icon-theme.js"; export type ToolRendererRule = { previewLines?: number; direction?: "head" | "tail"; color?: string; defaultExpanded?: boolean; compactHidden?: boolean; hidden?: boolean; }; export type ResolvedToolRule = { previewLines: number; direction: "head" | "tail"; color: string; defaultExpanded?: boolean; compactHidden?: boolean; hidden?: boolean; }; export type ToolRendererConfig = { default: ToolRendererRule; tools: Record; }; export type OutputFiltersConfig = { patterns: string[]; }; export type PromptEnhancerConfig = { modelRef: string; fallbackModels: string[]; }; export type AutocompleteConfig = { /** Empty string disables inline LLM autocomplete. */ modelRef: string; /** Ordered model fallbacks tried after modelRef. */ fallbackModels: string[]; /** Delay after typing before asking the model. */ debounceMs: number; /** Hard timeout for a best-effort completion request. */ timeoutMs: number; /** Maximum output tokens requested from the provider. */ maxTokens: number; /** Approximate maximum input prompt tokens, including system prompt and optional history. */ maxPromptTokens: number; /** Number of recent active-session user/assistant messages to include as context. */ includeRecentMessages: number; }; export type DefaultModelConfig = { modelRef: string; fallbackModels: string[]; thinking?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max"; }; export type ModelThinkingPreferences = Record; export type ModelColorsConfig = { rules: Record; }; export type IconThemeConfig = { name: AppIconThemeName; }; export type DictationLanguageModelConfig = { label: string; /** Deepgram language code. Defaults to the language map key. */ deepgramLanguage?: string; /** Deprecated Vosk model fields kept only for config compatibility. */ dirName?: string; url?: string; }; export type DictationConfig = { languages: Record; language?: string; model?: string; /** Long-lived Deepgram API key. Prefer the user config, not project config. */ apiKey?: string; }; export type PixConfig = { toolRenderer: ToolRendererConfig; outputFilters: OutputFiltersConfig; defaultModel?: DefaultModelConfig; /** User-level whitelist for model pickers. Undefined means show every available model. */ visibleModels?: string[]; /** Last applied thinking level for each model, shared by TUI and Desktop pickers. */ thinkingByModel?: ModelThinkingPreferences; promptEnhancer: PromptEnhancerConfig; autocomplete: AutocompleteConfig; modelColors: ModelColorsConfig; iconTheme: IconThemeConfig; dictation: DictationConfig; ignoreContextFiles: boolean; maxProjectSessions: number; }; export declare function getPixConfigPath(homeDir?: string): string; export declare function getProjectPixConfigPath(cwd: string): string; export declare function defaultPixConfig(): PixConfig; export declare function resolveDefaultModelRef(config: PixConfig): string | undefined; export declare function savePixDefaultModel(modelRef: string): DefaultModelConfig | undefined; export declare function savePixDefaultThinking(thinking: string, fallbackModelRef?: string): DefaultModelConfig | undefined; export declare function savePixAutocompleteModel(modelRef: string): AutocompleteConfig; export declare function savePixVisibleModels(modelRefs: readonly string[]): string[]; export declare function savePixThinkingLevelForModel(modelRef: string, thinking: string): ModelThinkingPreferences; export declare function saveProjectPixIgnoreContextFiles(cwd: string, ignoreContextFiles: boolean): boolean; export declare function upsertPixIgnoreContextFilesInJsonc(source: string, ignoreContextFiles: boolean): string; export declare function upsertPixVisibleModelsInJsonc(source: string, modelRefs: readonly string[]): string; export declare function upsertPixThinkingLevelForModelInJsonc(source: string, modelRef: string, thinking: string): string; export declare function upsertPixDefaultModelInJsonc(source: string, modelRef: string): string; export declare function upsertPixDefaultThinkingInJsonc(source: string, thinking: string, fallbackModelRef?: string): string; export declare function upsertPixAutocompleteModelInJsonc(source: string, modelRef: string): string; export declare function loadPixConfig(cwd?: string): PixConfig; export declare function savePixDictationLanguage(language: string): void; export declare function upsertPixDictationLanguageInJsonc(source: string, language: string): string; export declare function resolveModelColor(modelRef: string, config: ModelColorsConfig): string | undefined; export declare function compileOutputFilterPatterns(patterns: readonly string[]): RegExp[]; export declare function applyOutputFilters(text: string, filters: readonly RegExp[]): string; export declare function resolveToolRule(toolName: string, config: ToolRendererConfig): ResolvedToolRule; export declare function resolveColor(colorRef: string, themeColors: Record): string;