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

@@ -101,7 +101,7 @@ export interface MessageRuntimeDeps {
getLastAgentTimestamps: () => Record<string, string>;
saveState: () => void;
persistSession: (groupFolder: string, sessionId: string) => void;
clearSession: (groupFolder: string) => void;
clearSession: (groupFolder: string, opts?: { allRoles?: boolean }) => void;
}
export function createMessageRuntime(deps: MessageRuntimeDeps): {
@@ -542,7 +542,7 @@ export function createMessageRuntime(deps: MessageRuntimeDeps): {
deps.queue.closeStdin(chatJid, {
reason: 'session-command',
}),
clearSession: () => deps.clearSession(group.folder),
clearSession: (opts) => deps.clearSession(group.folder, opts),
advanceCursor: (cursorOrTimestamp) => {
advanceLastAgentCursor(
deps.getLastAgentTimestamps(),