Version 2.41.0 Release: Local Path Preflight expansion for knowledge creation

This commit is contained in:
g1nation
2026-05-03 00:49:08 +09:00
parent de6b8e3da0
commit 9403662ba3
3 changed files with 38 additions and 9 deletions
+27
View File
@@ -57,4 +57,31 @@ describe('local project path preflight', () => {
expect(fixed).toContain('제공된 로컬 프로젝트 경로에는 접근할 수 있고');
expect(fixed).not.toContain('코드를 업로드해 주시면');
});
it('treats project knowledge creation requests with local paths as inspectable work', () => {
const context: any = {
globalStorageUri: { fsPath: path.join(root, '.storage') },
workspaceState: stateStore(),
globalState: stateStore()
};
const agent = new AgentExecutor(context) as any;
const prompt = '그러면 지금 /Volumes/Data/project/Antigravity/ConnectAI 이 프로젝트에 대한 지식을 만들면 되는거 아니야?';
expect(agent.shouldPreflightLocalProjectPath(prompt)).toBe(true);
});
it('removes file-structure requests when knowledge creation path access already succeeded', () => {
const context: any = {
globalStorageUri: { fsPath: path.join(root, '.storage') },
workspaceState: stateStore(),
globalState: stateStore()
};
const agent = new AgentExecutor(context) as any;
const answer = '프로젝트에 대한 지식을 만들고 싶다면, 먼저 해당 프로젝트의 핵심 파일이나 구조를 저에게 제공해 주셔야 합니다. 실제 구현 근거 없이는 유용한 지식을 만들 수 없습니다.';
const fixed = agent.enforceLocalPathReviewAnswer(answer, 'Access: succeeded\nPriority file previews:\n### package.json');
expect(fixed).toContain('프로젝트 지식을 만들 수 있습니다');
expect(fixed).not.toContain('핵심 파일이나 구조를 저에게 제공');
expect(fixed).not.toContain('실제 구현 근거 없이는');
});
});