Skip to content

Commit 696ea9f

Browse files
committed
perf: load app-log cleanup on demand in session teardown
Binding app-log capture through the session capture binding pulled that module into session-teardown's eager closure. Teardown now imports the app-log resource only when a session has an app log to stop.
1 parent bef2ebb commit 696ea9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/daemon/session-teardown.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { emitDiagnostic } from '@agent-device/host-kit/diagnostics';
33
import { cleanupRetainedMaterializedPathsForSession } from './materialized-path-registry.ts';
44
import type { SessionState } from './session-state.ts';
55
import type { SessionStore } from './session-store.ts';
6-
import { forceCleanupSessionAppLog } from './app-log-session-resource.ts';
76
import { appLogResourceStore } from './app-log-resource-store.ts';
87
import { finishLiveAudioProbe } from '@agent-device/capture-kit/audio-probe-session-resource';
98
import { finishLivePerfCapture } from '@agent-device/capture-kit/perf-capture-session-resource';
@@ -18,6 +17,7 @@ export async function stopSessionAppLog(params: {
1817
}): Promise<void> {
1918
const { session, sessionName, sessionStore } = params;
2019
if (!session.appLog) return;
20+
const { forceCleanupSessionAppLog } = await import('./app-log-session-resource.ts');
2121
await forceCleanupSessionAppLog({
2222
session,
2323
sessionName,

0 commit comments

Comments
 (0)