(path string, records []map[string]any)
| 557 | func (s *Store) migrateLegacySession(sessionID string) { |
| 558 | mappings := []struct { |
| 559 | old string |
| 560 | new string |
| 561 | }{ |
| 562 | {filepath.Join(s.dir, sessionID+".jsonl"), s.sessionPath(sessionID)}, |
| 563 | {filepath.Join(s.dir, sessionID+".meta.json"), s.metaPath(sessionID)}, |
| 564 | {filepath.Join(s.dir, sessionID+".state.json"), s.statePath(sessionID)}, |
| 565 | {filepath.Join(s.dir, sessionID+".skill-recovery.json"), s.skillRecoveryPath(sessionID)}, |
| 566 | {filepath.Join(s.dir, sessionID+".skill-recovery.commit.json"), s.skillRecoveryCommitPath(sessionID)}, |
| 567 | {filepath.Join(s.dir, sessionID+".tasks.json"), s.taskRuntimePath(sessionID)}, |
| 568 | {filepath.Join(s.dir, sessionID+".sqlite"), s.sqlitePath(sessionID)}, |
| 569 | {filepath.Join(s.dir, sessionID+".transcript.md"), filepath.Join(s.sessionDir(sessionID), "transcript.md")}, |
| 570 | } |
| 571 | for _, mapping := range mappings { |
| 572 | if _, err := os.Stat(mapping.old); err != nil { |
| 573 | continue |
| 574 | } |
no test coverage detected