Skip to content

[mirror] microsoft/vscode#309218 Sessions test on property#1583

Open
austindyoung wants to merge 7266 commits intomainfrom
driftfence/mirror/pr-309218/latest
Open

[mirror] microsoft/vscode#309218 Sessions test on property#1583
austindyoung wants to merge 7266 commits intomainfrom
driftfence/mirror/pr-309218/latest

Conversation

@austindyoung
Copy link
Copy Markdown
Owner

Automated mirror PR for DriftFence counterfactual telemetry.

Source PR: microsoft#309218
Source URL: microsoft#309218
Mirror branch: driftfence/mirror/pr-309218/latest

This PR is maintained by automation for telemetry and review links.

joshspicer and others added 30 commits April 2, 2026 22:29
* chat: use supportedTypes instead of unsupportedTypes

Inverted to match the vscode API change. Providers now declare what
they support (whitelist) instead of what they don't (blacklist).
- Claude: Agent, Skill, Instructions, Hook
- CLI: Agent, Skill, Instructions

* fix: use 'builtin' groupKey matching vscode BUILTIN_STORAGE constant

SDK agents with synthetic URIs (no real file) use groupKey 'builtin'
so they appear under a 'Built-in' group header in the UI.

* test: add parity tests for supportedTypes and groupKey consistency

- Verify all returned items have a type matching supportedTypes
- Verify items with synthetic URIs (non-file scheme) use groupKey 'builtin'

* fix: improve CLI agent dedup with normalized name matching

The previous dedup logic did exact name matching between SDK agents
and file agents, which failed when:
- SDK uses underscores, files use hyphens (apple_docs vs apple-docs)
- SDK appends suffixes (apple_docs_investigator vs apple-docs)
- Files have .md extension instead of .agent.md

Now normalizes names by removing hyphens/underscores and uses
startsWith matching. Also preserves file URIs when matched so
workspace agents show their real file paths instead of synthetic URIs.

* refactor: remove explicit groupKey from providers, let vscode infer

groupKey should only be used for business-logic categories that vscode
can't infer (e.g. instruction sub-categories like 'loaded on demand').
For agents, skills, etc. vscode reliably infers the group from the URI:
- file: under workspace → Workspace
- file: elsewhere → User
- vscode-userdata: → Extensions (read-only)
- non-file schemes → Built-in

* fix: use exact name matching and URI dedup for CLI agents

- Replace startsWith prefix matching with exact normalized name lookup
  to prevent two CLI agents from matching the same file agent
- Add URI-based dedup so multiple CLI agents resolving to the same
  file produce only one item (first wins)
- Filter unmatched file agents through isCLIPath() to prevent agents
  from non-CLI directories (e.g. .claude/) from leaking into output
- Add tests for dedup, exact matching, and isCLIPath filtering

* refactor: split provideChatSessionCustomizations into per-type methods

Extract getAgentItems(), getInstructionItems(), getSkillItems() from the
monolithic provideChatSessionCustomizations. Also extract normalizeName()
helper for reuse.

* rename CLI_SUBPATHS/CLI_HOME_SUBPATHS to CLI_WORKSPACE_PREFIXES/CLI_HOME_PREFIXES

* refactor: add sourceUri to CLIAgentInfo, eliminate provider cross-referencing

Introduce CLIAgentInfo type wrapping SweCustomAgent + sourceUri.
CopilotCLIAgents.getAgentsImpl() now captures URIs at the merge point:
- SDK agents get synthetic copilotcli: URIs
- Prompt file agents get their real file: URIs

This eliminates the entire cross-referencing dance in the customization
provider's getAgentItems(), which collapsed from ~40 lines to a simple
map() call. Dedup and matching now happen once in CopilotCLIAgents
instead of being duplicated in the provider.

* simplify: remove isCLIPath filtering from customization provider

The prompt file service returns the right items — no need to
second-guess with path filtering. Removes isCLIPath(), the
CLI_WORKSPACE_PREFIXES/CLI_HOME_PREFIXES constants, and the
IWorkspaceService/INativeEnvService constructor dependencies.

* revert test version

* run npm run vscode-dts:update
* Implement fetchedValue

* Implement a compostible fetcher

* Keep cache hot

* Create a capi client fetched value

* Revert capi client change

* Fix tests

* Cleanup the middlewares to be a bit smarter

* cleanup stream cloning

* Update parse

* Fix window active cloning

* Fix tests

* Fix docs

* Update docs
…ft#307501)

* Paste clipboard resource in terminal when text is empty

* Restrict to file scheme

* better code
* Add pinch-to-zoom to integrated browser

* Fix add element to chat crop factor

* Copilot suggestion

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Clean up

* Use CDP instead of executeJavaScript

* Add setVisualZoomLevelLimits to did-navigate

* Add small comment

* PR Feedback

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Clearer instructions for URLs in browser open tool

* Update src/vs/workbench/contrib/browserView/electron-browser/tools/openBrowserTool.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* add isSystemInitiated and relevant changes

* simplify agent interaction type determination and add utility function for request kind mapping

* update proposed api

* resolve issue

* Address feedback

* update

* revert unrelated changes

* revert changes

* fix tests
)

* Sessions: Fix stopped session stuck in list as Working (microsoft#306883)

When a session was stopped before the agent created a worktree, the
temp session remained in the list permanently because the promises
waiting for session commit and cache population would never resolve.

- Bound _waitForCommittedSession with responseCompletePromise so it
  throws immediately when the response finishes without a commit
- Add timeouts and DisposableStore cleanup to both wait helpers to
  prevent leaked listeners
- Allow archive/delete on temp sessions via _cleanupTempSession
  fallback when _findAgentSession returns nothing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Sessions: Use response.isCanceled to bound waitForCommittedSession without arbitrary timeout

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Sessions: Address PR feedback — tighten safety timeouts and revert JSDoc

- Reduce both raceTimeout safety nets to 5s (commit wait and cache wait)
- Revert chatSessionsService.ts JSDoc to original wording
- Clarify _waitForSessionInCache comment: only runs once during init

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Sessions: Fix _cleanupTempSession leaking _sessionGroupCache; add tests for cancelled temp sessions

- Clear _sessionGroupCache entries in _cleanupTempSession to avoid stale
  ISession wrapper leaks in multi-chat mode
- Add tests covering delete/archive of uncommitted temp sessions and the
  cancellation path where commit never fires

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Sessions: Use isEqual for URI comparison in _waitForCommittedSession

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…7536)

Update the account menu signed-out label and ARIA text to say
"Agents Signed Out" / "Agents is signed out" instead of
"Copilot Signed Out" / "GitHub Copilot is signed out" in the
sessions app.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…microsoft#307538)

Reorganize the title bar session toolbar for better grouping and
navigation:

- Reorder toolbar actions: Run Script (8), Open in VS Code (9), Open
  Terminal (10), Changes toggle (11)
- Show Open in VS Code button for all sessions, disabled when no
  worktree is available (uses existing precondition instead of a
  separate placeholder action)
- Move separator from between toolbar containers to between session
  actions (Run, VS Code) and fixed toggles (Terminal, Changes) using
  a broader CSS selector for vscode icon variants
- Rename 'Add' category to 'Tasks' in the run script dropdown
- Add unit test for run dropdown menu contribution

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…t#4946)

* Add githubMcpServer.channel setting for MCP Insiders mode

* Address review: add union type and unit tests for channel setting

---------

Co-authored-by: Harald Kirschner <digitarald@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: digitarald <8599+digitarald@users.noreply.github.com>
Optional dependency that we don't want to use. This shouldn't be necessary, but if it somehow ends up getting built/installed at some point, let's strip it from the build

Co-authored-by: Copilot <copilot@github.com>
…error-telemetry

Add chat agent error telemetry and isError marker
… layout toolbar (microsoft#307539)

* Initial plan

* sessions: re-add vertical separator between session actions and right layout toolbar

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/d05ab2c6-653c-4bcf-9d2c-78bafe9b2bf7

Co-authored-by: osortega <48293249+osortega@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: osortega <48293249+osortega@users.noreply.github.com>
…rosoft#307541)

* fix: rename hooks button to 'Configure Hooks' in sessions window

The sessions path used 'New Hook (Workspace)' but the action opens
showConfigureHooksQuickPick which handles both viewing existing hooks
and creating new ones. Align with the core path label.

* fix: localize Configure Hooks label and update tooltip to match

Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/c164bdeb-c655-4c61-8e98-df409e3e0cfe

Co-authored-by: joshspicer <23246594+joshspicer@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
* Prevent repeated foreground summarization after failure

When foreground summarization fails (e.g. summary too large), the
outcome metadata is recorded on the turn. On subsequent
BudgetExceededErrors within the same turn, renderWithSummarization
checks for this metadata and skips the expensive LLM summarization
call, falling back directly to a no-cache-breakpoints render.

This prevents the user from seeing repeated 'Compacting...' progress
indicators and avoids wasting LLM calls on summarization that already
failed.

- Add retry guard in renderWithSummarization checking turn metadata
- Record failure metadata (source: foreground, outcome: errorKind)
- Add 4 tests covering failure metadata, success metadata, round.summary
  not set on failure, and retry guard contract

* Address review feedback: extract helpers, add telemetry, DRY tests

- Extract renderWithoutSummarization() helper to deduplicate fallback
  render logic between skip-path and failure-path
- Add triggerSummarizeSkipped telemetry event + GenAiMetrics counter
  when the retry guard activates
- Add comment documenting getLatestTurn() assumption
- Extract createSummarizationTestContext() helper to DRY test setup
- Fix test assertions: failed summarization throws from renderer
  (fallback lives in agentIntent.ts, not PromptRenderer)

* Simplify summarization failure tests
…ction (microsoft#307585)

* chore: use protocol from product configuration for openAgentsWindow action

* chore: address review feedback

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: fix build

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…soft#4945)

The ClaudeStreamingPassThroughEndpoint.getExtraHeaders() was overwriting
the base endpoint's anthropic-beta header with the SDK's filtered betas
instead of merging them. This caused context editing to fail because the
context-management beta header (set by chatEndpoint based on config) was
lost when the SDK sent its own anthropic-beta header.

Now uses a Set to merge and deduplicate both sources of beta headers.

Fixes microsoft#298471
…idget.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Handle if T is undefined

* Update window active middleware to throw

* Update DOC
hediet and others added 30 commits April 7, 2026 15:57
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…onbar-telemetry

actions: add WorkbenchActionBar with telemetry support
…ssions (microsoft#308224)

* WIP - Initial implementation

* Refactor things

* More refactoring

* Fix compilation errors
…nsi-test-inline

fix: strip ANSI escape codes from inline test output messages
…oft#308172)

Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
* fix checking active session provider

* Update src/vs/sessions/contrib/copilotChatSessions/browser/copilotChatSessionsActions.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…icrosoft#308236)

* feat: add script to migrate PRs from vscode-copilot-chat to vscode

* feat: enhance logging and add migration branch checks for PR migration script

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
* add logging

* copilot feedback

* add log service to mock
…sues' (microsoft#308245)

Co-authored-by: Copilot <copilot@github.com>
…ds for enhanced tool interaction (microsoft#307961)

* feat: add optional chatSessionResource parameter to MCP gateway methods for enhanced tool interaction

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.