SIGN IN SIGN UP

Chat Session Customizations initial Sketch (#304532)

* Add ChatSessionCustomizationsProvider proposed API

New types in chatSessionCustomizations.d.ts:
- ChatSessionCustomizationType enum (well-known group IDs)
- ChatSessionCustomizationStorageLocation enum
- ChatSessionCustomizationItem, ChatSessionCustomizationItemGroup
- ChatSessionCustomizationsProvider (provideCustomizations + resolveCustomizationDeletion)

New registration function in chatSessionsProvider.d.ts:
- chat.registerChatSessionCustomizationsProvider(chatSessionType, provider)

Co-authored-by: Copilot <[email protected]>

* Implement ChatSessionCustomizationsProvider e2e plumbing

Protocol: DTOs and 5 new methods on MainThread/ExtHost shapes.
Ext host: registerChatSessionCustomizationsProvider, provideCustomizations,
  resolveCustomizationDeletion proxy methods.
Type converters: ChatSessionCustomizations.fromItem/fromGroup.
Main thread: bridge with per-handle emitters, harness descriptor registration.
Service: IChatSessionCustomizationsProvider + registerCustomizationsProvider,
  getCustomizations, resolveCustomizationDeletion on IChatSessionsService.
Harness: registerContributedHarness() on ICustomizationHarnessService,
  derived observable merges built-in + contributed harnesses.
UI: AICustomizationListWidget reads from provider when extension harness
  is active, falls back to IPromptsService for built-in harnesses.
Setting: chat.customizations.providedByExtensions.enabled (experimental).
Command registration: openNewChatSessionInPlace for all contributions.

Co-authored-by: Copilot <[email protected]>

* Unhardcode AgentSessionProviders to support extension-contributed session types

Widen type annotations from AgentSessionProviders enum to AgentSessionTarget
across session target picker, delegation picker, welcome view, and utility
functions. Add default cases to exhaustive switch statements. Fix
chatInputPart getActiveSessionType to fall back to getChatSessionType for
extension-contributed URIs.

Co-authored-by: Copilot <[email protected]>

* Add joshbot extensionDevelopmentPath to Run and Compile Code - OSS task

Co-authored-by: Copilot <[email protected]>

* Wire provider group commands to create buttons in customization UI

When an extension-contributed harness is active, buildCreateActions()
reads commands from the provider's group data instead of the harness
descriptor. Commands flow through the full plumbing:
  extension → protocol DTO → main thread → service → list widget

Co-authored-by: Copilot <[email protected]>

* Add error handling to ext host customizations provider methods

Wrap provideCustomizations and resolveCustomizationDeletion in
try-catch to prevent extension errors from crashing the ext host.

Co-authored-by: Copilot <[email protected]>

* Subscribe to onDidChangeCustomizations in list widget for live updates

Co-authored-by: Copilot <[email protected]>

* Fix group commands race condition, remove resolveCustomizationDeletion

Commands bug: _fetchItemsFromProvider no longer sets _currentGroupCommands
as a side effect. Commands are now extracted in loadItems() after the
section-guard check, eliminating races from computeItemCountForSection.

Deletion: removed resolveCustomizationDeletion from the full stack
(proposed API, protocol, ext host, main thread, service, mocks).

Co-authored-by: Copilot <[email protected]>

* Add NOTES.md with open design items for cross-harness customizations

Co-authored-by: Copilot <[email protected]>

* Update NOTES.md with pattern analysis and concrete context proposal

Analyzed TreeDataProvider, StorageSourceFilter, CompletionItemProvider,
and CodeActionProvider patterns. Proposed ChatSessionCustomizationsContext
parameter with discoveredItems for provider-as-curator model.

Co-authored-by: Copilot <[email protected]>

* Simplify cross-harness approach: pull via chatPromptFiles API

No new API needed. Extensions use existing chat.customAgents,
chat.skills, chat.instructions arrays to discover global items
and merge them in provideCustomizations.

Co-authored-by: Copilot <[email protected]>

* Add swap file for VIM 9.1 configuration

* Remove swap file for VIM configuration

* Fix JoshBot task: inline arg into command string

Shell tasks with && in command don't work with separate args array.

Co-authored-by: Copilot <[email protected]>

* Fix create buttons: call updateAddButton after loadItems

buildCreateActions reads _currentGroupCommands which is populated in
loadItems. Calling updateAddButton before loadItems meant commands
were always undefined for extension harnesses.

Co-authored-by: Copilot <[email protected]>

* Guard extension customizations behind setting as a full feature gate

Co-authored-by: Copilot <[email protected]>

* Fix missing Hooks section, remove redundant config check

- Add 'hooks' case to sectionToCustomizationGroupIds
- Remove dead UseCustomizationsProvider check from widget (already
  enforced at registration in mainThreadChatSessions)
- Remove unused IConfigurationService and ChatConfiguration imports

Co-authored-by: Copilot <[email protected]>

* Wire itemCommands to context menu for extension harness items

Extension-provided itemCommands now appear in the right-click context
menu on customization items when a non-built-in harness is active.
Commands receive the item id and uri as arguments.

Co-authored-by: Copilot <[email protected]>

* Add inSessions flag to Launch Component Explorer task

Co-authored-by: Copilot <[email protected]>

* Fix component fixtures: add IChatSessionsService mock

AICustomizationListWidget now depends on IChatSessionsService.
Add mock to both list widget and management editor fixtures.

Co-authored-by: Copilot <[email protected]>

* Refactor ChatSessionCustomizationItem: remove id property and update related code

* Remove JoshBot task from tasks.json

Co-authored-by: Copilot <[email protected]>

* Rename setting to chat.customizations.providerApi.enabled

Co-authored-by: Copilot <[email protected]>

* Replace hardcoded harness checks with hasCustomizationsProvider

Remove all CustomizationHarness.VSCode/CLI/Claude comparisons from
the list widget. Instead check chatSessionsService.hasCustomizationsProvider()
which works for any harness — built-in or extension-contributed.

Co-authored-by: Copilot <[email protected]>

* Add TODO comments to proposed API for open design questions

Co-authored-by: Copilot <[email protected]>

* Remove NOTES.md

Co-authored-by: Copilot <[email protected]>

* Add TODO: Remove hardcoded providers from core

Mark all knownProvider/knownType if-else patterns that branch on
whether a session type is in the AgentSessionProviders enum.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Raymond Zhao <[email protected]>
J
Josh Spicer committed
2ce238e7e5e1892eb28e177e839c4cd5a3041ede
Parent: c2e1f3b
Committed by GitHub <[email protected]> on 3/26/2026, 1:18:17 AM