import: share dir-resolution and timestamp parsing across importers
main·
Commit

Factor the last cross-importer duplication into shared helpers:
- resolveDir (discover.go): the overridePath-or-GetSessionDir block every Discover repeated; each Discover now resolves the dir in one line.
- parseTimestamp (linesplit.go): the RFC3339-or-zero parse used by cursor, pi, copilot, claude, and codexLineTime.
With discoverSessionFiles, splitLineTurns, resolveDir, and parseTimestamp, all the agent-agnostic plumbing is now shared; what remains per importer is the genuinely format-specific part — prompt-line detection and which agent token/model parsing to call (per-turn import needs each prompt's native-space line offset, which no agent method exposes, so detection can't be reused from the agent layer). Pure refactor; behavior unchanged, verified against the importtest fixtures and existing tests.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com Entire-Checkpoint: 5041f405df33
Checkpoints
Following work done in https://github.com/entireio/cli/pull/1527, we want to extend the import capabilities to detect the other agents we support, including gemini, opencode, codex etc. Use existing p
Claude CodeOpus 4.8
View sessionCheckpoint 1