-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Add diagnostics action for chat customizations #290659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds a new chat slash command (/config-info) intended to display diagnostic/status information about chat prompt-related configuration and discovered files (agents, instructions, prompt files, skills, and special instruction files).
Changes:
- Registers a new workbench contribution for the
/config-infoslash command. - Implements the
/config-infocommand logic to enumerate configured source folders and discovered prompt-related files. - Formats the collected status into a markdown tree rendered in chat.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/chat.contribution.ts | Wires the new ChatConfigInfoSlashCommandContribution into the workbench contributions so the command is available. |
| src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts | Implements command registration, discovery of prompt/agent/instruction/skill files, and markdown output formatting. |
Comments suppressed due to low confidence (4)
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts:221
displayPath: 'User Data'is shown to users in the markdown output but isn't localized. Please usenls.localize(...)(or reuse the existing localized label used elsewhere, e.g. promptsServiceImpl.ts:595) for this label.
paths.push({ uri: userDataPromptsHome, exists: userDataExists, storage: PromptsStorage.user, scanOrder: scanOrder++, displayPath: 'User Data', isDefault: true });
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts:96
- The fallback error report uses a hard-coded user-facing label (
"Error:") and string interpolation. Please localize the message vianls.localizeand use a placeholder for the error text so it can be translated correctly.
content: new MarkdownString(`**Error:** ${e instanceof Error ? e.message : String(e)}`),
kind: 'markdownContent'
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts:436
displayPath: 'User Data'is user-facing and should be localized (or reused from existing localized labels) for consistency with the rest of the output.
paths.push({ uri: userDataPromptsHome, exists: userDataExists, storage: PromptsStorage.user, scanOrder: scanOrder++, displayPath: 'User Data', isDefault: true });
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts:808
- The fallback extension group key uses the hard-coded string
'unknown', which is rendered to users in the markdown output. Please localize this (and/or avoid showing a sentinel value) so the output is consistent with other localized labels.
const extId = file.extensionId || 'unknown';
if (!filesByExtension.has(extId)) {
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoAction.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/actions/chatCustomizationDiagnosticsAction.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/chat/browser/actions/chatConfigInfoSlashCommand.ts
Outdated
Show resolved
Hide resolved
4118a5f to
333d59f
Compare
Uh oh!
There was an error while loading. Please reload this page.