Skip to content

Fix global /hooks stealing claude /hooks#295896

Merged
roblourens merged 1 commit intomainfrom
roblou/attractive-ape
Feb 18, 2026
Merged

Fix global /hooks stealing claude /hooks#295896
roblourens merged 1 commit intomainfrom
roblou/attractive-ape

Conversation

@roblourens
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 18, 2026 00:57
@roblourens roblourens enabled auto-merge February 18, 2026 00:57
@roblourens roblourens self-assigned this Feb 18, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an issue where global slash commands were taking precedence over agent-specific subcommands when using a locked participant (agentIdSilent). The fix ensures that when a chat widget has a locked agent, slash commands are resolved in the context of that agent, preventing global slash commands from "stealing" the agent's subcommands.

Changes:

  • Added logic to set forcedAgent in the parser context when agentIdSilent is provided, ensuring agent subcommands take precedence over global slash commands with the same name

const commandPart = options.slashCommand ? ` ${chatSubcommandLeader}${options.slashCommand}` : '';
request = `${chatAgentLeader}${agent.name}${commandPart} ${request}`;
} else if (options?.agentIdSilent && !parserContext?.forcedAgent) {
// Resolve slash commandsin the context of locked participant so its subcommands take precedence over global
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

Spelling error: "commandsin" should be "commands in"

Suggested change
// Resolve slash commandsin the context of locked participant so its subcommands take precedence over global
// Resolve slash commands in the context of locked participant so its subcommands take precedence over global

Copilot uses AI. Check for mistakes.
@roblourens roblourens merged commit 8c4b950 into main Feb 18, 2026
23 of 24 checks passed
@roblourens roblourens deleted the roblou/attractive-ape branch February 18, 2026 01:20
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.

2 participants