feat: optimize multi-agent routing and enhance intent detection
This commit is contained in:
@@ -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
|
||||
|
||||
+2
-2
@@ -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": {
|
||||
|
||||
+15
-4
@@ -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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -165,7 +165,7 @@ export function getConfig(): IAgentConfig {
|
||||
maxContextSize: cfg.get<number>('maxContextSize', 12000),
|
||||
maxAutoSteps: cfg.get<number>('maxAutoSteps', 50),
|
||||
dryRun: cfg.get<boolean>('dryRun', false),
|
||||
multiAgentEnabled: cfg.get<boolean>('multiAgentEnabled', true),
|
||||
multiAgentEnabled: cfg.get<boolean>('multiAgentEnabled', false),
|
||||
multiAgentWorkflow: multiAgentWorkflow.length > 0 ? multiAgentWorkflow : DEFAULT_MULTI_AGENT_WORKFLOW,
|
||||
memoryEnabled: cfg.get<boolean>('memoryEnabled', true),
|
||||
memoryShortTermMessages: Math.max(0, cfg.get<number>('memoryShortTermMessages', 8)),
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user