Key conversation history by project path, not workspace identity#210
Open
leonidasbarkas98-cpu wants to merge 1 commit into
Open
Key conversation history by project path, not workspace identity#210leonidasbarkas98-cpu wants to merge 1 commit into
leonidasbarkas98-cpu wants to merge 1 commit into
Conversation
Conversation files (storageUri/conversations) and the index (workspaceState) were both scoped to the VS Code workspace identity, so opening the same folder directly vs. through a .code-workspace file produced two separate histories (andrepimenta#123). - new project key: sha256 over the normalized (win32: lowercased) path of the primary workspace folder, 16 hex chars; 'no-workspace' when no folder is open, - conversation files now live in globalStorageUri/conversations/<projectKey>/, the index in globalState['claude.conversationIndex::<projectKey>'], - one-time idempotent migration copies (never moves) legacy files and merges the legacy index (dedupe by filename, cap 50); the migrated flag is only set once every copy succeeded, so a failed copy is retried on the next start; legacy data stays in place as rollback, - the legacy index fallback in the constructor is gated on the migration flag so an intentionally cleared history stays empty instead of resurrecting legacy entries, - multi-root (andrepimenta#22): new setting claudeCodeChat.workspace.root picks the workspace folder used as Claude's cwd and backup root; empty default keeps today's behavior (first folder). Claude runs and checkpoints follow the chosen root via _getPrimaryWorkspaceFolder(). Out of scope (follow-ups): storing history inside the project (andrepimenta#124), moving the backup git repo and permissions.json off the workspace identity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Conversation files (
storageUri/conversations) and the index (workspaceState) were both scoped to the VS Code workspace identity, so opening the same folder directly vs. through a.code-workspacefile produced two separate histories (#123).Changes:
globalStorageUri/conversations/<projectKey>/, the index inglobalState['claude.conversationIndex::<projectKey>'].claudeCodeChat.workspace.rootpicks the workspace folder used as Claude's cwd and backup root; the empty default keeps today's behavior (first folder).Out of scope (possible follow-ups): storing history inside the project (#124), moving the backup git repo and permissions.json off the workspace identity.
Addresses #123 and #22. Based on current main (ab6e307),
tsc --noEmitclean, no new dependencies.