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