Skip to content

Commit 07f933f

Browse files
committed
Only include <system_reminder> if step prompt is non-empty
1 parent 30052b2 commit 07f933f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/agent-runtime/src/templates/strings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export async function getAgentPrompt<T extends StringField>(
216216

217217
let addendum = ''
218218

219-
if (promptType.type === 'stepPrompt' && agentState.agentType) {
219+
if (promptType.type === 'stepPrompt' && agentState.agentType && prompt) {
220220
// Put step prompt within a system_reminder tag so agent doesn't think the user just spoke again.
221221
prompt = `<system_reminder>${prompt}</system_reminder>`
222222
}

0 commit comments

Comments
 (0)