Version 2.41.0 Release: Local Path Preflight expansion for knowledge creation
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
"name": "g1nation",
|
"name": "g1nation",
|
||||||
"displayName": "G1nation",
|
"displayName": "G1nation",
|
||||||
"description": "High-performance autonomous local AI coding agent for VS Code. Features vectorized inference, asynchronous task management, and 100% offline processing.",
|
"description": "High-performance autonomous local AI coding agent for VS Code. Features vectorized inference, asynchronous task management, and 100% offline processing.",
|
||||||
"version": "2.40.0",
|
"version": "2.41.0",
|
||||||
"publisher": "connectailab",
|
"publisher": "connectailab",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"icon": "assets/icon.png",
|
"icon": "assets/icon.png",
|
||||||
|
|||||||
+10
-8
@@ -724,9 +724,10 @@ export class AgentExecutor {
|
|||||||
|
|
||||||
const sections: string[] = [
|
const sections: string[] = [
|
||||||
'[LOCAL PROJECT PATH PREFLIGHT]',
|
'[LOCAL PROJECT PATH PREFLIGHT]',
|
||||||
'The user provided a local project path for review or analysis. Use this inspected context before asking for uploads.',
|
'The user provided a local project path for review, analysis, documentation, or knowledge creation. Use this inspected context before asking for uploads.',
|
||||||
'If access failed, explain the concrete failure. If access succeeded, proceed with code review from the scanned files.',
|
'If access failed, explain the concrete failure. If access succeeded, proceed with code review from the scanned files.',
|
||||||
'If access succeeded and priority file previews are present, do not say that code was not provided.'
|
'If access succeeded and priority file previews are present, do not say that code was not provided.',
|
||||||
|
'For knowledge creation requests, answer that the project can be summarized from the inspected local path and propose or execute a project knowledge note based on the previews.'
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const candidate of candidates.slice(0, 2)) {
|
for (const candidate of candidates.slice(0, 2)) {
|
||||||
@@ -737,7 +738,7 @@ export class AgentExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private shouldPreflightLocalProjectPath(prompt: string): boolean {
|
private shouldPreflightLocalProjectPath(prompt: string): boolean {
|
||||||
return /(검토|리뷰|분석|확인|봐줘|고쳐|개선|디버그|review|analy[sz]e|inspect|debug|fix|improve)/i.test(prompt)
|
return /(검토|리뷰|분석|확인|봐줘|고쳐|개선|디버그|지식|문서화|문서|정리|기록|위키|저장|만들|생성|knowledge|document|documentation|wiki|summari[sz]e|review|analy[sz]e|inspect|debug|fix|improve)/i.test(prompt)
|
||||||
&& /\/Volumes\/Data\/project\/Antigravity\/[^\s`"'<>]+/i.test(prompt);
|
&& /\/Volumes\/Data\/project\/Antigravity\/[^\s`"'<>]+/i.test(prompt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -805,8 +806,8 @@ export class AgentExecutor {
|
|||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
const asksForUpload = /(코드(?:를|가)?\s*업로드|파일(?:을|를)?\s*업로드|소스\s*코드(?:를)?\s*업로드|코드를 제공|파일을 제공|folder path is not enough|upload (?:the )?(?:source )?code|please provide (?:the )?files)/i.test(content);
|
const asksForUpload = /(코드(?:를|가)?\s*업로드|파일(?:을|를)?\s*업로드|소스\s*코드(?:를)?\s*업로드|코드를 제공|파일을 제공|핵심 파일(?:이나|과|을|를)?.*제공|파일 목록(?:이나|과|을|를)?.*제공|구조(?:를|와|나)?.*제공|자료(?:를|가)?.*필요|folder path is not enough|upload (?:the )?(?:source )?code|please provide (?:the )?files)/i.test(content);
|
||||||
const deniesCodeAccess = /(실제 코드 내용이 없|코드 내용이 없|코드가 없|코드를 볼 수 없|소스 코드를 볼 수 없|기술적인 진단.*수 없습니다)/i.test(content);
|
const deniesCodeAccess = /(실제 코드 내용이 없|코드 내용이 없|코드가 없|코드를 볼 수 없|소스 코드를 볼 수 없|실제 구현 자료가 없|실제 구현 근거 없이는|현재로서는.*자료가 없|기술적인 진단.*수 없습니다)/i.test(content);
|
||||||
if (!asksForUpload && !deniesCodeAccess) {
|
if (!asksForUpload && !deniesCodeAccess) {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
@@ -814,9 +815,9 @@ export class AgentExecutor {
|
|||||||
const header = [
|
const header = [
|
||||||
'## 경로 확인 결과',
|
'## 경로 확인 결과',
|
||||||
'',
|
'',
|
||||||
'제공된 로컬 프로젝트 경로에는 접근할 수 있고, 코드 파일도 확인되었습니다. 따라서 파일 업로드를 요청하는 대신, 확인된 파일 구조와 코드 프리뷰를 기준으로 리뷰를 진행해야 합니다.',
|
'제공된 로컬 프로젝트 경로에는 접근할 수 있고, 코드 파일도 확인되었습니다. 따라서 파일 업로드를 요청하는 대신, 확인된 파일 구조와 코드 프리뷰를 기준으로 분석하거나 프로젝트 지식을 만들 수 있습니다.',
|
||||||
'',
|
'',
|
||||||
'이전 응답의 "코드를 업로드해 주세요" 취지의 문장은 잘못된 안내입니다.'
|
'이전 응답의 "코드/파일/구조를 제공해 주세요" 취지의 문장은 잘못된 안내입니다.'
|
||||||
].join('\n');
|
].join('\n');
|
||||||
|
|
||||||
return [
|
return [
|
||||||
@@ -824,7 +825,8 @@ export class AgentExecutor {
|
|||||||
'',
|
'',
|
||||||
content
|
content
|
||||||
.replace(/.*(?:코드(?:를|가)?\s*업로드|파일(?:을|를)?\s*업로드|소스\s*코드(?:를)?\s*업로드|코드를 제공|파일을 제공).*$/gmi, '')
|
.replace(/.*(?:코드(?:를|가)?\s*업로드|파일(?:을|를)?\s*업로드|소스\s*코드(?:를)?\s*업로드|코드를 제공|파일을 제공).*$/gmi, '')
|
||||||
.replace(/.*(?:실제 코드 내용이 없|코드 내용이 없|코드가 없|코드를 볼 수 없|소스 코드를 볼 수 없).*$/gmi, '')
|
.replace(/.*(?:핵심 파일(?:이나|과|을|를)?.*제공|파일 목록(?:이나|과|을|를)?.*제공|구조(?:를|와|나)?.*제공|자료(?:를|가)?.*필요).*$/gmi, '')
|
||||||
|
.replace(/.*(?:실제 코드 내용이 없|코드 내용이 없|코드가 없|코드를 볼 수 없|소스 코드를 볼 수 없|실제 구현 자료가 없|실제 구현 근거 없이는|현재로서는.*자료가 없).*$/gmi, '')
|
||||||
.trim()
|
.trim()
|
||||||
].filter(Boolean).join('\n\n');
|
].filter(Boolean).join('\n\n');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,4 +57,31 @@ describe('local project path preflight', () => {
|
|||||||
expect(fixed).toContain('제공된 로컬 프로젝트 경로에는 접근할 수 있고');
|
expect(fixed).toContain('제공된 로컬 프로젝트 경로에는 접근할 수 있고');
|
||||||
expect(fixed).not.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('실제 구현 근거 없이는');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user