fix: ensure selected agent prompt takes absolute precedence over default format

This commit is contained in:
2026-05-06 13:42:46 +09:00
parent c22fc8cc3d
commit 41bab1103a
3 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "astra",
"version": "2.80.2",
"version": "2.80.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "astra",
"version": "2.80.2",
"version": "2.80.3",
"license": "MIT",
"dependencies": {
"marked": "^18.0.2",
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "astra",
"displayName": "Astra",
"description": "The personal intelligence layer for Antigravity and VS Code. A private cognitive partner for deep project context, memory, and proactive strategic decision-making.",
"version": "2.80.2",
"version": "2.80.3",
"publisher": "g1nation",
"license": "MIT",
"icon": "assets/icon.png",
+7 -1
View File
@@ -403,7 +403,13 @@ export class AgentExecutor {
"- [충돌] 지식 간 충돌 발생 시 시스템이 독단적으로 판단하지 말고, 반드시 [CONFLICT WARNING] 플래그와 함께 상충되는 두 관점을 모두 명시하여 사용자에게 판단을 위임할 것."
].join('\n');
const fullSystemPrompt = `${agentSkillCtx}\n\n${systemPrompt}${internetCtx}${memoryCtx}${designerCtx}${localProjectKnowledgeCtx}${thinkingPartnerCtx}${astraStanceCtx}${secondBrainTraceCtx}${v4PolicyCtx}\n\n[CONTEXT]\n${brainContext}${brainInventoryCtx}\n${contextBlock}${negativeCtx}`;
// [Critical Fix] 에이전트 스킬이 있을 경우 기본 포맷(## 요약/상세 설명)보다 에이전트 프롬프트를 우선시하도록 지시
let coreSystemPrompt = systemPrompt;
if (options.agentSkillContext) {
coreSystemPrompt = `${systemPrompt}\n\n[SELECTED AGENT MODE ACTIVE]\nYou are now operating in a specialized Agent Mode. The instructions below take ABSOLUTE PRECEDENCE over your default persona and default output formats (like ## 요약, ## 상세 설명). Follow the format and role specified in the selected agent mode strictly.\n${agentSkillCtx}`;
}
const fullSystemPrompt = `${coreSystemPrompt}${internetCtx}${memoryCtx}${designerCtx}${localProjectKnowledgeCtx}${thinkingPartnerCtx}${astraStanceCtx}${secondBrainTraceCtx}${v4PolicyCtx}\n\n[CONTEXT]\n${brainContext}${brainInventoryCtx}\n${contextBlock}${negativeCtx}`;
const messagesForRequest: ChatMessage[] = [
{ role: 'system', content: fullSystemPrompt, internal: true },
...reqMessages