fix: require explicit system event session keys
This commit is contained in:
@@ -14,6 +14,7 @@ const mocks = vi.hoisted(() => ({
|
||||
systemSent: true,
|
||||
},
|
||||
}),
|
||||
resolveMainSessionKey: vi.fn().mockReturnValue("agent:main:main"),
|
||||
resolveStorePath: vi.fn().mockReturnValue("/tmp/sessions.json"),
|
||||
webAuthExists: vi.fn().mockResolvedValue(true),
|
||||
getWebAuthAgeMs: vi.fn().mockReturnValue(5000),
|
||||
@@ -23,6 +24,7 @@ const mocks = vi.hoisted(() => ({
|
||||
|
||||
vi.mock("../config/sessions.js", () => ({
|
||||
loadSessionStore: mocks.loadSessionStore,
|
||||
resolveMainSessionKey: mocks.resolveMainSessionKey,
|
||||
resolveStorePath: mocks.resolveStorePath,
|
||||
}));
|
||||
vi.mock("../web/session.js", () => ({
|
||||
|
||||
@@ -9,6 +9,7 @@ import { withProgress } from "../cli/progress.js";
|
||||
import { loadConfig, resolveGatewayPort } from "../config/config.js";
|
||||
import {
|
||||
loadSessionStore,
|
||||
resolveMainSessionKey,
|
||||
resolveStorePath,
|
||||
type SessionEntry,
|
||||
} from "../config/sessions.js";
|
||||
@@ -77,7 +78,8 @@ export async function getStatusSummary(): Promise<StatusSummary> {
|
||||
colorize: true,
|
||||
includeAllowFrom: true,
|
||||
});
|
||||
const queuedSystemEvents = peekSystemEvents();
|
||||
const mainSessionKey = resolveMainSessionKey(cfg);
|
||||
const queuedSystemEvents = peekSystemEvents(mainSessionKey);
|
||||
|
||||
const resolved = resolveConfiguredModelRef({
|
||||
cfg,
|
||||
|
||||
Reference in New Issue
Block a user