Module: Space::Architect::SessionSync::SessionId
- Defined in:
- lib/space_architect/session_sync/session_id.rb
Overview
Frozen session-id derivation rules for the two store shapes:
pi: <mangled-cwd>/<timestamp>_<sessionId>.jsonl -> part after the last "_"
claude: <mangled-cwd>/<sessionId>.jsonl -> basename minus ".jsonl"
Class Method Summary collapse
Class Method Details
.for_claude(path) ⇒ Object
15 16 17 |
# File 'lib/space_architect/session_sync/session_id.rb', line 15 def self.for_claude(path) File.basename(path, ".jsonl") end |
.for_pi(path) ⇒ Object
9 10 11 12 13 |
# File 'lib/space_architect/session_sync/session_id.rb', line 9 def self.for_pi(path) base = File.basename(path, ".jsonl") idx = base.rindex("_") idx ? base[(idx + 1)..] : base end |