Version 2.50.0 Release: Autonomous Turn-Based Recording and UI Streamlining
This commit is contained in:
@@ -235,4 +235,68 @@ describe('local project path preflight', () => {
|
||||
expect(requestHistory[1].content).not.toContain('Datacollector');
|
||||
expect(requestHistory[1].content).not.toContain('2nd Brain Trace');
|
||||
});
|
||||
|
||||
it('adds visible evidence when answering from recent project knowledge context', () => {
|
||||
const context: any = {
|
||||
globalStorageUri: { fsPath: path.join(root, '.storage') },
|
||||
workspaceState: stateStore(),
|
||||
globalState: stateStore()
|
||||
};
|
||||
const agent = new AgentExecutor(context) as any;
|
||||
const recordPath = '/Volumes/Data/project/Antigravity/ConnectAI/docs/records/ConnectAI/development/2026-05-02_connectai_project_knowledge_overview.md';
|
||||
const recentContext = [
|
||||
'[RECENT LOCAL PROJECT KNOWLEDGE]',
|
||||
`Use this recently generated project knowledge record as project evidence: ${recordPath}`,
|
||||
'',
|
||||
'# ConnectAI Project Knowledge Overview',
|
||||
'',
|
||||
'## Evidence Files',
|
||||
'- `package.json`',
|
||||
'- `src/agent.ts`',
|
||||
'- `src/sidebarProvider.ts`'
|
||||
].join('\n');
|
||||
const answer = '## 간단 요약\nConnectAI 아키텍처는 실행 흐름 분리를 중심으로 구성됩니다.';
|
||||
|
||||
const fixed = agent.ensureRecentProjectKnowledgeEvidence(answer, recentContext);
|
||||
|
||||
expect(fixed).toContain('## 근거');
|
||||
expect(fixed).toContain(recordPath);
|
||||
expect(fixed).toContain('`src/agent.ts`');
|
||||
expect(fixed).toContain('최근 생성된 프로젝트 지식 기록');
|
||||
});
|
||||
|
||||
it('adds visible evidence when answering from an explicit local project path', () => {
|
||||
const context: any = {
|
||||
globalStorageUri: { fsPath: path.join(root, '.storage') },
|
||||
workspaceState: stateStore(),
|
||||
globalState: stateStore()
|
||||
};
|
||||
const agent = new AgentExecutor(context) as any;
|
||||
const localPathContext = [
|
||||
'Path: /Volumes/Data/project/Antigravity/ConnectAI',
|
||||
'Access: succeeded',
|
||||
'Type: directory',
|
||||
'Scanned tree:',
|
||||
'package.json',
|
||||
'src/agent.ts',
|
||||
'Priority file previews:',
|
||||
'File: package.json',
|
||||
'```json',
|
||||
'{"name":"connectai"}',
|
||||
'```',
|
||||
'File: src/agent.ts',
|
||||
'```ts',
|
||||
'export class AgentExecutor {}',
|
||||
'```'
|
||||
].join('\n');
|
||||
const answer = '## 간단 요약\nConnectAI 아키텍처는 실행 흐름 분리를 중심으로 구성됩니다.';
|
||||
|
||||
const fixed = agent.ensureLocalProjectPathEvidence(answer, localPathContext);
|
||||
|
||||
expect(fixed).toContain('## 근거');
|
||||
expect(fixed).toContain('/Volumes/Data/project/Antigravity/ConnectAI');
|
||||
expect(fixed).toContain('`package.json`');
|
||||
expect(fixed).toContain('`src/agent.ts`');
|
||||
expect(fixed).toContain('로컬 프로젝트 경로');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user