mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 15:55:59 +01:00
chatCustomizations: support grouping and badges for external provider items (#305813)
* feat: enhance AICustomizationListWidget with grouping and badge support for external customization items * feat: add user data profile service and infer storage from URI in AICustomizationListWidget * Copilot CLI session 8af2fd4a-10fe-4bba-b408-f1b90cebc8dc changes * docs: add chatSessionCustomizationProvider API chain to customizations editor skill Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: address PR review feedback - Remove duplicate sectionToIcon, reuse getSectionIcon instance method - Use Map for O(1) groupKey lookups instead of O(n²) includes/find - Check active project root in inferStorageFromUri for Sessions window - Set pluginUri on provider items and use it for storage inference - Remove redundant plugin check from inferStorageFromUri (handled by caller) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -27,9 +27,24 @@ When changing harness descriptor interfaces or factory functions, verify both co
|
||||
- **`IHarnessDescriptor`** — drives all UI behavior declaratively (hidden sections, button overrides, file filters, agent gating). See spec for full field reference.
|
||||
- **`ISectionOverride`** — per-section button customization (command invocation, root file creation, type labels, file extensions).
|
||||
- **`IStorageSourceFilter`** — controls which storage sources and user roots are visible per harness/type.
|
||||
- **`IExternalCustomizationItemProvider`** / **`IExternalCustomizationItem`** — internal interfaces (in `customizationHarnessService.ts`) for extension-contributed providers that supply items directly. These mirror the proposed extension API types.
|
||||
|
||||
Principle: the UI widgets read everything from the descriptor — no harness-specific conditionals in widget code.
|
||||
|
||||
## Extension API (`chatSessionCustomizationProvider`)
|
||||
|
||||
The proposed API in `src/vscode-dts/vscode.proposed.chatSessionCustomizationProvider.d.ts` lets extensions register customization providers. Changes to `IExternalCustomizationItem` or `IExternalCustomizationItemProvider` must be kept in sync across the full chain:
|
||||
|
||||
| Layer | File | Type |
|
||||
|-------|------|------|
|
||||
| Extension API | `vscode.proposed.chatSessionCustomizationProvider.d.ts` | `ChatSessionCustomizationItem` |
|
||||
| IPC DTO | `extHost.protocol.ts` | `IChatSessionCustomizationItemDto` |
|
||||
| ExtHost mapping | `extHostChatAgents2.ts` | `$provideChatSessionCustomizations()` |
|
||||
| MainThread mapping | `mainThreadChatAgents2.ts` | `provideChatSessionCustomizations` callback |
|
||||
| Internal interface | `customizationHarnessService.ts` | `IExternalCustomizationItem` |
|
||||
|
||||
When adding fields to `IExternalCustomizationItem`, update all five layers. The proposed API `.d.ts` is additive-only (new optional fields are backward-compatible and do not require a version bump).
|
||||
|
||||
## Testing
|
||||
|
||||
Component explorer fixtures (see `component-fixtures` skill): `aiCustomizationListWidget.fixture.ts`, `aiCustomizationManagementEditor.fixture.ts` under `src/vs/workbench/test/browser/componentFixtures/`.
|
||||
|
||||
Reference in New Issue
Block a user