fix: restrict stop command to /stop only

This commit is contained in:
Eyejoker
2026-03-29 18:48:06 +09:00
parent 05c06fc467
commit 338c1f6a1d

View File

@@ -34,7 +34,7 @@ export function extractSessionCommand(
if (text === '/compact') return '/compact';
if (text === '/clear') return '/clear';
if (text === '/review' || text === '/review-ready') return '/review';
if (text === '/stop' || text === '/cancel' || text === '/kill') return '/stop';
if (text === '/stop') return '/stop';
return null;
}
@@ -180,9 +180,7 @@ export async function handleSessionCommand(opts: {
const killed = deps.killProcess();
deps.advanceCursor(cmdMsg.timestamp);
await deps.sendMessage(
killed
? 'Agent stopped.'
: 'No agent is currently running in this room.',
killed ? 'Agent stopped.' : 'No agent is currently running in this room.',
);
return { handled: true, success: true };
}