Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/extension/prompts/node/agent/xAIPrompts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ class DefaultGrokCodeFastAgentPrompt extends PromptElement<DefaultAgentPromptPro
class XAIPromptResolver implements IAgentPrompt {
static readonly familyPrefixes = ['grok-code'];

static matchesModel(endpoint: IChatEndpoint): Promise<boolean> | boolean {
return endpoint.family === 'xAI';
}
Comment on lines +124 to +126
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

The matchesModel implementation checks for endpoint.family === 'xAI', while familyPrefixes is set to ['grok-code']. This creates a discrepancy where the matcher uses the family property ('xAI') but the prefix fallback uses a different value ('grok-code'). According to the PromptRegistry.getPrompt logic, matchers are checked first, so the prefix list may never be used for xAI endpoints. Consider either aligning the familyPrefixes with the actual family name (e.g., ['xAI']) or documenting why these values differ.

Copilot uses AI. Check for mistakes.

resolvePrompt(endpoint: IChatEndpoint): PromptConstructor | undefined {
return DefaultGrokCodeFastAgentPrompt;
}
Expand Down
Loading