Skip to content

Fix Claude customization migration targets - #334942

Open
Martin Aeschlimann (aeschli) wants to merge 3 commits into
mainfrom
fix/claude-customization-migrations
Open

Fix Claude customization migration targets#334942
Martin Aeschlimann (aeschli) wants to merge 3 commits into
mainfrom
fix/claude-customization-migrations

Conversation

@aeschli

Copy link
Copy Markdown
Contributor

Summary

Publishes writable Claude agents, skills, and rules directory customizations for every workspace and user scope, including empty directories. This allows the migration service to retain legacy customization candidates that have a valid Claude destination but no existing Claude customization of that type.

Adds focused discovery coverage for empty workspace and user migration targets while preserving coverage of populated directories.

Fixes #334938

Testing

  • ./scripts/test.sh --run src/vs/platform/agentHost/test/node/customizations/claudeSessionCustomizationDiscovery.test.ts

Fixes #334938

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Equal workspace and user scope buckets must be deduplicated to prevent ambiguous duplicate targets.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity src/​vs/​platform/​agentHost/​node/​claude/​customizations/​claudeSessionCustomizationDiscovery.ts — When a workspace root equals userHome (the existing “preserves single-root workspace attribution”…
What changed in this PR

Publishes writable Claude customization directories, including empty migration targets.

Changes:

  • Emits agent, skill, and rule directories across workspace and user scopes.
  • Adds coverage for empty and populated targets.
File Description
src/​vs/​platform/​agentHost/​test/​node/​customizations/​claudeSessionCustomizationDiscovery.test.ts Updates discovery expectations and coverage.
src/​vs/​platform/​agentHost/​node/​claude/​customizations/​claudeSessionCustomizationDiscovery.ts Publishes migration targets, but can duplicate targets when a workspace root equals the user home.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +154 to +158
result.push(
makeDirectory(bucket.base, 'agents', CustomizationType.Agent, bucket.agents),
makeDirectory(bucket.base, 'skills', CustomizationType.Skill, bucket.skills),
makeDirectory(bucket.base, 'rules', CustomizationType.Rule, bucket.rules),
);
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Claude does not return DirectoryCustomization for empty target directories

3 participants