From 5a8fc584777d9801b18c4a58af2c5d202170ff60 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 14 Sep 2026 07:56:02 -0700 Subject: [PATCH] refactor(ai-vault): keep fixed root segments compact --- src/main/ai-vault/remote-session-scanner-sources.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/ai-vault/remote-session-scanner-sources.ts b/src/main/ai-vault/remote-session-scanner-sources.ts index ffa4502fbed..f99bf5f1ec1 100644 --- a/src/main/ai-vault/remote-session-scanner-sources.ts +++ b/src/main/ai-vault/remote-session-scanner-sources.ts @@ -25,6 +25,9 @@ import type { RemoteSessionSource } from './remote-session-scanner-types' +const PI_SESSIONS_SEGMENTS = ['.pi', 'agent', 'sessions'] +const OMP_SESSIONS_SEGMENTS = ['.omp', 'agent', 'sessions'] + type RemoteContentParser = ( file: FileWithMtime, content: T, @@ -97,18 +100,12 @@ export function remoteSessionSources( ['.json'], parseDevinSessionContent ), - jsonlSource('pi', remoteHome, hostPlatform, ['.pi', 'agent', 'sessions'], piParser), + jsonlSource('pi', remoteHome, hostPlatform, PI_SESSIONS_SEGMENTS, piParser), ...(ompSessionsDir === '' ? [] : [ { - ...jsonlSource( - 'omp', - remoteHome, - hostPlatform, - ['.omp', 'agent', 'sessions'], - ompParser - ), + ...jsonlSource('omp', remoteHome, hostPlatform, OMP_SESSIONS_SEGMENTS, ompParser), ...(ompSessionsDir === undefined ? {} : { rootDir: ompSessionsDir }), partitionSubagentTranscripts: partitionOmpSubagentTranscriptPaths }