Update prompter.js

This commit is contained in:
Sweaterdog 2025-02-27 21:22:40 -08:00 committed by GitHub
parent 35022f2a16
commit 71749ec4d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -267,7 +267,8 @@ export class Prompter {
if (prompt.includes('$CONVO'))
prompt = prompt.replaceAll('$CONVO', 'Recent conversation:\n' + stringifyTurns(messages));
if (prompt.includes('$SELF_PROMPT')) {
let self_prompt = this.agent.self_prompter.on ? `YOUR CURRENT ASSIGNED GOAL: "${this.agent.self_prompter.prompt}"\n` : '';
// if active or paused, show the current goal
let self_prompt = !this.agent.self_prompter.isStopped() ? `YOUR CURRENT ASSIGNED GOAL: "${this.agent.self_prompter.prompt}"\n` : '';
prompt = prompt.replaceAll('$SELF_PROMPT', self_prompt);
}
if (prompt.includes('$LAST_GOALS')) {