Skip to content

Commit 2ef8c29

Browse files
committed
fix(hooks): append system prompt to last output part
1 parent 787d026 commit 2ef8c29

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/hooks.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ export function createSystemPromptHandler(
9292
return
9393
}
9494

95-
output.system.push(renderSystemPrompt(flags))
95+
const newPrompt = renderSystemPrompt(flags)
96+
if (output.system.length > 0) {
97+
output.system[output.system.length - 1] += "\n\n" + newPrompt
98+
} else {
99+
output.system.push(newPrompt)
100+
}
96101
}
97102
}
98103

0 commit comments

Comments
 (0)