chat: replace structured customization preview with markdown renderer, remove feature flag#314851
Draft
joshspicer wants to merge 2 commits intomainfrom
Draft
chat: replace structured customization preview with markdown renderer, remove feature flag#314851joshspicer wants to merge 2 commits intomainfrom
joshspicer wants to merge 2 commits intomainfrom
Conversation
Remove the 'chat.customizations.structuredPreview.enabled' setting and the custom front-matter/issues UI it gated. The customization editor preview now renders the markdown body directly via the sameIMarkdownRendererService renderer used everywhere else in VS instead of a bespoke structuredCode view with front-matter rows and error boxes. The preview/raw toggle button is preserved and still defaults to preview for agent, skill, instructions, and prompt files. - Remove ChatCustomizationsStructuredPreviewEnabled enum entry and config reg - Drop renderPreviewIssues, renderPreviewFrontMatter, renderPreviewAttribute, stringifyPreviewValue, toPreviewObject, and onStructuredPreviewSettingChanged - Remove editorPreviewIssuesContainer and editorPreviewFrontMatterContainer - Remove unused imports (IHeaderAttribute, IValue, getAttributeDefinition, getTarget) - Update tests and fixture; update AI_CUSTOMIZATIONS.md doc Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the Chat Customizations management editor’s markdown customization preview by removing the chat.customizations.structuredPreview.enabled feature flag and replacing the bespoke structured front-matter/issues UI with VS Code’s standard IMarkdownRendererService rendering of the markdown body.
Changes:
- Removed the
chat.customizations.structuredPreview.enabledconfiguration key (enum entry + configuration registration). - Simplified
AICustomizationManagementEditorpreview rendering to only render the parsed markdown body viaIMarkdownRendererService(no front-matter rows or header issue box). - Updated tests/fixtures/docs to reflect the always-on rendered preview behavior for supported markdown customization file types.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/test/browser/componentFixtures/sessions/aiCustomizationManagementEditor.fixture.ts | Drops the structured-preview config override from fixtures now that preview behavior is no longer flag-gated. |
| src/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationManagementEditor.test.ts | Removes tests tied to the old structured preview UI/setting; keeps mode button label/tooltip coverage. |
| src/vs/workbench/contrib/chat/common/constants.ts | Removes the ChatCustomizationsStructuredPreviewEnabled enum entry. |
| src/vs/workbench/contrib/chat/browser/chat.contribution.ts | Removes configuration registration for the deleted setting. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.ts | Removes structured preview UI pieces and renders only the markdown body via IMarkdownRendererService; updates tooltip copy. |
| src/vs/sessions/AI_CUSTOMIZATIONS.md | Updates Sessions documentation to describe the rendered markdown preview behavior. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 1
Comment on lines
1963
to
1968
| private isStructuredPreviewSupported(promptType: PromptsType | undefined): boolean { | ||
| if (this.configurationService.getValue<boolean>(ChatConfiguration.ChatCustomizationsStructuredPreviewEnabled) !== true) { | ||
| return false; | ||
| } | ||
| return promptType === PromptsType.agent | ||
| || promptType === PromptsType.skill | ||
| || promptType === PromptsType.instructions | ||
| || promptType === PromptsType.prompt; | ||
| } |
Contributor
|
Removing the dedicated frontmatter section 😥? |
Add 'chat.customizations.markdownPreview.enabled' (default: true) to let users disable the rendered markdown preview in the AI Customizations editor. When disabled the editor falls back to the raw code editor view, matching the previous behaviour before the preview was introduced. - Add ChatCustomizationsMarkdownPreviewEnabled enum entry and config registration - Check setting in isStructuredPreviewSupported - Add onMarkdownPreviewSettingChanged handler and wire up config listener - Add test coverage for the setting toggle Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes the
chat.customizations.structuredPreview.enabledsetting and replaces the custom front-matter/issues preview UI with a simple markdown render usingIMarkdownRendererService— the same renderer used throughout VS Code.Previously, when the setting was enabled, clicking a markdown customization file (agent, skill, instructions, prompt) in the AI Customizations editor would show:
Now the preview renders the full markdown body directly, without the front-matter or issues sections. The preview/raw toggle button is preserved and still defaults to preview for the supported file types.
Changes
src/vs/workbench/contrib/chat/common/constants.ts— RemoveChatCustomizationsStructuredPreviewEnabledenum entrysrc/vs/workbench/contrib/chat/browser/chat.contribution.ts— Remove config registration for the settingsrc/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.ts:renderPreviewIssues,renderPreviewFrontMatter,renderPreviewAttribute,stringifyPreviewValue,toPreviewObject,onStructuredPreviewSettingChangededitorPreviewIssuesContainerandeditorPreviewFrontMatterContainerDOM fieldsIHeaderAttribute,IValue,getAttributeDefinition,getTarget,Target)isStructuredPreviewSupportedno longer checks the removed setting — preview is always on for supported file typessrc/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationManagementEditor.test.ts— Remove tests that were specific to the old structured preview (front-matter help button, setting-off guards); keep editor-mode-button label/tooltip testssrc/vs/workbench/test/browser/componentFixtures/sessions/aiCustomizationManagementEditor.fixture.ts— Remove the setting override; fixtures use default configsrc/vs/sessions/AI_CUSTOMIZATIONS.md— Update documentation sectionTesting
npm run compile-check-ts-nativepasses