Skip to content

add ChatSessionCustomizationItem.source, clean up AICustomizationPromptsStorage#317555

Open
aeschli wants to merge 8 commits into
mainfrom
aeschli/weird-egret-337
Open

add ChatSessionCustomizationItem.source, clean up AICustomizationPromptsStorage#317555
aeschli wants to merge 8 commits into
mainfrom
aeschli/weird-egret-337

Conversation

@aeschli
Copy link
Copy Markdown
Contributor

@aeschli aeschli commented May 20, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 20, 2026 15:26
@aeschli aeschli enabled auto-merge (squash) May 20, 2026 15:26
@aeschli aeschli self-assigned this May 20, 2026
Copy link
Copy Markdown
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 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 source for 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

Comment thread src/vs/sessions/AI_CUSTOMIZATIONS.md Outdated
aeschli and others added 5 commits May 20, 2026 17:58
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>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Screenshot Changes

Base: 7d7e9513 Current: 65f7a85e

Changed (52)

chat/aiCustomizations/aiCustomizationListWidget/InstructionsTabWithItems/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationListWidget/InstructionsTabWithItems/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/WelcomePage/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/WelcomePage/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/LocalHarness/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/LocalHarness/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/CliHarness/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/CliHarness/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/Sessions/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/Sessions/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SessionsSkillsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SessionsSkillsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SkillsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SkillsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/InstructionsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/InstructionsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/HooksTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/HooksTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabNarrow/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabNarrow/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTabNarrow/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTabNarrow/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsItemPreview/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsItemPreview/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsItemRaw/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsItemRaw/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/BuiltinSkillItemPreview/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/BuiltinSkillItemPreview/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/BuiltinSkillItemRaw/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/BuiltinSkillItemRaw/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServerDetail/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServerDetail/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServerDetailNarrow/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServerDetailNarrow/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginDetail/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginDetail/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginDetailNarrow/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginDetailNarrow/Light
Before After
before after

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