Version 2.46.0 Release: Autonomous Anti-Blocking Generation and Trace Relevance Refinement
This commit is contained in:
@@ -101,9 +101,9 @@ describe('local project path preflight', () => {
|
||||
'src/',
|
||||
'src/agent.ts',
|
||||
'Priority file previews:',
|
||||
'### package.json',
|
||||
'File: package.json',
|
||||
'{"name":"g1nation"}',
|
||||
'### src/agent.ts',
|
||||
'File: src/agent.ts',
|
||||
'export class AgentExecutor {}'
|
||||
].join('\n');
|
||||
|
||||
@@ -125,4 +125,53 @@ describe('local project path preflight', () => {
|
||||
|
||||
expect(agent.isBlockingProjectKnowledgeAnswer(answer)).toBe(true);
|
||||
});
|
||||
|
||||
it('extracts only preview file markers, not markdown headings inside previews', () => {
|
||||
const context: any = {
|
||||
globalStorageUri: { fsPath: path.join(root, '.storage') },
|
||||
workspaceState: stateStore(),
|
||||
globalState: stateStore()
|
||||
};
|
||||
const agent = new AgentExecutor(context) as any;
|
||||
const localPathContext = [
|
||||
'Priority file previews:',
|
||||
'File: README.md',
|
||||
'### 1. 벡터화된 고성능 추론 엔진',
|
||||
'File: src/agent.ts',
|
||||
'export class AgentExecutor {}'
|
||||
].join('\n');
|
||||
|
||||
expect(agent.extractPriorityPreviewFiles(localPathContext)).toEqual(['README.md', 'src/agent.ts']);
|
||||
});
|
||||
|
||||
it('writes a project knowledge record for accessible local project context', () => {
|
||||
const context: any = {
|
||||
globalStorageUri: { fsPath: path.join(root, '.storage') },
|
||||
workspaceState: stateStore(),
|
||||
globalState: stateStore()
|
||||
};
|
||||
const agent = new AgentExecutor(context) as any;
|
||||
const localPathContext = [
|
||||
`Path: ${root}`,
|
||||
'Access: succeeded',
|
||||
'Type: directory',
|
||||
'Scanned tree:',
|
||||
'package.json',
|
||||
'src/',
|
||||
'Priority file previews:',
|
||||
'File: package.json',
|
||||
'{"name":"g1nation"}',
|
||||
'File: src/features/game/systems/CombatSystem.ts',
|
||||
'export class CombatSystem {}'
|
||||
].join('\n');
|
||||
|
||||
const record = agent.writeProjectKnowledgeRecord(localPathContext);
|
||||
|
||||
expect(record?.filePath).toBeTruthy();
|
||||
expect(fs.existsSync(record.filePath)).toBe(true);
|
||||
const content = fs.readFileSync(record.filePath, 'utf8');
|
||||
expect(content).toContain('Project Knowledge Overview');
|
||||
expect(content).toContain('package.json');
|
||||
expect(content).toContain('src/features/game/systems/CombatSystem.ts');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -242,6 +242,18 @@ describe('Second Brain Trace', () => {
|
||||
].join('\n'),
|
||||
'utf8'
|
||||
);
|
||||
fs.writeFileSync(
|
||||
path.join(root, 'Project_Logs', '2026-04-26-Skybound_User_Decision.md'),
|
||||
[
|
||||
'# Skybound User Decision',
|
||||
'',
|
||||
'## Decision',
|
||||
'Reward card clarity was improved.',
|
||||
'- `/Volumes/Data/project/Antigravity/Skybound/src/features/game/hooks/useGameEngine.ts`',
|
||||
'project antigravity connectai knowledge documentation'
|
||||
].join('\n'),
|
||||
'utf8'
|
||||
);
|
||||
|
||||
const trace = buildSecondBrainTrace(
|
||||
'그러면 지금 /Volumes/Data/project/Antigravity/ConnectAI 프로젝트에 대한 지식을 만들어',
|
||||
@@ -251,6 +263,9 @@ describe('Second Brain Trace', () => {
|
||||
|
||||
expect(trace.retrievedDocuments[0].path).toContain('ConnectAI_Project_Knowledge.md');
|
||||
expect(trace.retrievedDocuments[0].path).not.toContain('Datacollector');
|
||||
const skybound = trace.retrievedDocuments.find((doc) => doc.path.includes('Skybound'));
|
||||
expect(skybound?.canSupportProjectClaim).not.toBe(true);
|
||||
expect(trace.projectClaimPolicy).not.toBe('cautious');
|
||||
} finally {
|
||||
fs.rmSync(root, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user