fix: /clear now resets both owner and reviewer sessions in paired rooms

This commit is contained in:
Eyejoker
2026-03-29 19:00:42 +09:00
parent a1e5418a2f
commit 9e0de1297c
10 changed files with 87 additions and 36 deletions

View File

@@ -73,7 +73,7 @@ export interface SessionCommandDeps {
onOutput: (result: AgentResult) => Promise<void>,
) => Promise<'success' | 'error'>;
closeStdin: () => void;
clearSession: () => void;
clearSession: (opts?: { allRoles?: boolean }) => void;
advanceCursor: (timestamp: string) => void;
formatMessages: (msgs: NewMessage[], timezone: string) => string;
isAdminSender: (msg: NewMessage) => boolean;
@@ -158,7 +158,7 @@ export async function handleSessionCommand(opts: {
if (command === '/clear') {
deps.closeStdin();
deps.clearSession();
deps.clearSession({ allRoles: true });
deps.advanceCursor(cmdMsg.timestamp);
await deps.sendMessage(
'Current session cleared. The next message will start a new conversation.',