You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Establish a proper foreign key relationship between OpenCode sessions and workflow state instead of relying on file modification times.
Changes:
- Add SessionMetadata interface to core types with referenceId and createdAt
- Extend ConversationState with optional sessionMetadata field
- Extend ServerContext to include sessionMetadata property
- Add setSessionMetadata/getSessionMetadata methods to ConversationManager
- Update ConversationManager to store sessionMetadata when creating new conversation states
- Pass sessionMetadata from OpenCode plugin to ServerContext at initialization
- Capture OpenCode sessionID in chat.message hook for use in subsequent operations
- Implement sessionId-based lookup in TUI plugin (readStateBySessionId)
- Keep mtime-based fallback in TUI plugin for backward compatibility
- Export SessionMetadata type from mcp-server for external use
This enables the TUI plugin to correctly display the active phase of the current OpenCode session instead of always showing the most recently modified workflow's phase.
0 commit comments