fix: block slash command queueing while agent is running (#983)

This commit is contained in:
Charles Packer
2026-02-16 15:58:59 -08:00
committed by GitHub
parent cd7ae1edea
commit 408bb8e81e

View File

@@ -5693,6 +5693,15 @@ export default function App({
setDequeueEpoch((e) => e + 1);
}
const isSlashCommand = userTextForInput.startsWith("/");
if (isAgentBusy() && isSlashCommand) {
const attemptedCommand = userTextForInput.split(/\s+/)[0] || "/";
const disabledMessage = `'${attemptedCommand}' is disabled while the agent is running.`;
const cmd = commandRunner.start(userTextForInput, disabledMessage);
cmd.fail(disabledMessage);
return { submitted: true }; // Clears input
}
// Interactive slash commands (like /memory, /model, /agents) bypass queueing
// so users can browse/view while the agent is working.
// Changes made in these overlays will be queued until end_turn.