Skip to content

Conversation

@planger
Copy link
Contributor

@planger planger commented Dec 5, 2025

What it does

On startup we can observe warnings like:

logger-protocol.ts:118 2025-12-05T18:17:54.751Z root WARN Command name 'clear' is used by multiple fragments: claude-code-slash-clear and claude-code-slash-clear

This is caused by a check for duplicates AFTER the command was actually already added. Also it does not take the agents for which it was defined into account.

How to test

Build and check that the logs are now gone.

To test whether the warning shows up correctly, you can change the registered commands in examples/api-samples/src/browser/chat/sample-chat-command-contribution.ts so they register for instance the command clear, which is also registered for ClaudeCode. When doing that, a warning should be logged.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

On startup we can observe warnings like:
```
logger-protocol.ts:118 2025-12-05T18:17:54.751Z root WARN Command name 'clear' is used by multiple fragments: claude-code-slash-clear and claude-code-slash-clear
```

This is caused by a check for duplicates AFTER the command was actually already added. Also it does not take the agents for which it was defined into account.
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Dec 5, 2025
@planger planger requested a review from ndoschek December 5, 2025 19:11
Copy link
Member

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

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

Thank you for the fix @planger, works great for me!
The warnings on startup are gone and the expected warning for a duplicate registration is logged as expected 👍

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Needs merge in PR Backlog Dec 9, 2025
@planger planger merged commit 370f458 into master Dec 9, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Dec 9, 2025
@github-actions github-actions bot added this to the 1.67.0 milestone Dec 9, 2025
@ndoschek ndoschek deleted the planger/fix-duplicate-command-check branch December 10, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants