Repository navigation
Commit 01b9f18
opencloud-x
fix: migrate sessions when project ID changes after git init
When git init runs in a directory that already has opencode sessions,
the project ID changes from the global project to the git root commit
hash. Sessions linked to the old project ID become invisible in the TUI.
This adds a migration step in fromDirectory() that detects stale project
entries with the same worktree but different IDs, moves their sessions
to the current project, and removes the stale entries.
Fixes anomalyco#212301 parent 40e4cd2 commit 01b9f18
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
321 | 336 | | |
322 | 337 | | |
323 | 338 | | |
| |||
0 commit comments