Planning fixes
This commit is contained in:
@@ -26,6 +26,7 @@ const sessions = new Map<string, PlanningSession>();
|
||||
vi.mock("../planning.js", () => ({
|
||||
getSession: (id: string) => sessions.get(id),
|
||||
getSummary: (id: string) => sessions.get(id)?.summary,
|
||||
releaseSession: vi.fn(),
|
||||
cleanupSession: vi.fn(),
|
||||
formatInterviewQA: vi.fn(() => ""),
|
||||
mergePlanningSubtaskDrafts: vi.fn((_sessionId: string, subtasks: unknown[]) => subtasks),
|
||||
|
||||
@@ -407,7 +407,12 @@ function cleanupInMemorySession(sessionId: string): boolean {
|
||||
|
||||
if (session.agent) {
|
||||
try {
|
||||
session.agent.session.dispose?.();
|
||||
const disposeResult = session.agent.session.dispose?.();
|
||||
if (disposeResult) {
|
||||
disposeResult.catch((err: unknown) => {
|
||||
diagnostics.errorFromException("Error disposing agent for session", err, { sessionId, operation: "dispose-session" });
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
diagnostics.errorFromException("Error disposing agent for session", err, { sessionId, operation: "dispose-session" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user