fix: ensure selected agent prompt takes absolute precedence over default format
This commit is contained in:
+7
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user