Automations: Management UI (create/edit dialog, list widget, ChatInputPart integration)#323914
Draft
benvillalobos wants to merge 7 commits into
Draft
Automations: Management UI (create/edit dialog, list widget, ChatInputPart integration)#323914benvillalobos wants to merge 7 commits into
benvillalobos wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the “Automations” management UI surfaces to the Chat/AI Customization area of VS Code, including a new Automations section in the AI Customization Management Editor, supporting widgets, and required accessibility plumbing. It also extends several existing chat input/picker and customization-harness pathways to support the new dialog/list experiences and storage-source filtering behavior.
Changes:
- Introduces an Automations list widget + accessibility help, and wires a new Automations section into the AI Customization Management Editor.
- Extends customization harness descriptors with per-type storage source filtering and applies those filters when enumerating customization items/locations.
- Updates chat input/picker infrastructure (model picker, mode picker, workspace picker, session target picker) and persists the last-used editor chat session type to improve new editor chat defaults.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/common/customizationHarnessService.test.ts | Updates harness tests to cover new storage source filter behavior. |
| src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelPicker.test.ts | Updates model picker tests for signature changes and adds ChatInputPart regression coverage. |
| src/vs/workbench/contrib/chat/test/browser/automations/automationsListWidget.test.ts | Adds unit tests for the new Automations list widget behavior. |
| src/vs/workbench/contrib/chat/test/browser/automations/automationsAccessibilityHelp.test.ts | Adds tests for the Automations accessibility help provider and content. |
| src/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationListWidget.test.ts | Updates AI customization list widget test harness descriptors for storage source filtering. |
| src/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationItemsModel.test.ts | Updates items-model tests for harness storage source filter support. |
| src/vs/workbench/contrib/chat/common/customizationHarnessService.ts | Adds getStorageSourceFilter to harness descriptors and defines an empty filter/descriptor default. |
| src/vs/workbench/contrib/chat/common/constants.ts | Adds last-used editor session type storage key and new “new editor chat” session-type resolution helpers. |
| src/vs/workbench/contrib/chat/common/aiCustomizationWorkspaceService.ts | Adds Automations section id and introduces a storage-source filter type + helpers. |
| src/vs/workbench/contrib/chat/common/actions/chatContextKeys.ts | Adds a context key for the automations dialog host (inAutomationsDialog). |
| src/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput.ts | Uses stored last-used session type when choosing the default resource for new chat editors. |
| src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerInputActionItem.ts | Adds a toolbar-chip ActionViewItem wrapper for a workspace picker hosted by ChatInputPart. |
| src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.ts | Adds optional delegate visibility filtering and a setting-driven hide for a specific background provider in the editor picker. |
| src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.ts | Refactors sandbox toggle wiring and sandbox setting reads/updates. |
| src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.ts | Supports session-less hosts via direct setMode callback and exports built-in-mode predicate. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts | Adjusts model picker item construction/signature, hover content, config descriptions, and UBB/PRU presentation logic. |
| src/vs/workbench/contrib/chat/browser/widget/chatWidgetService.ts | Records last-used non-local session type into profile storage based on focused widgets. |
| src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.ts | Updates hover content call site after hover API changes and drops opener dependency. |
| src/vs/workbench/contrib/chat/browser/chat.ts | Adds IChatInputWorkspacePicker and a session type picker visibility hook on the delegate. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/promptsServiceCustomizationItemProvider.ts | Applies harness-provided source filters when returning customization items. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/customizationCreatorService.ts | Refactors customization target directory selection logic and provider construction. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/automationsListWidget.ts | Adds the Automations list widget implementation (virtualized list, actions, history UI, layout). |
| src/vs/workbench/contrib/chat/browser/aiCustomization/automationsAccessibilityHelp.ts | Adds the Automations accessibility help implementation and help-content builder. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationManagementEditor.ts | Adds the Automations section, gates it behind setting, and refactors target directory picking for manual creation. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationListWidget.ts | Renames manual-create target from local → workspace to match new editor logic. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationItemsModel.ts | Instantiates PromptsServiceCustomizationItemProvider with access to the active harness descriptor. |
| src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationIcons.ts | Registers a new icon for Automations. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostChatContribution.ts | Updates harness hidden-sections logic and provides a default storage source filter. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.ts | Simplifies directory item grouping and removes per-item badges/tooltips in this provider. |
| src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.ts | Adds an automations-dialog workspace picker action surfaced in the chat input menu when in the dialog. |
| src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts | Adds accessibility.verbosity.automations setting for the new help provider. |
| src/vs/workbench/api/browser/mainThreadChatAgents2.ts | Updates extension-contributed harness descriptors to include a default storage source filter. |
| src/vs/sessions/contrib/sessions/test/browser/aiCustomizationShortcutsWidget.fixture.ts | Updates sessions fixture harness descriptor with storage source filter. |
| src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/remoteAgentHostCustomizationHarness.test.ts | Updates remote agent host harness tests to supply a storage source filter. |
| src/vs/sessions/contrib/providers/remoteAgentHost/browser/remoteAgentHostCustomizationHarness.ts | Provides a sessions-layer harness descriptor implementation of storage source filtering. |
| src/vs/sessions/contrib/chat/browser/sessionWorkspacePicker.ts | Adds multi-trigger support and better anchor handling for workspace picker triggers. |
| src/vs/sessions/contrib/automations/browser/automationSessionTypeProvider.ts | Adds a sessions-layer provider that resolves available automation session types per folder. |
| src/vs/sessions/contrib/automations/browser/automations.contribution.ts | Registers automations-related singletons and registers the Automations accessibility help provider. |
| src/vs/sessions/contrib/automations/browser/automationDialogService.ts | Adds sessions-layer dialog service bridging workbench UI and sessions-layer session-type resolution. |
| src/vs/platform/actions/common/actions.ts | Adds a new MenuId for automations dialog input contributions. |
| src/vs/platform/accessibility/browser/accessibleView.ts | Adds a new AccessibleView provider id for Automations. |
| src/vs/base/browser/ui/dialog/dialog.ts | Adds isExternalFocusAllowed to support popups/pickers hosted outside dialog DOM. |
Review details
- Files reviewed: 45/45 changed files
- Comments generated: 14
- Review effort level: Low
7c94447 to
13213c7
Compare
13213c7 to
d97d812
Compare
fd374ff to
c33ddfe
Compare
bddc808 to
c14a631
Compare
…g, modal polish Adds the complete automations management interface: - AutomationsListWidget: WorkbenchList-based view with run status, dynamic row heights - Create/Edit dialog: ChatInputPart-hosted prompt editor with ghost text - WorkspacePicker integration for folder selection - Isolation mode dropdown (Worktree/Folder via ActionListWidget) - Static 'Copilot CLI' harness chip (future picker placeholder) - Schedule configuration (Manual/Hourly/Daily/Weekly with time/day pickers) - Permission level and model selection via ChatInputPart toolbar - CSS styling matching form field backgrounds to prompt editor - PlaceholderTextContribution registered on ChatInputPart editor - List widget tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a hover highlight and remove the redundant chevron so the isolation chip matches the new-session picker. Fix the chip showing 'Folder' for an unset isolation mode: the label now derives from !== 'workspace', so an undefined mode reads as 'Worktree' to match the picker, provider, and run defaults (previously it lied and the session ran as a worktree).
The stylelint rule flags --vscode-agents-fontWeight-medium as unknown. Only regular and semiBold are registered in vscode-known-variables.json. Use semiBold for form labels — visually equivalent for this context.
…bug fixes - Remove 33 em dashes from comments (AI slop pattern) - Compress 5 over-length JSDoc blocks to 1-2 sentences - Fix semicolons-as-conjunctions in comments - Track rAF via MutableDisposable (use-after-dispose fix) - Switch runNow to CancellationToken.None (phantom CTS removal) - Restore defensive typeof guard in getCategoryLabel - Re-add ILabelService for URI display in remote contexts - Add tests: openEditDialog error, openCreateDialog, runNow failure, resetLanguageModelToDefault - Add race-safety comment in createSessionTypeBinder
…enu-driven actions Migrate the harness chip and isolation group from DOM surgery (querySelector on ChatInputPart internals) to the structured MenuId + actionViewItemProvider pattern used by the New Session Page. - Register OpenAutomationsHarnessChipAction on MenuId.ChatInputSecondary - Register OpenAutomationsIsolationGroupAction on MenuId.ChatInputSecondary - Gate both with ChatContextKeys.inAutomationsDialog context key - Add secondaryToolbarActionViewItemProvider to IChatInputPartOptions - Route custom items in ChatInputPart secondary toolbar provider - Remove querySelector and eslint-disable-next-line comments
… saved modes - setChatMode2 now gates _syncInputStateToModel behind storeSelection, preventing unintended persistence of transient mode changes. - automationDialog detects when a saved mode is hidden by the hideCustomChatModes filter and falls back to default instead of setting up an infinite retry watcher.
c14a631 to
4acbde9
Compare
Comment on lines
+57
to
+62
| export interface IStorageSourceFilter { | ||
| /** | ||
| * Which storage groups to display (e.g. workspace, user, extension, builtin). | ||
| */ | ||
| readonly sources: readonly AICustomizationSource[]; | ||
| } |
Comment on lines
326
to
+328
| // Onboarding spotlight target — id is referenced by the "new session" tour | ||
| // in vs/sessions/contrib/onboardingTours. | ||
| this._renderDisposables.add(markOnboardingTarget(trigger, 'sessions.newSession.workspacePicker')); | ||
| triggerDisposables.add(markOnboardingTarget(trigger, 'sessions.newSession.workspacePicker')); |
Comment on lines
+687
to
+694
| const period = hour < 12 ? 'AM' : 'PM'; | ||
| const hour12 = hour === 0 ? 12 : (hour > 12 ? hour - 12 : hour); | ||
| const minuteText = minute.toString().padStart(2, '0'); | ||
| options.push({ | ||
| hour, | ||
| minute, | ||
| label: `${hour12}:${minuteText} ${period}`, | ||
| }); |
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.
Automations PR 3 (Management UI)
Context
This is part of a 4-PR stack adding scheduled agentic tasks to VS Code:
This PR adds the surfaces users interact with to configure and manage their automations.
Changes Made
New files:
automationDialog.tsautomationDialogService.tsautomationSessionTypeProvider.tsautomationsListWidget.tsworkspacePickerInputActionItem.tsChatInputPart extensions:
widgetViewKindTagstorage keys so drafts don't bleed across surfaces.resetLanguageModelToDefault()tears down pending persisted-model waiters and resets to location default.secondaryToolbarActionViewItemProvideroption lets hosts inject toolbar items via the menu system.storeSelectionparameter honored insetChatMode2(previously dead code).hideCustomChatModesoption filters the mode picker to built-in modes only.WorkspacePicker refactor (sessionWorkspacePicker.ts):
IChatInputWorkspacePickerinterface for ChatInputPart integration.renderTrigger()/removeTrigger()lifecycle for managed trigger elements.Model picker improvements (chatModelPicker.ts):
getCategoryLabeldefensivetypeofguard for provider-supplied metadata.Architecture
The dialog embeds
ChatInputPartfor the prompt surface and uses the structured menu system to inject custom toolbar items:The list widget integrates with the AI Customization management editor as a dedicated section, following the same patterns as prompts/instructions/hooks sections.
Testing
automationsListWidget.test.tscovers list rendering, enable/disable toggle, delete with confirmation, run-now success/failure/cleanup, edit dialog error paths, create dialog flows.chatModelPicker.test.tscoversresetLanguageModelToDefaultand category label guard.customizationHarnessService.test.tscovers harness availability checks.