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:
@@ -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,
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user