Skip to content

Commit d539b6d

Browse files
committed
main merge
2 parents 855d2d9 + d271ea3 commit d539b6d

238 files changed

Lines changed: 8275 additions & 4944 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.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Copilot Chat Issues
4-
url: https://github.com/microsoft/vscode/issues/new?labels=chat-oss-issue
4+
url: https://github.com/microsoft/vscode/issues/new?template=copilot_bug_report.md
55
about: Please file issues related to Copilot Chat in the VS Code repository.
66
- name: Responsible AI Service response blocking
77
url: https://github.com/microsoft/vscode/issues/253130

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
run: pip install setuptools
4242

4343
- name: Restore build cache
44-
uses: actions/cache/restore@v4
44+
uses: actions/cache/restore@v5
4545
id: build-cache
4646
with:
4747
key: build_cache-${{ hashFiles('build/.cachesalt', 'package-lock.json') }}

.github/workflows/ensure-node-modules-cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
node-version-file: .nvmrc
2525

2626
- name: Restore build cache
27-
uses: actions/cache@v4
27+
uses: actions/cache@v5
2828
id: build-cache
2929
with:
3030
key: build_cache-${{ hashFiles('build/.cachesalt', 'package-lock.json') }}
@@ -64,7 +64,7 @@ jobs:
6464
architecture: 'x64'
6565

6666
- name: Restore build cache
67-
uses: actions/cache@v4
67+
uses: actions/cache@v5
6868
id: build-cache
6969
with:
7070
key: windows-build_cache-${{ hashFiles('build/.cachesalt', 'package-lock.json') }}

.github/workflows/npm-package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323

2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v6
2727

2828
- name: Setup Node.js
29-
uses: actions/setup-node@v4
29+
uses: actions/setup-node@v6
3030
with:
3131
node-version: 22.x
3232
cache: npm

.github/workflows/pr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
node-version-file: .nvmrc
2929

3030
- name: Restore build cache
31-
uses: actions/cache/restore@v4
31+
uses: actions/cache/restore@v5
3232
id: build-cache
3333
with:
3434
key: build_cache-${{ hashFiles('build/.cachesalt', 'package-lock.json') }}
@@ -98,7 +98,7 @@ jobs:
9898
run: pip install setuptools
9999

100100
- name: Restore build cache
101-
uses: actions/cache/restore@v4
101+
uses: actions/cache/restore@v5
102102
id: build-cache
103103
with:
104104
key: build_cache-${{ hashFiles('build/.cachesalt', 'package-lock.json') }}
@@ -157,7 +157,7 @@ jobs:
157157
158158
- name: Upload simulation output
159159
if: always()
160-
uses: actions/upload-artifact@v5
160+
uses: actions/upload-artifact@v7
161161
with:
162162
name: simulation-output-linux-${{ github.run_attempt }}
163163
path: .simulation-archive/simulation.tgz
@@ -191,7 +191,7 @@ jobs:
191191
run: pip install setuptools
192192

193193
- name: Restore build cache
194-
uses: actions/cache/restore@v4
194+
uses: actions/cache/restore@v5
195195
id: build-cache
196196
with:
197197
key: windows-build_cache-${{ hashFiles('build/.cachesalt', 'package-lock.json') }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,4 @@ test/aml/out
6161
.github/prompts/*.local.prompt.md
6262
.agents/skills/.local/
6363
.github/skills/.local/
64+
*.vsix

.vscode/settings.json

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
{
22
"files.trimTrailingWhitespace": true,
3-
"[typescript]": {
3+
"[typescript][typescriptreact][javascript]": {
44
"editor.insertSpaces": false,
5-
"editor.defaultFormatter": "vscode.typescript-language-features",
6-
"editor.formatOnSave": true,
7-
"editor.codeActionsOnSave": {
8-
"source.organizeImports": "always"
9-
}
10-
},
11-
"[typescriptreact]": {
12-
"editor.insertSpaces": false,
13-
"editor.defaultFormatter": "vscode.typescript-language-features",
14-
"editor.formatOnSave": true,
15-
"editor.codeActionsOnSave": {
16-
"source.organizeImports": "always"
17-
}
18-
},
19-
"[javascript]": {
20-
"editor.insertSpaces": false,
21-
"editor.defaultFormatter": "vscode.typescript-language-features",
225
"editor.formatOnSave": true,
236
"editor.codeActionsOnSave": {
247
"source.organizeImports": "always"

assets/prompts/skills/agent-customization/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Consult the reference docs for templates, domain examples, advanced frontmatter
3030
| Custom Agents | `*.agent.md` | `.github/agents/` | [Link](./references/agents.md) |
3131
| Skills | `SKILL.md` | `.github/skills/<name>/`, `.agents/skills/<name>/`, `.claude/skills/<name>/` | [Link](./references/skills.md) |
3232

33-
**User-level**: `{{USER_PROMPTS_FOLDER}}/` (*.prompt.md, *.instructions.md, *.agent.md; not skills)
33+
**User-level**: `{{VSCODE_USER_PROMPTS_FOLDER}}/` (*.prompt.md, *.instructions.md, *.agent.md; not skills)
3434
Customizations roam with user's settings sync
3535

3636
## Creation Process
@@ -43,7 +43,7 @@ Follow these steps when creating any customization file.
4343

4444
Ask the user where they want the customization:
4545
- **Workspace**: For project-specific, team-shared customizations → `.github/` folder
46-
- **User profile**: For personal, cross-workspace customizations → `{{USER_PROMPTS_FOLDER}}/`
46+
- **User profile**: For personal, cross-workspace customizations → `{{VSCODE_USER_PROMPTS_FOLDER}}/`
4747

4848
### 2. Choose the Right Primitive
4949

assets/prompts/skills/troubleshoot/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Base conclusions on evidence from logs. Do not guess.
2020

2121
## Data Source
2222

23-
{{DEBUG_LOG_RUNTIME_CONTEXT}}
23+
- Target session log directory/directories for analysis: `{{VSCODE_TARGET_SESSION_LOG}}`
2424

2525
Use direct debug log files written by Copilot Chat:
2626

docs/monitoring/agent_monitoring.md

Lines changed: 119 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,45 @@ invoke_agent copilot [~15s]
224224

225225
**`copilot_chat.time_to_first_token` attributes:** `gen_ai.request.model`
226226

227+
#### Agent Activity & Outcome Metrics
228+
229+
These metrics track the activity and outcomes of agentic code changes across all surfaces (agent mode, inline chat, background CLI, cloud sessions).
230+
231+
| Metric | Type | Unit | Description |
232+
|---|---|---|---|
233+
| `copilot_chat.edit.acceptance.count` | Counter | edits | Edit accept/reject decisions (inline chat, chat editing, hunk-level) |
234+
| `copilot_chat.chat_edit.outcome.count` | Counter | edits | File-level chat editing session outcomes (accepted/rejected/saved) |
235+
| `copilot_chat.lines_of_code.count` | Counter | lines | Lines of code added/removed by accepted agent edits |
236+
| `copilot_chat.edit.survival.four_gram` | Histogram | ratio (0-1) | 4-gram text similarity survival score |
237+
| `copilot_chat.edit.survival.no_revert` | Histogram | ratio (0-1) | No-revert survival score |
238+
| `copilot_chat.user.action.count` | Counter | actions | User engagement: copy, insert, apply, followup |
239+
| `copilot_chat.user.feedback.count` | Counter | votes | Thumbs up/down on chat responses |
240+
| `copilot_chat.agent.edit_response.count` | Counter | responses | Agent edit responses by success/error |
241+
| `copilot_chat.agent.summarization.count` | Counter | events | Context summarization outcomes (applied/failed) |
242+
| `copilot_chat.pull_request.count` | Counter | PRs | Pull requests created via CLI agent |
243+
| `copilot_chat.cloud.session.count` | Counter | sessions | Cloud/remote agent sessions by partner |
244+
| `copilot_chat.cloud.pr_ready.count` | Counter | events | Remote agent job PR ready notifications |
245+
246+
**`copilot_chat.edit.acceptance.count` attributes:** `copilot_chat.edit.source` (`inline_chat`/`chat_editing`/`chat_editing_hunk`/`apply_patch`/`replace_string`/`code_mapper`), `copilot_chat.edit.outcome` (`accepted`/`rejected`), `copilot_chat.language_id` (optional)
247+
248+
**`copilot_chat.chat_edit.outcome.count` attributes:** `copilot_chat.edit.source`, `copilot_chat.edit.outcome` (`accepted`/`rejected`/`saved`), `copilot_chat.language_id` (optional), `copilot_chat.has_remaining_edits` (optional)
249+
250+
**`copilot_chat.lines_of_code.count` attributes:** `type` (`added`/`removed`), `copilot_chat.language_id` (optional)
251+
252+
**`copilot_chat.edit.survival.four_gram` attributes:** `copilot_chat.edit.source`, `copilot_chat.time_delay_ms`
253+
254+
**`copilot_chat.edit.survival.no_revert` attributes:** `copilot_chat.edit.source`, `copilot_chat.time_delay_ms`
255+
256+
**`copilot_chat.user.action.count` attributes:** `action` (`copy`/`insert`/`apply`/`followup`)
257+
258+
**`copilot_chat.user.feedback.count` attributes:** `rating` (`positive`/`negative`)
259+
260+
**`copilot_chat.agent.edit_response.count` attributes:** `outcome` (`success`/`error`)
261+
262+
**`copilot_chat.agent.summarization.count` attributes:** `outcome` (`applied`/`failed`)
263+
264+
**`copilot_chat.cloud.session.count` attributes:** `partner_agent` (`copilot`/`claude`/`codex`)
265+
227266
### Events
228267

229268
#### `gen_ai.client.inference.operation.details`
@@ -278,6 +317,84 @@ Emitted for each LLM round-trip within an agent invocation.
278317
| `gen_ai.usage.output_tokens` | Output tokens this turn |
279318
| `tool_call_count` | Number of tool calls this turn |
280319

320+
#### Agent Activity & Outcome Events
321+
322+
These events provide drill-down detail for the agent activity metrics above. They are emitted as OTel log records.
323+
324+
##### `copilot_chat.edit.feedback`
325+
326+
Emitted when a user accepts or rejects a file-level edit from the agent.
327+
328+
| Attribute | Description |
329+
|---|---|
330+
| `outcome` | `accepted` or `rejected` |
331+
| `language_id` | Language of the edited file |
332+
| `participant` | Chat participant that proposed the edit |
333+
| `request_id` | Chat request identifier |
334+
| `edit_surface` | `agent` or `inline_chat` |
335+
| `has_remaining_edits` | Whether unreviewed edits remain |
336+
| `is_notebook` | Whether the file is a notebook |
337+
338+
##### `copilot_chat.edit.hunk.action`
339+
340+
Emitted when a user accepts or rejects an individual hunk.
341+
342+
| Attribute | Description |
343+
|---|---|
344+
| `outcome` | `accepted` or `rejected` |
345+
| `language_id` | Language of the edited file |
346+
| `request_id` | Chat request identifier |
347+
| `line_count` | Total lines in the hunk |
348+
| `lines_added` | Lines added |
349+
| `lines_removed` | Lines removed |
350+
351+
##### `copilot_chat.inline.done`
352+
353+
Emitted when an inline chat edit is accepted or rejected.
354+
355+
| Attribute | Description |
356+
|---|---|
357+
| `accepted` | `true` or `false` |
358+
| `language_id` | Language of the edited file |
359+
| `edit_count` | Number of edits suggested |
360+
| `edit_line_count` | Total lines across all edits |
361+
| `reply_type` | How the response was shown |
362+
| `is_notebook` | Whether the document is a notebook |
363+
364+
##### `copilot_chat.edit.survival`
365+
366+
Emitted at intervals (5s, 30s, 2min, 5min, 10min, 15min) after an edit is accepted, measuring how much of the AI-generated code survives.
367+
368+
| Attribute | Description |
369+
|---|---|
370+
| `edit_source` | `apply_patch`, `replace_string`, `code_mapper`, or `inline_chat` |
371+
| `survival_rate_four_gram` | 0-1 ratio of AI edit still present (4-gram similarity) |
372+
| `survival_rate_no_revert` | 0-1 ratio of edit ranges not reverted |
373+
| `time_delay_ms` | Milliseconds since edit acceptance |
374+
| `did_branch_change` | Whether git branch changed (ignore if `true`) |
375+
| `request_id` | Chat request identifier |
376+
377+
##### `copilot_chat.user.feedback`
378+
379+
Emitted when a user votes on a chat response (thumbs up/down).
380+
381+
| Attribute | Description |
382+
|---|---|
383+
| `rating` | `positive` or `negative` |
384+
| `participant` | Chat participant name |
385+
| `conversation_id` | Conversation session ID |
386+
| `request_id` | Chat request identifier |
387+
388+
##### `copilot_chat.cloud.session.invoke`
389+
390+
Emitted when a cloud/remote agent session is started.
391+
392+
| Attribute | Description |
393+
|---|---|
394+
| `partner_agent` | `copilot`, `claude`, or `codex` |
395+
| `model` | Model identifier |
396+
| `request_id` | Chat request identifier |
397+
281398
### Resource Attributes
282399

283400
All signals carry:
@@ -449,9 +566,9 @@ In your trace viewer, filter by `service.name` to see traces from specific agent
449566

450567
**Traces** — Visualize the full agent execution in Jaeger or Grafana Tempo. Each `invoke_agent` span contains child `chat` and `execute_tool` spans, making it easy to identify bottlenecks and debug failures. Subagent invocations appear as nested `invoke_agent` spans under `execute_tool runSubagent`.
451568

452-
**Metrics** — Track token usage trends by model and provider, monitor tool success rates via `copilot_chat.tool.call.count`, and watch perceived latency with `copilot_chat.time_to_first_token`. All metrics carry the same resource attributes (`service.name`, `service.version`, `session.id`) for consistent filtering.
569+
**Metrics** — Track token usage trends by model and provider, monitor tool success rates via `copilot_chat.tool.call.count`, and watch perceived latency with `copilot_chat.time_to_first_token`. Agent activity metrics (`copilot_chat.edit.acceptance.count`, `copilot_chat.edit.survival.four_gram`, `copilot_chat.lines_of_code.count`) power accept rate and edit survival dashboards. All metrics carry the same resource attributes (`service.name`, `service.version`, `session.id`) for consistent filtering.
453570

454-
**Events**`copilot_chat.session.start` tracks session creation. `copilot_chat.tool.call` events provide per-invocation timing and error details. `gen_ai.client.inference.operation.details` gives the full LLM call record including token usage and, when content capture is enabled, the complete prompt/response messages. Use `gen_ai.conversation.id` to correlate all signals belonging to the same session.
571+
**Events**`copilot_chat.session.start` tracks session creation. `copilot_chat.tool.call` events provide per-invocation timing and error details. `copilot_chat.edit.feedback` and `copilot_chat.edit.survival` events enable drill-down into which edits were accepted/rejected and how code survival varies by edit source. `copilot_chat.user.feedback` links thumbs-up/down votes to specific conversations for quality investigation. `gen_ai.client.inference.operation.details` gives the full LLM call record including token usage and, when content capture is enabled, the complete prompt/response messages. Use `gen_ai.conversation.id` to correlate all signals belonging to the same session.
455572

456573
---
457574

0 commit comments

Comments
 (0)