fix(tui): register Google Calendar tools when gcal is enabled

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-02-10 11:45:05 -08:00
parent 55d35c80b4
commit f6dedf0fbe
+8 -1
View File
@@ -78,7 +78,7 @@ export function registerTuiCommand(program: Command): void {
setLogLevel(config.log_level);
const { MinimalTui, startFullscreenTui } = await import('../frontends/tui/index.js');
const { NativeAgent } = await import('../backends/index.js');
const { ToolRegistry, ToolExecutor, allBuiltinTools, createWebSearchTools, createProcessTools, ProcessManager, createGmailTools } = await import('../tools/index.js');
const { ToolRegistry, ToolExecutor, allBuiltinTools, createWebSearchTools, createProcessTools, ProcessManager, createGmailTools, createGcalTools } = await import('../tools/index.js');
const { HookEngine } = await import('../hooks/index.js');
const { createModelRouter } = await import('../daemon/index.js');
@@ -134,6 +134,13 @@ export function registerTuiCommand(program: Command): void {
}
}
// Register Google Calendar tools if configured
if (config.automation.gcal?.enabled) {
for (const tool of createGcalTools(config.automation.gcal)) {
toolRegistry.register(tool);
}
}
const toolExecutor = new ToolExecutor(toolRegistry, hookEngine);
const session = sessionManager.getSession('tui', 'local');