diff --git a/electron/main.ts b/electron/main.ts index e2cf96c..1423747 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -148,8 +148,14 @@ async function initialize(): Promise { // ===== Agent Loop ===== const ollamaNumCtx = configService.get('ollama.numCtx'); + const agentMaxIter = configService.get('agent.maxIterations'); + const agentTimeout = configService.get('agent.totalTimeoutMs'); const agentLoop = new AgentLoopEngine( - { contextLength: ollamaNumCtx ?? undefined }, + { + maxIterations: agentMaxIter ?? 20, + totalTimeoutMs: agentTimeout ?? 600_000, + contextLength: ollamaNumCtx ?? undefined, + }, adapter, toolRegistry, preToolHooks, postToolHooks, ); agentLoop.setTools(toolRegistry.listTools());