diff --git a/src/main/ai-vault/remote-session-scanner-sources.ts b/src/main/ai-vault/remote-session-scanner-sources.ts index ae75a7198ce..ffa4502fbed 100644 --- a/src/main/ai-vault/remote-session-scanner-sources.ts +++ b/src/main/ai-vault/remote-session-scanner-sources.ts @@ -17,7 +17,6 @@ import { parseHermesSessionContent } from './session-scanner-hermes-parser' import { partitionSubagentTranscriptPaths } from './session-scanner-subagent-transcripts' import { partitionOmpSubagentTranscriptPaths } from './session-scanner-omp-subagent-transcripts' import type { FileWithMtime } from './session-scanner-types' -import { normalizeAgentSessionsDir } from './session-scanner-values' import { remoteCodexIndexedTitleReader } from './remote-session-scanner-codex-index' import { remoteClineSource } from './remote-session-scanner-cline-source' import type { @@ -98,12 +97,18 @@ export function remoteSessionSources( ['.json'], parseDevinSessionContent ), - jsonlSource('pi', remoteHome, hostPlatform, remotePiSessionsSegments(), piParser), + jsonlSource('pi', remoteHome, hostPlatform, ['.pi', 'agent', 'sessions'], piParser), ...(ompSessionsDir === '' ? [] : [ { - ...jsonlSource('omp', remoteHome, hostPlatform, remoteOmpSessionsSegments(), ompParser), + ...jsonlSource( + 'omp', + remoteHome, + hostPlatform, + ['.omp', 'agent', 'sessions'], + ompParser + ), ...(ompSessionsDir === undefined ? {} : { rootDir: ompSessionsDir }), partitionSubagentTranscripts: partitionOmpSubagentTranscriptPaths } @@ -314,14 +319,6 @@ function remotePathSegments(path: string): string[] { return path.replace(/\\/g, '/').split('/').filter(Boolean) } -function remotePiSessionsSegments(): string[] { - return normalizeAgentSessionsDir('/.pi/agent/sessions', '.pi').split('/').filter(Boolean) -} - -function remoteOmpSessionsSegments(): string[] { - return normalizeAgentSessionsDir('/.omp/agent/sessions', '.omp').split('/').filter(Boolean) -} - // Why: remote roots are posix regardless of the client platform, so these stay literal // rather than round-tripping through a local-platform path join that would emit // backslashes on a Windows client and collapse into a single bogus segment.