Skip to content

Conversation

@telnet2
Copy link
Owner

@telnet2 telnet2 commented Dec 7, 2025

Use git's initial commit SHA for project ID generation instead of
directory path hash. This ensures session compatibility between
TypeScript and Go OpenCode implementations.

Changes:

  • Add internal/project package with git-based project ID detection
  • Cache project ID in .git/opencode file (matching TS behavior)
  • Update session service to use new project ID mechanism
  • Add automatic migration from hash-based to git-based project IDs
  • Add migration from "global" project for non-git directories
  • Include comprehensive tests for project package

Use git's initial commit SHA for project ID generation instead of
directory path hash. This ensures session compatibility between
TypeScript and Go OpenCode implementations.

Changes:
- Add internal/project package with git-based project ID detection
- Cache project ID in .git/opencode file (matching TS behavior)
- Update session service to use new project ID mechanism
- Add automatic migration from hash-based to git-based project IDs
- Add migration from "global" project for non-git directories
- Include comprehensive tests for project package
Document the session management system including:
- Data structures (Session, Message, Part)
- Storage architecture and directory layout
- Project ID generation (git-based)
- Session lifecycle and recovery
- Migration system for legacy sessions
- API endpoints and compatibility notes
@telnet2 telnet2 merged commit fb60c02 into main Dec 7, 2025
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants