add ChatSessionCustomizationItem.source, clean up AICustomizationPromptsStorage#317555
Open
aeschli wants to merge 8 commits into
Open
add ChatSessionCustomizationItem.source, clean up AICustomizationPromptsStorage#317555aeschli wants to merge 8 commits into
aeschli wants to merge 8 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes AI customization “origin” handling by introducing a first-class source field (including a new 'builtin' source) and refactoring existing “storage” plumbing to use the new AICustomizationSource/AICustomizationSources types across the workbench, sessions window, API DTOs, and Copilot extension providers.
Changes:
- Add/propagate a required
sourcefor chat session customization items and extend chat resource sources with'builtin'. - Refactor AI customization filtering/grouping logic from “storage” to “source” (including new
applySourceFilter). - Update tests and Copilot extension providers to supply and validate
source.
Show a summary per file
| File | Description |
|---|---|
| src/vscode-dts/vscode.proposed.chatSessionCustomizationProvider.d.ts | Adds source to ChatSessionCustomizationItem and declares ChatResourceSource. |
| src/vscode-dts/vscode.proposed.chatPromptFiles.d.ts | Extends ChatResourceSource with 'builtin'. |
| src/vs/workbench/contrib/chat/test/common/customizationHarnessService.test.ts | Updates harness tests to use AICustomizationSources and required source. |
| src/vs/workbench/contrib/chat/test/browser/aiCustomization/applyStorageSourceFilter.test.ts | Updates filter tests to the new applySourceFilter + source-based items. |
| src/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationManagementEditor.test.ts | Renames editor state from storage to source in tests. |
| src/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationItemsModel.test.ts | Updates model expectations from storage to source (incl. builtin handling). |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/enumerateLocalCustomizationsForHarness.test.ts | Updates enumeration tests to assert source values. |
| src/vs/workbench/contrib/chat/common/customizationHarnessService.ts | Updates customization item contract to require source and updates harness helpers. |
| src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.ts | Introduces AICustomizationSource(s) and adds applySourceFilter. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.ts | Emits source on provider items and uses applySourceFilter. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.ts | Updates local harness “extras” to use AICustomizationSources. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.ts | Migrates embedded editor logic from storage to source (incl. builtin editing behavior). |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.ts | Re-exports AICustomizationSource type. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagement.contribution.ts | Updates actions/when-clauses and read-only logic to use sources. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts | Updates grouping/context keys payload from storage to source. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemSource.ts | Requires normalized list items to carry source; simplifies inference logic. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.ts | Updates normalizer construction to match new required source contract. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.ts | Renames mapping helper from storageToIcon to sourceToIcon. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationDebugPanel.ts | Updates debug output to print source values. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLocalCustomizations.ts | Renames local customization descriptor field to source. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.ts | Updates harness source filter to use AICustomizationSources. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.ts | Sets plugin items’ source to plugin. |
| src/vs/workbench/api/common/extHostChatAgents2.ts | Adds source to the DTO sent from ext host. |
| src/vs/workbench/api/common/extHost.protocol.ts | Extends IChatResourceSourceDto with 'builtin' and requires source in customization item DTO. |
| src/vs/workbench/api/browser/mainThreadChatAgents2.ts | Plumbs source into main thread items and broadens default source filter. |
| src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostCustomizationHarness.test.ts | Updates sessions remote harness test filters to use AICustomizationSources. |
| src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostCustomizationHarness.ts | Updates remote harness “all sources” filter to AICustomizationSources. |
| src/vs/sessions/contrib/chat/common/builtinPromptsStorage.ts | Updates sessions’ builtin storage type aliases to the new AICustomizationSource. |
| src/vs/sessions/contrib/chat/browser/customizationsDebugLog.contribution.ts | Keeps debug log wiring aligned with updated filter helper types. |
| src/vs/sessions/contrib/chat/browser/customizationHarnessService.ts | Updates sessions harness “extras” to use AICustomizationSources. |
| src/vs/sessions/contrib/aiCustomizationTreeView/browser/aiCustomizationTreeViewViews.ts | Updates tree view grouping labels/icons to use AICustomizationSources. |
| src/vs/sessions/AI_CUSTOMIZATIONS.md | Updates docs to reflect new AICustomizationSources usage. |
| extensions/copilot/src/extension/chatSessions/vscode-node/claudeCustomizationProvider.ts | Adds source to provider items (builtin/local/user/etc.). |
| extensions/copilot/src/extension/chatSessions/copilotcli/vscode-node/copilotCLICustomizationProvider.ts | Adds source to provider items and threads through instruction sources. |
| extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts | Threads source/extensionId/pluginUri through CLI agent info. |
Copilot's findings
- Files reviewed: 33/35 changed files
- Comments generated: 3
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
Screenshot ChangesBase: Changed (52) |
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.
No description provided.