Release: v2.36.1 - Action Queue Optimization
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
# Patch Notes - v2.36.1 (2026-05-02)
|
||||
|
||||
## 🛠️ Stability & Refinement
|
||||
- **Action Queue Optimization:** Refined the `ActionQueue` to handle rapid succession of wiki-grounded reasoning tasks without state overlap.
|
||||
- **Distribution Prep:** Finalized build artifacts for the standardized P-Reinforce v3.0 knowledge base integration.
|
||||
|
||||
---
|
||||
|
||||
# Patch Notes - v2.36.0 (2026-05-02)
|
||||
|
||||
## 🏛️ Knowledge Ecosystem: P-Reinforce v3.0 Standard
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# Development Log: Remove Local Template Replies
|
||||
|
||||
## Purpose
|
||||
Remove hard-coded local response templates that bypassed the normal model and trace flow.
|
||||
|
||||
## Problem
|
||||
Second Brain overview prompts could return a fixed table-style response such as "현재 연결된 제2뇌..." without model analysis. This made the assistant feel templated and conflicted with the desired natural analysis flow.
|
||||
|
||||
## Implementation Summary
|
||||
- Removed the local task shortcut before model execution.
|
||||
- Removed the hard-coded Second Brain overview renderer.
|
||||
- Removed the hard-coded unproductive-reply correction path.
|
||||
- Verified the old template strings and function names no longer exist in `src` or `tests`.
|
||||
|
||||
## Changed Files
|
||||
- `src/agent.ts`
|
||||
|
||||
## Verification
|
||||
- `rg` for removed template functions and strings returned no matches.
|
||||
- `./node_modules/.bin/tsc --noEmit`
|
||||
- `npm run compile`
|
||||
- `./node_modules/.bin/jest --runInBand`
|
||||
|
||||
## Result
|
||||
Second Brain questions now go through the normal model answer path with trace context instead of returning canned local templates.
|
||||
@@ -13,3 +13,4 @@
|
||||
- Added Second Brain Trace Mode so users can verify whether active Brain notes were searched, referenced, and reflected in answers.
|
||||
- Improved Second Brain Trace output with a collapsed-by-default details section to reduce answer noise.
|
||||
- Tuned Second Brain Trace retrieval quality: raw notes are excluded by default, curated records are preferred, and trace wording now says selected context rather than overstating actual usage.
|
||||
- Removed hard-coded local template replies for Second Brain overview and unproductive-response correction.
|
||||
|
||||
+1
-1
@@ -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.36.0",
|
||||
"version": "2.36.1",
|
||||
"publisher": "connectailab",
|
||||
"license": "MIT",
|
||||
"icon": "assets/icon.png",
|
||||
|
||||
-100
@@ -234,21 +234,6 @@ export class AgentExecutor {
|
||||
await this.context.workspaceState.update('lastActionStr', undefined);
|
||||
}
|
||||
|
||||
if (prompt !== null && loopDepth === 0 && !hasVisionContent) {
|
||||
const localReply = await this.tryHandleLocalTask(prompt);
|
||||
if (this.isStaleRun(runId)) return;
|
||||
if (localReply) {
|
||||
this.chatHistory.push({ role: 'user', content: prompt });
|
||||
this.emitHistoryChanged();
|
||||
this.webview.postMessage({ type: 'streamStart' });
|
||||
this.webview.postMessage({ type: 'streamChunk', value: localReply });
|
||||
this.webview.postMessage({ type: 'streamEnd' });
|
||||
this.chatHistory.push({ role: 'assistant', content: localReply });
|
||||
this.emitHistoryChanged();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 1. Prepare Context
|
||||
const workspaceFolders = vscode.workspace.workspaceFolders;
|
||||
const rootPath = workspaceFolders ? workspaceFolders[0].uri.fsPath : '';
|
||||
@@ -449,15 +434,6 @@ export class AgentExecutor {
|
||||
return;
|
||||
}
|
||||
|
||||
if (report.length === 0 && loopDepth === 0 && this.isUnproductiveWaitingReply(assistantContent)) {
|
||||
assistantMessage.internal = false;
|
||||
const correctedReply = await this.buildUnproductiveReplyCorrection(prompt || '');
|
||||
assistantMessage.content = traceMarkdown ? `${correctedReply}\n${traceMarkdown}` : correctedReply;
|
||||
this.emitHistoryChanged();
|
||||
this.webview.postMessage({ type: 'streamChunk', value: assistantMessage.content });
|
||||
return;
|
||||
}
|
||||
|
||||
if (report.length > 0) {
|
||||
this.emitHistoryChanged();
|
||||
logInfo('Agent actions executed.', { loopDepth: loopDepth + 1, report });
|
||||
@@ -506,17 +482,6 @@ export class AgentExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private async tryHandleLocalTask(prompt: string): Promise<string | null> {
|
||||
const normalized = prompt.trim().toLowerCase();
|
||||
if (!normalized) return null;
|
||||
|
||||
if (this.isBrainOverviewRequest(normalized)) {
|
||||
return this.buildBrainOverviewReply();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public async executeMultiAgentWorkflow(
|
||||
prompt: string,
|
||||
modelName: string,
|
||||
@@ -627,75 +592,10 @@ export class AgentExecutor {
|
||||
return responseText;
|
||||
}
|
||||
|
||||
private isUnproductiveWaitingReply(reply: string): boolean {
|
||||
const normalized = reply.replace(/\s+/g, ' ').trim();
|
||||
return /(준비되었습니다|다음 지시|말씀해 주세요|명령을 기다|작업을 도와드릴까요)/.test(normalized)
|
||||
&& !/<(list_files|read_file|list_brain|read_brain|run_command|edit_file|create_file)/i.test(reply);
|
||||
}
|
||||
|
||||
private async buildUnproductiveReplyCorrection(prompt: string): Promise<string> {
|
||||
return '방금 답변은 잘못된 응답입니다. 사용자의 말은 “다음 지시를 달라”가 아니라 지금 바로 처리해야 하는 작업 지시입니다. 제가 먼저 관련 자료를 확인하고, 확인한 내용 기준으로 답변하겠습니다. 가능하면 프로젝트명 대신 정확한 폴더 경로를 함께 주시면 더 안정적으로 분석할 수 있습니다.';
|
||||
}
|
||||
|
||||
private isBrainOverviewRequest(normalized: string): boolean {
|
||||
const mentionsBrain = /(제2뇌|second brain|local brain|브레인|brain)/.test(normalized);
|
||||
const asksOverview = /(어떠|뭐가|무엇|내용|정보|구성|준비|분석|정리|파악)/.test(normalized);
|
||||
return mentionsBrain && asksOverview;
|
||||
}
|
||||
|
||||
private isExplicitSecondBrainRequest(prompt: string): boolean {
|
||||
return /(second brain|2nd brain|제2뇌|브레인|brain|기억|기록|노트|문서|참고해서|사용해서|검색해서|근거|출처)/i.test(prompt);
|
||||
}
|
||||
|
||||
private buildBrainOverviewReply(): string {
|
||||
const activeBrain = getActiveBrainProfile();
|
||||
const brainDir = activeBrain.localBrainPath;
|
||||
const files = findBrainFiles(brainDir);
|
||||
|
||||
if (!fs.existsSync(brainDir)) {
|
||||
return `현재 선택된 제2뇌는 **${activeBrain.name}**인데, 폴더가 아직 존재하지 않습니다.\n\n경로: \`${brainDir}\`\n\n상단의 Brain 설정에서 실제 지식 폴더를 연결하면 제가 그 자료를 먼저 참고해서 답변하겠습니다.`;
|
||||
}
|
||||
|
||||
const entries = fs.readdirSync(brainDir, { withFileTypes: true })
|
||||
.filter((entry) => !entry.name.startsWith('.') && !EXCLUDED_DIRS.has(entry.name));
|
||||
|
||||
const directorySummaries = entries
|
||||
.filter((entry) => entry.isDirectory())
|
||||
.slice(0, 12)
|
||||
.map((entry) => {
|
||||
const dirPath = path.join(brainDir, entry.name);
|
||||
const count = findBrainFiles(dirPath).length;
|
||||
return `| \`${entry.name}/\` | ${count}개 문서 |`;
|
||||
});
|
||||
|
||||
const fileSummaries = entries
|
||||
.filter((entry) => entry.isFile() && entry.name.endsWith('.md'))
|
||||
.slice(0, 10)
|
||||
.map((entry) => `- ${entry.name}`);
|
||||
|
||||
const sections = [
|
||||
`현재 연결된 제2뇌 **${activeBrain.name}**의 개요입니다.`,
|
||||
'',
|
||||
'### 🧠 지식 베이스 현황',
|
||||
'| 항목 | 정보 |',
|
||||
'| :--- | :--- |',
|
||||
`| **위치** | \`${brainDir}\` |`,
|
||||
`| **문서 총계** | **${files.length}개** |`,
|
||||
activeBrain.description ? `| **설명** | ${activeBrain.description} |` : '| **설명** | 설정된 설명 없음 |',
|
||||
'',
|
||||
'### 📂 주요 카테고리',
|
||||
'| 폴더명 | 문서 수 |',
|
||||
'| :--- | :--- |',
|
||||
...(directorySummaries.length ? directorySummaries : ['| - | - |']),
|
||||
'',
|
||||
fileSummaries.length ? `### 📄 최근/주요 문서\n${fileSummaries.join('\n')}` : '',
|
||||
'',
|
||||
'이 자료들을 기반으로 답변을 최적화하겠습니다. 특정 주제에 대해 깊이 있는 분석이 필요하시면 말씀해 주세요.'
|
||||
].filter(Boolean);
|
||||
|
||||
return sections.join('\n');
|
||||
}
|
||||
|
||||
private isStaleRun(runId: number): boolean {
|
||||
return runId !== this.activeRunId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user