feat(tui): thread configPath and currentConfig into MinimalTuiConfig

This commit is contained in:
William Valentin
2026-02-26 09:31:48 -08:00
parent 7726b6d42a
commit c456d34bf1
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -451,6 +451,8 @@ export function registerTuiCommand(program: Command): void {
contextThresholdPct: config.compaction.threshold_pct, contextThresholdPct: config.compaction.threshold_pct,
currentLocalProvider: config.models.local?.provider, currentLocalProvider: config.models.local?.provider,
onTransfer: transferSessionToTarget, onTransfer: transferSessionToTarget,
configPath,
currentConfig: config,
onFullscreen: () => { onFullscreen: () => {
switchingToFullscreen = true; switchingToFullscreen = true;
tui.stop(true); tui.stop(true);
+4 -1
View File
@@ -5,8 +5,9 @@ import type { ModelRouter } from '../../models/router.js';
import type { NativeAgent, ToolUseEvent } from '../../backends/native/agent.js'; import type { NativeAgent, ToolUseEvent } from '../../backends/native/agent.js';
import { parseCommand, getHelpText, resolveModelAlias, getCommandCompletions, getCommandTooltip, isToolInventoryQuery, type Command } from './commands.js'; import { parseCommand, getHelpText, resolveModelAlias, getCommandCompletions, getCommandTooltip, isToolInventoryQuery, type Command } from './commands.js';
import { renderMarkdown } from './markdown.js'; import { renderMarkdown } from './markdown.js';
import type { ModelConfig, ModelProvider } from '../../config/schema.js'; import type { Config, ModelConfig, ModelProvider } from '../../config/schema.js';
import { MODEL_PROVIDERS } from '../../config/schema.js'; import { MODEL_PROVIDERS } from '../../config/schema.js';
import { persistConfig } from '../../config/persistence.js';
import { OllamaClient, LlamaCppClient } from '../../models/index.js'; import { OllamaClient, LlamaCppClient } from '../../models/index.js';
import { createClientFromConfig } from '../../daemon/index.js'; import { createClientFromConfig } from '../../daemon/index.js';
import { import {
@@ -78,6 +79,8 @@ export interface MinimalTuiConfig {
pairingManager?: PairingManager; pairingManager?: PairingManager;
hookEngine?: HookEngine; hookEngine?: HookEngine;
contextThresholdPct?: number; contextThresholdPct?: number;
configPath?: string;
currentConfig?: Config;
} }
export class MinimalTui { export class MinimalTui {