Skip to content

Workspace files: document name, icon and color; share the pickable icons - #350381

Merged
Sandeep Somavarapu (sandy081) merged 2 commits into
mainfrom
sandy081/agents/workspaces-02-workspace-file-schema
Nov 25, 2026
Merged

Sandeep Somavarapu (sandy081) merged 2 commits into
mainfrom
sandy081/agents/workspaces-02-workspace-file-schema

Conversation

@sandy081

Copy link
Copy Markdown
Member

The .code-workspace schema documents three general, optional top-level properties, so workspace files that carry them validate and get completions:

  • name: the display name of the workspace.
  • icon: a product icon id, for example rocket.
  • color: a theme color id, or a color in the #RRGGBB format.

The Agents window is the first reader of these properties (workspaces with several folders); VS Code itself doesn't use them yet.

The icon and color ids come from their registries. The workspace schema is refreshed whenever the icon or color schema changes, so completions and validation stay current as icons and colors are registered.

The icons the shared icon picker offers are now available as getPickableIcons(), for pickers that embed their own icon box. The icon picker's behaviour is unchanged, and so is the profiles editor, which keeps its own icon list.

How to test

  1. Open a .code-workspace file and add "name": "App", "icon": "rocket" and "color": "charts.blue" at the top level: there's no "Unknown workspace configuration property" warning, and icon and color complete their ids.
  2. Set "color": "#12AB9F": valid. Set "color": "blue": a warning.
  3. Change the icon of a terminal or a profile: the icon pickers work as before.

Tests: ./scripts/test.sh --run src/vs/workbench/api/test/common/configurationExtensionPoint.test.ts --run src/vs/workbench/services/userDataProfile/test/browser/iconPicker.test.ts: 17 passing. The new schema test fails without the refresh. pnpm run typecheck-client, pnpm run valid-layers-check and oxlint pass.

Written by GitHub Copilot on behalf of Sandeep Somavarapu (@sandy081)

The `.code-workspace` schema documents general top-level `name`, `icon` (a
product icon id) and `color` (a theme color id or #RRGGBB) properties, so
workspace files that carry them validate and complete.

The icons the shared icon picker offers are available as getPickableIcons(),
for pickers that embed their own icon box. The icon picker's behaviour is
unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The workspace file schema lists the icon and color ids of their registries,
so it is refreshed whenever their schemas change, keeping completions and
validation of workspace files current.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 25, 2026 14:33
@github-actions

Copy link
Copy Markdown
Contributor

Screenshot Changes

Base: 17940495 Current: 956c629f

Changed (1)

chat/chatSubagentContent/ThinkingAcrossCompletion/Light
Before After
before after

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block approval of the workspace metadata and shared icon-picker changes.

No open issues 🎉

What changed in this PR

Adds optional workspace display metadata to the .code-workspace schema and exposes the shared icon picker’s existing icon selection logic for reuse. The Agents window is the first consumer; standard VS Code workspace presentation remains unchanged.

Changes:

  • Documents name, icon, and color, with registry-backed IDs and six-digit hex color support.
  • Refreshes workspace schema notifications when icon or color schemas change.
  • Extracts getPickableIcons() without changing picker behavior and adds focused regression tests.
File Description
src/​vs/​workbench/​services/​userDataProfile/​test/​browser/​iconPicker.test.ts Tests dynamic icon registration and filtering.
src/​vs/​workbench/​services/​userDataProfile/​browser/​iconPicker.ts Exports and reuses getPickableIcons().
src/​vs/​workbench/​api/​test/​common/​configurationExtensionPoint.test.ts Tests schema refresh notifications and newly registered IDs.
src/​vs/​workbench/​api/​common/​configurationExtensionPoint.ts Adds workspace metadata properties and schema refresh notifications.

Review effort: Balanced

@sandy081
Sandeep Somavarapu (sandy081) marked this pull request as ready for review November 25, 2026 14:54
@sandy081
Sandeep Somavarapu (sandy081) added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit bdb6a42 Nov 25, 2026
38 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the sandy081/agents/workspaces-02-workspace-file-schema branch November 25, 2026 15:12
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.

4 participants