File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ export async function getAgentPrompt<T extends StringField>({
162162 return undefined
163163 }
164164
165- const prompt = await formatPrompt ( {
165+ let prompt = await formatPrompt ( {
166166 prompt : promptValue ,
167167 fileContext,
168168 agentState,
@@ -174,6 +174,11 @@ export async function getAgentPrompt<T extends StringField>({
174174
175175 let addendum = ''
176176
177+ if ( promptType . type === 'stepPrompt' && agentState . agentType ) {
178+ // Put step prompt within a system-reminder tag so agent doesn't think the user just spoke again.
179+ prompt = `<system-reminder>${ prompt } </system-reminder>`
180+ }
181+
177182 // Add tool instructions, spawnable agents, and output schema prompts to instructionsPrompt
178183 if ( promptType . type === 'instructionsPrompt' && agentState . agentType ) {
179184 const toolsInstructions = agentTemplate . inheritParentSystemPrompt
You can’t perform that action at this time.
0 commit comments