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