feat(tui): update fullscreen config for model router

This commit is contained in:
William Valentin
2026-02-05 10:56:16 -08:00
parent d1d6054deb
commit 83a750f484
2 changed files with 12 additions and 1 deletions
+8
View File
@@ -3,20 +3,28 @@ import { render } from 'ink';
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';
export interface FullscreenTuiConfig {
session: ManagedSession;
modelClient: ModelClient;
modelRouter?: ModelRouter;
systemPrompt: string;
model: string;
onExit?: () => void;
}
export async function startFullscreenTui(config: FullscreenTuiConfig): Promise<void> {
// Ensure stdin is in a clean state for Ink
if (process.stdin.isPaused()) {
process.stdin.resume();
}
const { waitUntilExit } = render(
React.createElement(App, {
session: config.session,
modelClient: config.modelClient,
modelRouter: config.modelRouter,
systemPrompt: config.systemPrompt,
model: config.model,
onExit: config.onExit,
+4 -1
View File
@@ -2,7 +2,7 @@ export {
MinimalTui,
formatPrompt,
parseCommand,
type TuiCommand,
type Command,
type MinimalTuiConfig,
} from './minimal.js';
@@ -11,4 +11,7 @@ export {
type FullscreenTuiConfig,
} from './fullscreen.js';
export { renderMarkdown } from './markdown.js';
export { parseCommand as parseCommandUtil, getHelpText, resolveModelAlias } from './commands.js';
export { App, StatusBar, MessageList, InputBar } from './components/index.js';