Skip to content

Commit 994e888

Browse files
committed
fix(agent-tars): correct instruction priority order
User instructions should have higher priority than system defaults. Place user instructions after system prompt with explicit priority.
1 parent 5803a64 commit 994e888

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

multimodal/agent-tars/core/src/agent-tars.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,16 @@ Current Working Directory: ${workspace}
123123
124124
`;
125125

126-
// Prepare system instructions with flexible layering support
127-
// Custom instructions take precedence and are placed first, followed by core system capabilities
126+
// Prepare system instructions with user instructions taking priority
127+
// Core system capabilities provide the foundation, but user instructions override behavior
128128
const instructions = options.instructions
129-
? `${options.instructions}
129+
? `${systemPrompt}
130130
131131
---
132132
133-
**Note: The following system capabilities and rules have higher priority and should be followed:**
133+
**User Instructions (Higher Priority):**
134134
135-
${systemPrompt}`
135+
${options.instructions}`
136136
: systemPrompt;
137137

138138
super({

0 commit comments

Comments
 (0)