Skip to content

Commit f7338de

Browse files
committed
Merge remote-tracking branch 'origin/main' into connor4312/ah-undo-redo
2 parents ff9044b + b35fdbe commit f7338de

291 files changed

Lines changed: 18808 additions & 7405 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/launch/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,19 @@ agent-browser snapshot -i
111111
- Code OSS uses the default user data directory. Unlike VS Code Insiders, you don't typically need `--user-data-dir` since there's usually only one Code OSS instance running.
112112
- If you see "Sent env to running instance. Terminating..." it means Code OSS is already running and forwarded your args to the existing instance. Quit Code OSS and relaunch with the flag, or use `--user-data-dir=/tmp/code-oss-debug` to force a new instance.
113113

114-
## Launching the Sessions App (Agent Sessions Window)
114+
## Launching the Agents App (Agents Window)
115115

116-
The Sessions app is a separate workbench mode launched with the `--sessions` flag. It uses a dedicated user data directory to avoid conflicts with the main Code OSS instance.
116+
The Agents app is a separate workbench mode launched with the `--agents` flag. It uses a dedicated user data directory to avoid conflicts with the main Code OSS instance.
117117

118118
```bash
119119
cd <repo-root> # the root of your VS Code checkout
120-
./scripts/code.sh --sessions --remote-debugging-port=9224
120+
./scripts/code.sh --agents --remote-debugging-port=9224
121121
```
122122

123123
Wait for the window to fully initialize, then connect:
124124

125125
```bash
126-
# Wait for Sessions app to start, retry until connected
126+
# Wait for Agents app to start, retry until connected
127127
for i in 1 2 3 4 5; do agent-browser connect 9224 2>/dev/null && break || sleep 3; done
128128

129129
# Verify you're connected to the right target (not about:blank)
@@ -132,7 +132,7 @@ agent-browser snapshot -i
132132
```
133133

134134
**Tips:**
135-
- The `--sessions` flag launches the Agent Sessions workbench instead of the standard VS Code workbench.
135+
- The `--agents` flag launches the Agents workbench instead of the standard VS Code workbench.
136136
- Set `VSCODE_SKIP_PRELAUNCH=1` to skip the compile step if you've already built.
137137

138138
## Launching VS Code Extensions for Debugging

.eslint-plugin-local/code-no-unexternalized-strings.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export default new class NoUnexternalizedStrings implements eslint.Rule.RuleModu
6262
doubleQuotedStringLiterals.delete(keyNode);
6363
key = keyNode.value;
6464

65+
} else if (keyNode.type === AST_NODE_TYPES.TemplateLiteral && keyNode.expressions.length === 0 && keyNode.quasis.length === 1) {
66+
key = keyNode.quasis[0].value.cooked ?? undefined;
67+
6568
} else if (keyNode.type === AST_NODE_TYPES.ObjectExpression) {
6669
for (const property of keyNode.properties) {
6770
if (property.type === AST_NODE_TYPES.Property && !property.computed) {
@@ -70,6 +73,9 @@ export default new class NoUnexternalizedStrings implements eslint.Rule.RuleModu
7073
doubleQuotedStringLiterals.delete(property.value);
7174
key = property.value.value;
7275
break;
76+
} else if (property.value.type === AST_NODE_TYPES.TemplateLiteral && property.value.expressions.length === 0 && property.value.quasis.length === 1) {
77+
key = property.value.quasis[0].value.cooked ?? undefined;
78+
break;
7379
}
7480
}
7581
}

.github/agents/sessions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
name: Sessions Window Developer
3-
description: Specialist in developing the Agent Sessions Window
2+
name: Agents Window Developer
3+
description: Specialist in developing the Agents Window
44
---
55

66
# Role and Objective
77

8-
You are a developer working on the 'sessions window'. Your goal is to make changes to the sessions window (`src/vs/sessions`), minimally editing outside of that directory.
8+
You are a developer working on the 'agents window'. Your goal is to make changes to the agents window (`src/vs/sessions`), minimally editing outside of that directory.
99

1010
# Instructions
1111

1212
1. **Always read the `sessions` skill first.** This is your primary source of truth for the sessions architecture.
1313
- Invoke `skill: "sessions"`.
1414
2. Focus your work on `src/vs/sessions/`.
15-
3. Avoid making changes to core VS Code files (`src/vs/workbench/`, `src/vs/platform/`, etc.) unless absolutely necessary for the sessions window functionality.
15+
3. Avoid making changes to core VS Code files (`src/vs/workbench/`, `src/vs/platform/`, etc.) unless absolutely necessary for the agents window functionality.

.github/instructions/sessions.instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
description: Architecture documentation for the Agent Sessions window — a sessions-first app built as a new top-level layer alongside vs/workbench. Covers layout, parts, chat widget, contributions, entry points, and development guidelines. Use when working in `src/vs/sessions`
2+
description: Architecture documentation for the Agents window — an agents-first app built as a new top-level layer alongside vs/workbench. Covers layout, parts, chat widget, contributions, entry points, and development guidelines. Use when working in `src/vs/sessions`
33
applyTo: src/vs/sessions/**
44
---
55

6-
# Agent Sessions Window
6+
# Agents Window
77

8-
The Agent Sessions window is a **standalone application** built as a new top-level layer (`vs/sessions`) in the VS Code architecture. It provides a sessions-first experience optimized for agent workflows — a simplified, fixed-layout workbench where chat is the primary interaction surface and editors appear as modal overlays.
8+
The Agents window is a **standalone application** built as a new top-level layer (`vs/sessions`) in the VS Code architecture. It provides an agents-first experience optimized for agent workflows — a simplified, fixed-layout workbench where chat is the primary interaction surface and editors appear as modal overlays.
99

1010
When working on files under `src/vs/sessions/`, use these skills for detailed guidance:
1111

.github/skills/add-policy/SKILL.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,62 @@ npm run compile-check-ts-native
124124
Regenerate the auto-generated policy catalog:
125125

126126
```bash
127-
npm run transpile-client && ./scripts/code.sh --export-policy-data
127+
npm run export-policy-data
128128
```
129129

130+
This script handles transpilation, sets up `GITHUB_TOKEN` (via `gh` CLI or GitHub OAuth device flow), and runs `--export-policy-data`. The export command reads extension configuration policies from the distro's `product.json` via the GitHub API and merges them into the output.
131+
130132
This updates `build/lib/policies/policyData.jsonc`. **Never edit this file manually.** Verify your new policy appears in the output. You will need code review from a codeowner to merge the change to main.
131133

132134

133135
## Policy for extension-provided settings
134136

135-
For an extension author to provide policies for their extension's settings, a change must be made in `vscode-distro` to the `product.json`.
137+
Extension authors cannot add `policy:` fields directly—their settings are defined in the extension's `package.json`, not in VS Code core. Instead, policies for extension settings are defined in `vscode-distro`'s `product.json` under the `extensionConfigurationPolicy` key.
138+
139+
### How it works
140+
141+
1. **Source of truth**: The `extensionConfigurationPolicy` map lives in `vscode-distro` under `mixin/{quality}/product.json` (stable, insider, exploration).
142+
2. **Runtime**: When VS Code starts with a distro-mixed `product.json`, `configurationExtensionPoint.ts` reads `extensionConfigurationPolicy` and attaches matching `policy` objects to extension-contributed configuration properties.
143+
3. **Export/build**: The `--export-policy-data` command fetches the distro's `product.json` at the commit pinned in `package.json` and merges extension policies into the output. Use `npm run export-policy-data` which sets up authentication automatically.
144+
145+
### Distro format
146+
147+
Each entry in `extensionConfigurationPolicy` must include:
148+
149+
```json
150+
"extensionConfigurationPolicy": {
151+
"publisher.extension.settingName": {
152+
"name": "PolicyName",
153+
"category": "InteractiveSession",
154+
"minimumVersion": "1.99",
155+
"description": "Human-readable description."
156+
}
157+
}
158+
```
159+
160+
- `name`: PascalCase policy name, unique across all policies
161+
- `category`: Must be a valid `PolicyCategory` enum value (e.g., `InteractiveSession`, `Extensions`)
162+
- `minimumVersion`: The VS Code version that first shipped this policy
163+
- `description`: Human-readable description string used to generate localization key/value pairs for ADMX/ADML/macOS/Linux policy artifacts
164+
165+
### Adding a new extension policy
166+
167+
1. Add the entry to `extensionConfigurationPolicy` in **all three** quality `product.json` files in `vscode-distro` (`mixin/stable/`, `mixin/insider/`, `mixin/exploration/`)
168+
2. Update the `distro` commit hash in `package.json` to point to the distro commit that includes your new entry — the export command fetches extension policies from the pinned distro commit
169+
3. Regenerate `policyData.jsonc` by running `npm run export-policy-data` (see Step 4 above)
170+
4. Update the test fixture at `src/vs/workbench/contrib/policyExport/test/node/extensionPolicyFixture.json` with the new entry
171+
172+
### Test fixtures
173+
174+
The file `src/vs/workbench/contrib/policyExport/test/node/extensionPolicyFixture.json` is a test fixture that must stay in sync with the extension policies in the checked-in `policyData.jsonc`. When extension policies are added or changed in the distro, this fixture must be updated to match — otherwise the integration test will fail because the test output (generated from the fixture) won't match the checked-in file (generated from the real distro).
175+
176+
### Downstream consumers
177+
178+
| Consumer | What it reads | Output |
179+
|----------|--------------|--------|
180+
| `policyGenerator.ts` | `policyData.jsonc` | ADMX/ADML (Windows GP), `.mobileconfig` (macOS), `policy.json` (Linux) |
181+
| `vscode-website` (`gulpfile.policies.js`) | `policyData.jsonc` | Enterprise policy reference table at code.visualstudio.com/docs/enterprise/policies |
182+
| `vscode-docs` | Generated from website build | `docs/enterprise/policies.md` |
136183

137184
## Examples
138185

.github/skills/agent-sessions-layout/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
name: agent-sessions-layout
3-
description: Agent Sessions workbench layout — covers the fixed layout structure, grid configuration, part visibility, editor modal, titlebar, sidebar footer, and implementation requirements. Use when implementing features or fixing issues in the Agent Sessions workbench layout.
3+
description: Agents workbench layout — covers the fixed layout structure, grid configuration, part visibility, editor modal, titlebar, sidebar footer, and implementation requirements. Use when implementing features or fixing issues in the Agents workbench layout.
44
---
55

6-
When working on the Agent Sessions workbench layout, always follow these guidelines:
6+
When working on the Agents workbench layout, always follow these guidelines:
77

88
## 1. Read the Specification First
99

10-
The authoritative specification for the Agent Sessions layout lives at:
10+
The authoritative specification for the Agents layout lives at:
1111

1212
**`src/vs/sessions/LAYOUT.md`**
1313

@@ -55,7 +55,7 @@ When proposing or implementing changes, follow these rules from the spec:
5555
|------|---------|
5656
| `sessions/LAYOUT.md` | Authoritative layout specification |
5757
| `sessions/browser/workbench.ts` | Main layout implementation (`Workbench` class) |
58-
| `sessions/browser/menus.ts` | Agent sessions menu IDs (`Menus` export) |
58+
| `sessions/browser/menus.ts` | Agents menu IDs (`Menus` export) |
5959
| `sessions/browser/layoutActions.ts` | Layout actions (toggle sidebar, panel, secondary sidebar) |
6060
| `sessions/browser/paneCompositePartService.ts` | `AgenticPaneCompositePartService` |
6161
| `sessions/browser/media/style.css` | Layout-specific styles |
@@ -67,7 +67,7 @@ When proposing or implementing changes, follow these rules from the spec:
6767
| `sessions/browser/parts/panelPart.ts` | Panel part |
6868
| `sessions/browser/parts/projectBarPart.ts` | Project Bar part (folder entries, icon customization) |
6969
| `sessions/contrib/configuration/browser/configuration.contribution.ts` | Sets `workbench.editor.useModal` to `'all'` for modal editor overlay |
70-
| `sessions/contrib/sessions/browser/sessionsTitleBarWidget.ts` | Title bar widget and session picker |
70+
| `sessions/contrib/sessions/browser/sessionsTitleBarWidget.ts` | Title bar widget and agent picker |
7171
| `sessions/contrib/chat/browser/runScriptAction.ts` | Run script split button for titlebar |
7272
| `sessions/contrib/accountMenu/browser/account.contribution.ts` | Account widget for sidebar footer |
7373
| `sessions/electron-browser/parts/titlebarPart.ts` | Desktop (Electron) titlebar part |

.github/skills/component-fixtures/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Use tools `mcp_component-exp_`* to list and screenshot fixtures. If you cannot s
1111

1212
## Running Fixtures Locally
1313

14-
1. Start the component explorer daemon: run the **Launch Component Explorer** task
14+
1. Start the component explorer server: run the **Component Explorer Server** task
1515
2. Use the `mcp_component-exp_list_fixtures` tool to see all available fixtures and their URLs
1616
3. Use the `mcp_component-exp_screenshot` tool to capture screenshots programmatically
1717

.github/skills/sessions/SKILL.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
name: sessions
3-
description: Agent Sessions window architecture — covers the sessions-first app, layering, folder structure, chat widget, menus, contributions, entry points, and development guidelines. Use when implementing features or fixing issues in the Agent Sessions window.
3+
description: Agents window architecture — covers the agents-first app, layering, folder structure, chat widget, menus, contributions, entry points, and development guidelines. Use when implementing features or fixing issues in the Agents window.
44
---
55

6-
When working on the Agent Sessions window (`src/vs/sessions/`), always follow these guidelines:
6+
When working on the Agents window (`src/vs/sessions/`), always follow these guidelines:
77

88
## 1. Read the Specification Documents First
99

@@ -41,13 +41,13 @@ vs/sessions ← Agent Sessions window (this layer)
4141

4242
### 2.3 How It Differs from VS Code
4343

44-
| Aspect | VS Code Workbench | Agent Sessions Window |
44+
| Aspect | VS Code Workbench | Agents Window |
4545
|--------|-------------------|----------------------|
4646
| Layout | Configurable part positions | Fixed layout, no settings customization |
4747
| Chrome | Activity bar, status bar, banner | Simplified — none of these |
4848
| Primary UX | Editor-centric | Chat-first (Chat Bar is a primary part) |
4949
| Editors | In the grid layout | Modal overlay above the workbench |
50-
| Titlebar | Menubar, editor actions, layout controls | Session picker, run script, toggle sidebar/panel |
50+
| Titlebar | Menubar, editor actions, layout controls | Agent picker, run script, toggle sidebar/panel |
5151
| Navigation | Activity bar with viewlets | Sidebar (views) + sidebar footer (account) |
5252
| Entry point | `vs/workbench` workbench class | `vs/sessions/browser/workbench.ts` `Workbench` class |
5353

@@ -154,7 +154,7 @@ The main editor part is hidden (`display:none`). All editors open via `MODAL_GRO
154154

155155
## 5. Chat Widget
156156

157-
The Agent Sessions chat experience is built around `AgentSessionsChatWidget` — a wrapper around the core `ChatWidget` that adds:
157+
The Agents chat experience is built around `AgentSessionsChatWidget` — a wrapper around the core `ChatWidget` that adds:
158158

159159
- **Deferred session creation** — the UI is interactive before any session resource exists; sessions are created on first message send
160160
- **Target configuration** — observable state tracking which agent provider (Local, Cloud) is selected
@@ -172,17 +172,17 @@ Read `browser/widget/AGENTS_CHAT_WIDGET.md` for the full architecture.
172172

173173
## 6. Menus
174174

175-
The agent sessions window uses **its own menu IDs** defined in `browser/menus.ts` via the `Menus` export. **Never use shared `MenuId.*` constants** from `vs/platform/actions` for agent sessions UI — use the `Menus.*` equivalents instead.
175+
The agents window uses **its own menu IDs** defined in `browser/menus.ts` via the `Menus` export. **Never use shared `MenuId.*` constants** from `vs/platform/actions` for agents window UI — use the `Menus.*` equivalents instead.
176176

177177
| Menu ID | Purpose |
178178
|---------|---------|
179179
| `Menus.ChatBarTitle` | Chat bar title actions |
180-
| `Menus.CommandCenter` | Center toolbar with session picker widget |
180+
| `Menus.CommandCenter` | Center toolbar with agent picker widget |
181181
| `Menus.CommandCenterCenter` | Center section of command center |
182182
| `Menus.TitleBarContext` | Titlebar context menu |
183183
| `Menus.TitleBarLeftLayout` | Left layout toolbar |
184-
| `Menus.TitleBarSessionTitle` | Session title in titlebar |
185-
| `Menus.TitleBarSessionMenu` | Session menu in titlebar |
184+
| `Menus.TitleBarSessionTitle` | Agent title in titlebar |
185+
| `Menus.TitleBarSessionMenu` | Agent menu in titlebar |
186186
| `Menus.TitleBarRightLayout` | Right layout toolbar |
187187
| `Menus.PanelTitle` | Panel title bar actions |
188188
| `Menus.SidebarTitle` | Sidebar title bar actions |
@@ -201,7 +201,7 @@ Defined in `common/contextkeys.ts`:
201201
| `activeChatBar` | `string` | ID of the active chat bar panel |
202202
| `chatBarFocus` | `boolean` | Whether chat bar has keyboard focus |
203203
| `chatBarVisible` | `boolean` | Whether chat bar is visible |
204-
| `sessionsWelcomeVisible` | `boolean` | Whether the sessions welcome overlay is visible |
204+
| `sessionsWelcomeVisible` | `boolean` | Whether the agents welcome overlay is visible |
205205
## 8. Contributions
206206

207207
Feature contributions live under `contrib/<featureName>/browser/` and are registered via imports in `sessions.desktop.main.ts` (desktop) or `sessions.common.main.ts` (browser-compatible).
@@ -210,8 +210,8 @@ Feature contributions live under `contrib/<featureName>/browser/` and are regist
210210

211211
| Contribution | Location | Purpose |
212212
|-------------|----------|---------|
213-
| **Sessions View** | `contrib/sessions/browser/` | Sessions list in sidebar, session picker, active session service |
214-
| **Title Bar Widget** | `contrib/sessions/browser/sessionsTitleBarWidget.ts` | Session picker in titlebar center |
213+
| **Sessions View** | `contrib/sessions/browser/` | Agents list in sidebar, agent picker, active session service |
214+
| **Title Bar Widget** | `contrib/sessions/browser/sessionsTitleBarWidget.ts` | Agent picker in titlebar center |
215215
| **Account Widget** | `contrib/accountMenu/browser/` | Account button in sidebar footer |
216216
| **Chat Actions** | `contrib/chat/browser/` | Chat actions (run script, branch, prompts, customizations debug log) |
217217
| **Changes View** | `contrib/changesView/browser/` | File changes in auxiliary bar |
@@ -229,7 +229,7 @@ Feature contributions live under `contrib/<featureName>/browser/` and are regist
229229

230230
### 8.2 Service Overrides
231231

232-
The agent sessions window registers its own implementations for:
232+
The agents window registers its own implementations for:
233233

234234
- `IPaneCompositePartService``AgenticPaneCompositePartService` (creates agent-specific parts)
235235
- `IPromptsService``AgenticPromptsService` (scopes prompt discovery to active session worktree)
@@ -241,7 +241,7 @@ Service overrides also live under `services/`:
241241

242242
### 8.3 `WindowVisibility.Sessions`
243243

244-
Views and contributions that should only appear in the agent sessions window (not in regular VS Code) use `WindowVisibility.Sessions` in their registration.
244+
Views and contributions that should only appear in the agents window (not in regular VS Code) use `WindowVisibility.Sessions` in their registration.
245245

246246
## 9. Entry Points
247247

0 commit comments

Comments
 (0)