Update actions.js

This commit is contained in:
Sweaterdog 2025-02-27 21:13:02 -08:00 committed by GitHub
parent 15eb0fd1c6
commit 37af374de3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,7 +49,7 @@ export const actionsList = [
agent.actions.cancelResume(); agent.actions.cancelResume();
agent.bot.emit('idle'); agent.bot.emit('idle');
let msg = 'Agent stopped.'; let msg = 'Agent stopped.';
if (agent.self_prompter.on) if (agent.self_prompter.isActive())
msg += ' Self-prompting still active.'; msg += ' Self-prompting still active.';
return msg; return msg;
} }
@ -362,8 +362,7 @@ export const actionsList = [
}, },
perform: async function (agent, prompt) { perform: async function (agent, prompt) {
if (convoManager.inConversation()) { if (convoManager.inConversation()) {
agent.self_prompter.setPrompt(prompt); agent.self_prompter.setPromptPaused(prompt);
convoManager.scheduleSelfPrompter();
} }
else { else {
agent.self_prompter.start(prompt); agent.self_prompter.start(prompt);
@ -375,7 +374,6 @@ export const actionsList = [
description: 'Call when you have accomplished your goal. It will stop self-prompting and the current action. ', description: 'Call when you have accomplished your goal. It will stop self-prompting and the current action. ',
perform: async function (agent) { perform: async function (agent) {
agent.self_prompter.stop(); agent.self_prompter.stop();
convoManager.cancelSelfPrompter();
return 'Self-prompting stopped.'; return 'Self-prompting stopped.';
} }
}, },