mirror of
https://github.com/stablyai/orca.git
synced 2026-09-26 16:02:43 +00:00
refactor(ai-vault): inline fixed Pi and OMP root segments
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user