fix(tui): enable tool access in fullscreen mode via NativeAgent

Fullscreen TUI was calling modelClient directly, bypassing the NativeAgent
tool loop entirely. Pass the agent through FullscreenTuiConfig → App and
use agent.process() for message handling, which enables the full tool
registry and executor.
This commit is contained in:
William Valentin
2026-02-10 13:21:22 -08:00
parent f892bbe6ca
commit e46e8740a1
3 changed files with 29 additions and 7 deletions
+3
View File
@@ -4,6 +4,7 @@ import { App } from './components/index.js';
import type { ManagedSession } from '../../session/index.js';
import type { ModelClient } from '../../models/types.js';
import type { ModelRouter } from '../../models/router.js';
import type { NativeAgent } from '../../backends/native/agent.js';
export interface FullscreenTuiConfig {
session: ManagedSession;
@@ -11,6 +12,7 @@ export interface FullscreenTuiConfig {
modelRouter?: ModelRouter;
systemPrompt: string;
model: string;
agent?: NativeAgent;
onExit?: () => void;
}
@@ -27,6 +29,7 @@ export async function startFullscreenTui(config: FullscreenTuiConfig): Promise<v
modelRouter: config.modelRouter,
systemPrompt: config.systemPrompt,
model: config.model,
agent: config.agent,
onExit: config.onExit,
})
);