vscode-ui
Present metrics, comparisons, tables, bar charts, and expandable details as native visuals inside an Agents window response. Use when numbers or a comparison are clearer shown than described. Not for diagrams, mockups, or standalone documents.
- License 许可
- MIT
- 所属仓库
- microsoft/vscode
- 最近更新
- 2026-11-15
- Stars
- ★ 20w
- Forks
- 4.4w
01 前言 Front Matter
- name
- vscode-ui
- description
- Present metrics, comparisons, tables, bar charts, and expandable details as native visuals inside an Agents window response. Use when numbers or a comparison are clearer shown than described. Not for diagrams, mockups, or standalone documents.
03 SKILL.md 正文
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. -->
Native visuals
Use a native visual when showing data helps the user more than describing it: a few key numbers, a before-and-after comparison, a small table, or a bar chart. VS Code renders the visual itself, so it matches the user's theme and reads as part of the answer. Keep the explanation in ordinary Markdown around it, and honor the format the user asked for; most answers need no visual.
This is on-demand authoring guidance bundled with the Agents window. It is available while native visuals and AI features are enabled. Rendering does not depend on invoking this skill.
Write a visual
Put the components in a closed Markdown code fence with the language vscode-ui. The visual appears once the closing fence arrives. Start the fence at the beginning of a line, not inside a list item or a block quote.
The incremental build is considerably faster.
```vscode-ui
<Columns>
<Metric label="Full build" value="12.4 s" />
<Metric label="Incremental build" value="1.8 s" delta="-85%" tone="positive" />
</Columns>
<BarChart title="Build duration" unit="s">
<Bar label="Full build" value="12.4" />
<Bar label="Incremental build" value="1.8" />
</BarChart>
<Disclosure summary="How this was measured">
<Text>Median of five runs on a warm cache.</Text>
</Disclosure>
```
Most of the improvement comes from caching.
The chat.nativeComponents.enabled setting controls rendering in the Agents window and is off by default. While it is off, the block is shown as source code. Do not change the user's setting unless asked.
Components
You supply content, data, and composition. VS Code owns how every component looks, so there is nothing to style.
| Component | Attributes | Content |
|---|---|---|
Stack |
none | Components, laid out top to bottom. |
Columns |
none | Components, laid out side by side in equal columns that stack when the chat is narrow. |
Text |
variant: body (default), heading, or caption |
Plain text. |
Metric |
label and value (required), delta, tone |
None. |
Badge |
tone |
Plain text. Adjacent badges share a line. |
Table |
caption |
Every Column, then every Row. |
Column |
align: start (default) or end |
The column's header text. Use end for numbers. |
Row |
none | One Cell per column. |
Cell |
none | Plain text. |
BarChart |
title (required), unit |
One Bar per value. |
Bar |
label and value (required) |
None. |
Disclosure |
summary (required) |
Components, hidden until the user expands them. |
A tone is neutral (default), positive, negative, or warning. It states what a value means; VS Code chooses the icon and color. Use a tone only where the meaning matters, not for decoration.
Rules
The block is checked strictly. If anything in it is not valid, the user sees the source and the reason instead of the visual.
- Use only the components and attributes above. Names are case-sensitive.
- Write every attribute value as a quoted literal, such as
value="12.4". Expressions in braces, imports, scripts, HTML tags, comments, classes, styles, and colors are not supported. - Put text only inside
Text,Badge,Column, andCell. It is plain text: Markdown and nested tags are not interpreted. - Write
<,>,&,",{, and}for a literal<,>,&,",{, and}. - A
Barvalue is a number that is not negative, written with digits only, such as12.4. Put the unit in the chart'sunitattribute, not in the value. - A
Metricvalue is text, so it can carry its unit, such as1.8 s. - Limits: 32,000 characters, 2,000 components, 8 levels of nesting, 12 columns and 100 rows per table, and 24 bars per chart. Summarize or split larger data.
- Links, images, and code do not belong in a visual. Put them in Markdown outside the block.
For a diagram, a mockup, or a layout that these components cannot express, use Markdown, or an HTML preview when that is available.
04 同仓库更多 Skills
html-preview
Create visual reports, implementation plans, code-review explainers, comparisons, diagrams, and static UI mockups as inline HTML previews in the Agents window. Use when the user asks for visual or rendered output, not ordinary HTML code examples.
endgame-status
Report VS Code endgame status, focusing on test-plan progress, tester activity, release-branch PRs, and release-build availability.
sweeper-query
Answer natural-language questions about the VS Code Sweeper's published issue index (index-<name>.json for microsoft/vscode and the enrolled family repos) — which issues are agent-ready to implement or plan, what the sweeper proposed for an assignee or area, whether the sweeper knows a report as a duplicate, the highest-value open bugs in a lane — and, for one issue, the review's full record (evidence with file citations, fix brief, proposed comment). Use ONLY when the request explicitly names the sweeper — "sweeper", "vscodesweeper", "sweeper-query", a sweeper verdict, record, brief or index, an agent-ready issue — or asks what "the sweeper" found, proposed or knows. Do NOT use for general questions about issues, duplicates, priorities or ranking that do not mention the sweeper. Read-only; discovery only.
update-skills
Create or update repository skills and instructions when major learnings are discovered during a session. Use when the user says "learn!", when a significant pattern or pitfall is identified, or when reusable domain knowledge should be captured for future sessions.
update-pr
Update the pull request for the current session. Use when the user wants to push new changes to an existing PR.
sync
Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.