Skip to content

chat: remove providerApi.enabled setting and legacy code paths#308341

Merged
joshspicer merged 3 commits intomainfrom
copilot/efficient-gerbil
Apr 8, 2026
Merged

chat: remove providerApi.enabled setting and legacy code paths#308341
joshspicer merged 3 commits intomainfrom
copilot/efficient-gerbil

Conversation

@joshspicer
Copy link
Copy Markdown
Member

Summary

The provider API is now permanently enabled. This PR removes the chat.customizations.providerApi.enabled setting and all associated dead code paths (616 lines removed across 8 files).

What was removed

File Change
constants.ts Removed CustomizationsProviderApi enum value
chat.contribution.ts Removed setting registration, fixed stale "Claude" mention in harnessSelector.enabled description
browser/customizationHarnessService.ts Removed conditional harness creation (was: if providerApi → VSCode, else → CLI+Claude). Now unconditionally creates VSCode harness only. Removed IPathService/IConfigurationService deps.
common/customizationHarnessService.ts Removed Claude enum value, getClaudeUserRoots(), createClaudeHarnessDescriptor()
aiCustomizationListWidget.ts Removed ~506 lines: fetchCoreItemsForSection, applyBuiltinGroupKeys, storageToIcon, findPluginUri, filterItemsForCore, isBuiltin/extensionLabel interface properties and all read sites
mainThreadChatAgents2.ts Removed kill-switch config listener and provider-API guard, IConfigurationService dep
aiCustomizationManagementEditor.fixture.ts Removed Claude harness fixture and imports
AI_CUSTOMIZATIONS.md Updated docs to remove Claude harness references

What was preserved

  • CLI harness code in common/customizationHarnessService.ts — still used by the sessions (agents) window via SessionsCustomizationHarnessService
  • HOOKS_FILTER, createRestrictedHarnessDescriptor, createCliHarnessDescriptor, getCliUserRoots — all still live via sessions window
  • isChatExtensionItem — still used in the provider path for _inferStorageAndGroup
  • matchesWorkspaceSubpath/matchesInstructionFileFilter — still used by editor and creator service

Validation

  • ✅ TypeScript compilation clean (npm run compile-check-ts-native)
  • ✅ Pre-commit hygiene hooks pass
  • ✅ Council review (GPT, Opus, Gemini) — no blocking issues

Copilot AI review requested due to automatic review settings April 7, 2026 22:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Screenshot Changes

Base: 129eff3d Current: 9dec62e5

Changed (36)

chat/aiCustomizations/aiCustomizationListWidget/InstructionsTabWithItems/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/WelcomePage/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/LocalHarness/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/CliHarness/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/Sessions/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SessionsSkillsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SkillsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/InstructionsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/HooksTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTab/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTabScrolled/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabNarrow/Light
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTabNarrow/Light
Before After
before after
chat/aiCustomizations/aiCustomizationListWidget/InstructionsTabWithItems/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/WelcomePage/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/LocalHarness/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/CliHarness/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/Sessions/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SessionsSkillsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/SkillsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/InstructionsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/HooksTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTab/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PromptsTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/PluginsTabScrolled/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/McpServersTabNarrow/Dark
Before After
before after
chat/aiCustomizations/aiCustomizationManagementEditor/AgentsTabNarrow/Dark
Before After
before after

Removed (2)

chat/aiCustomizations/aiCustomizationManagementEditor/ClaudeHarness/Dark

baseline

chat/aiCustomizations/aiCustomizationManagementEditor/ClaudeHarness/Light

baseline

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

Removes the now-obsolete chat.customizations.providerApi.enabled setting and deletes legacy/non-provider code paths, aligning the Chat Customizations UI and harness registration with the “provider API always enabled” direction.

Changes:

  • Removed the chat.customizations.providerApi.enabled configuration key and all related conditional logic/guards.
  • Simplified harness registration to only statically register the Local (VS Code) harness in core; other harnesses are expected via provider API.
  • Deleted the legacy “core promptsService discovery” path in the Chat Customizations list widget and removed the Claude harness implementation/docs/fixtures.
Show a summary per file
File Description
src/vs/workbench/test/browser/componentFixtures/sessions/aiCustomizationManagementEditor.fixture.ts Removes Claude harness fixture/imports from the management editor fixture setup.
src/vs/workbench/contrib/chat/common/customizationHarnessService.ts Removes Claude harness enum + descriptor factory and updates related comments/helpers.
src/vs/workbench/contrib/chat/common/constants.ts Removes ChatConfiguration.CustomizationsProviderApi enum entry.
src/vs/workbench/contrib/chat/browser/chat.contribution.ts Removes the configuration registration for the provider API setting; updates harness selector setting description.
src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.ts Removes config/path-service based conditional harness registration; now always registers only Local harness statically.
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts Deletes the legacy core discovery/filtering pipeline and makes the widget provider-driven.
src/vs/workbench/api/browser/mainThreadChatAgents2.ts Removes kill-switch listener and provider-API guard; always accepts provider registrations (except sessions window).
src/vs/sessions/AI_CUSTOMIZATIONS.md Updates documentation to remove Claude harness references and reflect provider-based harness contributions.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts:845

  • The context-menu copy actions unconditionally use item.uri.fsPath. For non-file URIs (which are possible in the provider path, and are explicitly treated as “built-in” by _inferStorageAndGroup), fsPath can be empty/meaningless, so “Copy Full Path/Relative Path” will copy incorrect values. Consider only showing these actions for Schemas.file URIs, or copying item.uri.toString() (and only enabling relative-path copying when a workspace root exists and the URI is under it).
		// Add copy path actions
		const copyActions = [
			new Separator(),
			new Action('copyFullPath', localize('copyFullPath', "Copy Full Path"), undefined, true, async () => {
				await this.clipboardService.writeText(item.uri.fsPath);
			}),
			new Action('copyRelativePath', localize('copyRelativePath', "Copy Relative Path"), undefined, true, async () => {
				const basePath = this.workspaceService.getActiveProjectRoot();
				if (basePath && item.uri.fsPath.startsWith(basePath.fsPath)) {
					const relative = item.uri.fsPath.substring(basePath.fsPath.length + 1);
					await this.clipboardService.writeText(relative);
				} else {
					// Fallback to workspace-relative via label service
					const relativePath = this.labelService.getUriLabel(item.uri, { relative: true });
					await this.clipboardService.writeText(relativePath);
				}
			}),
  • Files reviewed: 8/8 changed files
  • Comments generated: 1

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 removes the chat.customizations.providerApi.enabled kill-switch and deletes legacy “core discovery” / Claude harness code paths, assuming the customization provider API is always enabled. It simplifies harness registration in core VS Code to only the Local/VSCode harness and updates related docs/fixtures accordingly.

Changes:

  • Removed chat.customizations.providerApi.enabled configuration and all guards/listeners around it.
  • Removed the Claude harness implementation and fixture coverage.
  • Deleted the legacy “core promptsService discovery + filtering” path from the AI Customizations list widget, leaving only provider-backed listing.
Show a summary per file
File Description
src/vs/workbench/test/browser/componentFixtures/sessions/aiCustomizationManagementEditor.fixture.ts Removes Claude harness fixture usage and related imports.
src/vs/workbench/contrib/chat/common/customizationHarnessService.ts Removes CustomizationHarness.Claude, getClaudeUserRoots, and createClaudeHarnessDescriptor.
src/vs/workbench/contrib/chat/common/constants.ts Removes ChatConfiguration.CustomizationsProviderApi enum entry.
src/vs/workbench/contrib/chat/browser/chat.contribution.ts Removes the setting registration and updates harness selector description text.
src/vs/workbench/contrib/chat/browser/aiCustomization/customizationHarnessService.ts Simplifies core harness service to always register only the VSCode/Local harness.
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts Removes the legacy core-item pipeline and makes the widget provider-only.
src/vs/workbench/api/browser/mainThreadChatAgents2.ts Removes kill-switch listener and provider registration guard based on the removed setting.
src/vs/sessions/AI_CUSTOMIZATIONS.md Updates documentation to remove Claude harness references and reflect provider-driven harnesses in core.

Copilot's findings

Comments suppressed due to low confidence (3)

src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts:1203

  • fetchItemsForSection now returns an empty list when the active harness has no itemProvider. The static Local/VSCode harness created by createVSCodeHarnessDescriptor does not set itemProvider, and I can't find any extension registering a customization provider for session type 'vscode' (e.g. extensions/copilot only registers for copilotcli and the Claude scheme). This likely makes the Chat Customizations editor show no items when the Local harness is active (including when the harness selector is disabled and the editor forces CustomizationHarness.VSCode). Consider restoring a promptsService-based fallback for harnesses without itemProvider, or attach a built-in itemProvider to the VSCode harness so Local always lists core items.
	private async fetchItemsForSection(section: AICustomizationManagementSection): Promise<IAICustomizationListItem[]> {
		const promptType = sectionToPromptType(section);
		const activeDescriptor = this.harnessService.getActiveDescriptor();

		if (activeDescriptor.itemProvider && promptType) {
			return this.fetchProviderItemsForSection(activeDescriptor, promptType);
		}

		return [];
	}

src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts:1599

  • filterItems() now always calls filterItemsForProvider, even when the active harness has no itemProvider (Local/VSCode) and allItems would be empty under the new logic. If the intent is to make provider-backed harnesses the only supported path, it would be clearer to either (1) ensure the VSCode harness is always provider-backed, or (2) keep a separate filtering/grouping path for Local harness so the UI continues to work without an external provider.
	private filterItems(): number {
		const matchedItems = this.applySearchFilter(this.allItems);
		this.filterItemsForProvider(matchedItems);
		return matchedItems.length;
	}

src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts:846

  • The context menu now always adds “Copy Full Path/Copy Relative Path” actions and writes item.uri.fsPath. For non-file schemes (and for synthetic/built-in items), fsPath/relative path computations can be meaningless or misleading. Consider gating these actions to item.uri.scheme === Schemas.file (and possibly workspace/local/user storages), and offering a separate “Copy URI” action for non-file items.

This issue also appears in the following locations of the same file:

  • line 1194
  • line 1595
		// Add copy path actions
		const copyActions = [
			new Separator(),
			new Action('copyFullPath', localize('copyFullPath', "Copy Full Path"), undefined, true, async () => {
				await this.clipboardService.writeText(item.uri.fsPath);
			}),
			new Action('copyRelativePath', localize('copyRelativePath', "Copy Relative Path"), undefined, true, async () => {
				const basePath = this.workspaceService.getActiveProjectRoot();
				if (basePath && item.uri.fsPath.startsWith(basePath.fsPath)) {
					const relative = item.uri.fsPath.substring(basePath.fsPath.length + 1);
					await this.clipboardService.writeText(relative);
				} else {
					// Fallback to workspace-relative via label service
					const relativePath = this.labelService.getUriLabel(item.uri, { relative: true });
					await this.clipboardService.writeText(relativePath);
				}
			}),
		];
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new

The provider API is now permanently enabled. Remove the
chat.customizations.providerApi.enabled setting, the false-path
conditional that registered built-in CLI/Claude harnesses in core,
the entire fetchCoreItemsForSection legacy item-loading pipeline,
and related dead code (filterItemsForCore, applyBuiltinGroupKeys,
storageToIcon, findPluginUri, isBuiltin/extensionLabel properties,
kill-switch listener in mainThreadChatAgents2).

CLI harness code is preserved for the sessions window.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@joshspicer joshspicer force-pushed the copilot/efficient-gerbil branch from 11f3cab to f1ee67d Compare April 7, 2026 23:39
@joshspicer joshspicer marked this pull request as ready for review April 7, 2026 23:46
roblourens
roblourens previously approved these changes Apr 7, 2026
@joshspicer joshspicer marked this pull request as draft April 8, 2026 00:05
…mProvider

After removing fetchCoreItemsForSection (the IPromptsService fallback path),
the sessions CLI harness had no itemProvider, causing the management editor
to return [] for all sections while sidebar counts remained correct.

Fix: add a built-in IExternalCustomizationItemProvider to the CLI harness
in SessionsCustomizationHarnessService that wraps IPromptsService directly.
This uses the same provider API path as core VS Code, keeping the architecture
consistent. Also extends CustomizationHarnessServiceBase with Disposable so
subclasses can register disposables via _register.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… Disposable

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@joshspicer joshspicer marked this pull request as ready for review April 8, 2026 01:45
@joshspicer joshspicer enabled auto-merge (squash) April 8, 2026 01:47
@joshspicer joshspicer merged commit 5dab13f into main Apr 8, 2026
23 checks passed
@joshspicer joshspicer deleted the copilot/efficient-gerbil branch April 8, 2026 02:15
@vs-code-engineering vs-code-engineering bot added this to the 1.116.0 milestone Apr 8, 2026
aeschli added a commit that referenced this pull request Apr 8, 2026
aeschli added a commit that referenced this pull request Apr 8, 2026
joshspicer added a commit that referenced this pull request Apr 8, 2026
* chat: remove providerApi.enabled setting and legacy code paths

The provider API is now permanently enabled. Remove the
chat.customizations.providerApi.enabled setting, the false-path
conditional that registered built-in CLI/Claude harnesses in core,
the entire fetchCoreItemsForSection legacy item-loading pipeline,
and related dead code (filterItemsForCore, applyBuiltinGroupKeys,
storageToIcon, findPluginUri, isBuiltin/extensionLabel properties,
kill-switch listener in mainThreadChatAgents2).

CLI harness code is preserved for the sessions window.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: fix chat customizations editor empty by adding built-in itemProvider

After removing fetchCoreItemsForSection (the IPromptsService fallback path),
the sessions CLI harness had no itemProvider, causing the management editor
to return [] for all sections while sidebar counts remained correct.

Fix: add a built-in IExternalCustomizationItemProvider to the CLI harness
in SessionsCustomizationHarnessService that wraps IPromptsService directly.
This uses the same provider API path as core VS Code, keeping the architecture
consistent. Also extends CustomizationHarnessServiceBase with Disposable so
subclasses can register disposables via _register.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: dispose CustomizationHarnessServiceBase in tests after extending Disposable

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
joshspicer added a commit that referenced this pull request Apr 8, 2026
…tions

The cherry-picked PR (#308341) removed the promptsService-based core
discovery path from the AI Customizations list widget, leaving only the
provider-based path. The Local (VSCode) harness had no itemProvider,
causing empty pages since no extension registers a provider for type
'vscode'.

Add a built-in itemProvider wrapping IPromptsService to the core
CustomizationHarnessService, matching the pattern already used by the
Sessions CLI harness.
joshspicer added a commit that referenced this pull request Apr 8, 2026
…tions

The cherry-picked PR (#308341) removed the promptsService-based core
discovery path from the AI Customizations list widget, leaving only the
provider-based path. The Local (VSCode) harness had no itemProvider,
causing empty pages since no extension registers a provider for type
'vscode'.

Add a built-in itemProvider wrapping IPromptsService to the core
CustomizationHarnessService, matching the pattern already used by the
Sessions CLI harness.
joshspicer added a commit that referenced this pull request Apr 8, 2026
…tions

The cherry-picked PR (#308341) removed the promptsService-based core
discovery path from the AI Customizations list widget, leaving only the
provider-based path. The Local (VSCode) harness had no itemProvider,
causing empty pages since no extension registers a provider for type
'vscode'.

Add a built-in itemProvider wrapping IPromptsService to the core
CustomizationHarnessService, matching the pattern already used by the
Sessions CLI harness.
joshspicer added a commit that referenced this pull request Apr 8, 2026
…tions

The cherry-picked PR (#308341) removed the promptsService-based core
discovery path from the AI Customizations list widget, leaving only the
provider-based path. The Local (VSCode) harness had no itemProvider,
causing empty pages since no extension registers a provider for type
'vscode'.

Add a built-in itemProvider wrapping IPromptsService to the core
CustomizationHarnessService, matching the pattern already used by the
Sessions CLI harness.
joshspicer added a commit that referenced this pull request Apr 8, 2026
…tions

The cherry-picked PR (#308341) removed the promptsService-based core
discovery path from the AI Customizations list widget, leaving only the
provider-based path. The Local (VSCode) harness had no itemProvider,
causing empty pages since no extension registers a provider for type
'vscode'.

Add a built-in itemProvider wrapping IPromptsService to the core
CustomizationHarnessService, matching the pattern already used by the
Sessions CLI harness.
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.

3 participants