diff --git a/PATCHNOTES.md b/PATCHNOTES.md index 5783719..0fb1e63 100644 --- a/PATCHNOTES.md +++ b/PATCHNOTES.md @@ -1,3 +1,14 @@ +# Patch Notes - v2.33.7 (2026-05-01) + +## โš™๏ธ Logic Refinement +- **Multi-Agent Routing:** Optimized workflow to prioritize local project analysis over general multi-agent execution when explicit projects are referenced. +- **Intent Detection:** Expanded analysis intent keywords for better project-level understanding triggers. +- **Error Handling:** Improved diagnostic details for empty AI responses to help troubleshoot local server issues. +- **Default Config:** Set `multiAgentEnabled` to `false` by default for a leaner initial experience. +- **UI Polish:** Enhanced Multi-Agent button UI with dynamic tooltips and state synchronization. + +--- + # Patch Notes - v2.33.6 (2026-05-01) ## ๐Ÿ› ๏ธ Critical Bug Fixes diff --git a/package.json b/package.json index b24194d..f995cae 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "g1nation", "displayName": "G1nation", "description": "High-performance autonomous local AI coding agent for VS Code. Features vectorized inference, asynchronous task management, and 100% offline processing.", - "version": "2.33.6", + "version": "2.33.7", "publisher": "connectailab", "license": "MIT", "icon": "assets/icon.png", @@ -97,7 +97,7 @@ "properties": { "g1nation.multiAgentEnabled": { "type": "boolean", - "default": true, + "default": false, "description": "Enable Multi-Agent Workflow (Planner -> Researcher -> Writer) for complex tasks." }, "g1nation.multiAgentWorkflow": { diff --git a/src/agent.ts b/src/agent.ts index 80e1dd0..682e753 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -190,7 +190,10 @@ export class AgentExecutor { // Decide whether to use Multi-Agent Workflow (for complex requests) const isComplex = prompt && (prompt.length > 100 || /(๋ถ„์„|๋ณด๊ณ ์„œ|์„ค๊ณ„|๊ธฐํš|์ •๋ฆฌ)/.test(prompt)); - if (isComplex && loopDepth === 0 && multiAgentEnabled) { + const explicitLocalProjectTask = prompt + ? !!(await this.resolveProjectReference(prompt)) && this.isProjectAnalysisRequest(prompt.toLowerCase()) + : false; + if (isComplex && loopDepth === 0 && multiAgentEnabled && !explicitLocalProjectTask) { return this.executeMultiAgentWorkflow(prompt!, modelName, options); } @@ -401,8 +404,16 @@ export class AgentExecutor { const report = await this.executeActions(aiResponseText, rootPath); if (!aiResponseText.trim() && report.length === 0) { this.chatHistory.pop(); - logError('Model returned an empty response without actions.', { model: actualModel, loopDepth }); - this.webview.postMessage({ type: 'error', value: 'AI model returned an empty response.' }); + logError('Model returned an empty response without actions.', { model: actualModel, engine, apiUrl, loopDepth }); + this.webview.postMessage({ + type: 'error', + value: [ + 'AI engine returned an empty response.', + `Engine: ${engine}`, + `Model: ${actualModel}`, + 'The request reached the local LLM server, but no usable content was returned. Try another model, restart the local server, or reduce the prompt/context size.' + ].join('\n') + }); return; } @@ -653,7 +664,7 @@ export class AgentExecutor { // Only trigger local analysis if the intent is strictly about a project-level overview. // Avoid generic terms like 'analysis' or 'review' that are common in general coding chat. const hasProjectKeyword = /(ํ”„๋กœ์ ํŠธ|project|๋ ˆํฌ|repository)/.test(normalized); - const hasAnalysisIntent = /(์ „์ฒด ์š”์•ฝ|์ œํ’ˆ ์„ค๋ช…|์–ด๋–ค ํ”„๋กœ๊ทธ๋žจ|๊ตฌ์กฐ ํŒŒ์•…|ํ›‘์–ด๋ณด๊ธฐ)/.test(normalized); + const hasAnalysisIntent = /(์ „์ฒด ์š”์•ฝ|์ œํ’ˆ ์„ค๋ช…|์–ด๋–ค ํ”„๋กœ๊ทธ๋žจ|๊ตฌ์กฐ ํŒŒ์•…|ํ›‘์–ด๋ณด๊ธฐ|๋ถ„์„ ๋ฌธ์„œ|๋ชจ๋“  ์ฝ”๋“œ|์ค€๋น„ํ•œ ๋ชจ๋“  ์ฝ”๋“œ|์ฝ”๋“œ๋ฅผ ์ฝ๊ณ |ํ”„๋กœ์ ํŠธ๋ฅผ ์ดํ•ด|์„ค๊ณ„|๊ธฐ๋Šฅ|์ฝ”๋“œ ํ’ˆ์งˆ|๋ฌธ์ œ์„ฑ|๋ฆฌ๋ทฐ|ํ‰๊ฐ€)/.test(normalized); return hasProjectKeyword && hasAnalysisIntent; } diff --git a/src/config.ts b/src/config.ts index a9ea6c6..09729cb 100644 --- a/src/config.ts +++ b/src/config.ts @@ -165,7 +165,7 @@ export function getConfig(): IAgentConfig { maxContextSize: cfg.get('maxContextSize', 12000), maxAutoSteps: cfg.get('maxAutoSteps', 50), dryRun: cfg.get('dryRun', false), - multiAgentEnabled: cfg.get('multiAgentEnabled', true), + multiAgentEnabled: cfg.get('multiAgentEnabled', false), multiAgentWorkflow: multiAgentWorkflow.length > 0 ? multiAgentWorkflow : DEFAULT_MULTI_AGENT_WORKFLOW, memoryEnabled: cfg.get('memoryEnabled', true), memoryShortTermMessages: Math.max(0, cfg.get('memoryShortTermMessages', 8)), diff --git a/src/sidebarProvider.ts b/src/sidebarProvider.ts index ff59e88..ce4ff69 100644 --- a/src/sidebarProvider.ts +++ b/src/sidebarProvider.ts @@ -2428,11 +2428,16 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn internetEnabled = !internetEnabled; document.getElementById('internetBtn').classList.toggle('active', internetEnabled); }; - let multiAgentEnabled = true; + let multiAgentEnabled = false; + const setMultiAgentUi = (enabled) => { + multiAgentEnabled = enabled; + const btn = document.getElementById('multiAgentBtn'); + btn.classList.toggle('active', enabled); + btn.setAttribute('data-tooltip', enabled ? 'Multi-Agent Mode: On' : 'Multi-Agent Mode: Off'); + }; document.getElementById('multiAgentBtn').onclick = () => { - multiAgentEnabled = !multiAgentEnabled; + setMultiAgentUi(!multiAgentEnabled); vscode.postMessage({ type: 'toggleMultiAgent', value: multiAgentEnabled }); - document.getElementById('multiAgentBtn').classList.toggle('active', multiAgentEnabled); }; const syncBrain = () => { Sound.play(550, 'sine', 0.1); vscode.postMessage({ type: 'syncBrain' }); }; @@ -2483,8 +2488,7 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn window.addEventListener('message', e => { const msg = e.data; if (msg.type === 'configUpdate') { - multiAgentEnabled = msg.value.multiAgentEnabled; - document.getElementById('multiAgentBtn').classList.toggle('active', multiAgentEnabled); + setMultiAgentUi(!!msg.value.multiAgentEnabled); } });