Skip to content

Main#4

Open
davidkivuyo wants to merge 1334 commits into
codeerfrom
main
Open

Main#4
davidkivuyo wants to merge 1334 commits into
codeerfrom
main

Conversation

@davidkivuyo

Copy link
Copy Markdown
Owner

No description provided.

mutl3y and others added 30 commits June 5, 2026 18:32
…bsent in VS Code web (#317780)

fix(terminal): use canHandleResource to avoid ENOPRO in getCwdResource on VS Code web

In VS Code Server (server-linux-x64-web) accessed via browser, the terminal's
remoteAuthority is falsy so URI.file() is produced in getCwdResource(). The
browser FileService has no file:// provider registered (only the remote
provider), causing ENOPRO on every Copilot agent tool call.

Replace the blanket try/catch with a targeted canHandleResource() guard so that
provider errors are detected before calling exists(), while other genuine errors
from fileURI()/URI.file() remain surfaced to callers.

Also adds a unit test covering the ENOPRO / provider-absent scenario.

Discovered during deployment: workbench.web.main.internal.js (the server-side
agentHost bundle) requires the same fix as workbench.js (the browser-side
bundle), since the agentHost process loads the server bundle independently.

Fixes: getCwdResource() returning ENOPRO when file:// provider absent
Addresses: Copilot PR review feedback on blanket catch scope and missing test

Co-authored-by: mutl3y <mutl3y@users.noreply.github.com>
* Add context size picker for Claude Code models

Surface CAPI tiered context windows (e.g. 200K vs 1M) in the Claude Code model picker, plumb the selected size through session state into the language model server's modelMaxPromptTokens override so internal accounting reflects the chosen tier. CAPI bills the long-context tier automatically based on actual prompt size, so no extra header/flag is required.

Refs #319039

* Use picked context size directly as prompt budget

tokenPricing.default.contextMax and modelMaxPromptTokens are both prompt-token limits per the IChatEndpoint contract. Subtracting DEFAULT_MAX_OUTPUT_TOKENS under-reported the selected tier (1,000,000 became 936,000). Pass sessionContextSize through directly, matching how the Copilot LM provider applies cloneWithTokenOverride.
terminal: preserve symlink paths in sandbox policies
…hange (#320165)

* Bind MCP auth grants to the server URL to require re-consent on URL change

An MCP auth grant was previously keyed only by server id, so re-pointing a server at a new URL (while keeping the same id) would silently reuse a token the user consented to for the original endpoint. Store the URL the grant was made for and only release the token when the server's current URL still matches, otherwise re-prompt. Cosmetic origin differences (host case, default port, root trailing slash) are normalized via WHATWG URL so they don't force spurious re-consent, while a path trailing slash is preserved as a meaningful difference. Stdio servers (no URL) and product.json trusted servers are unaffected.

* Split id-only inspection from URL-gated access check

Address PR review: the optional mcpServerUrl conflated id-only inspection with the HTTP token-release gate. Split into isAccessAllowed (id only, used by the management/query API) and isAccessAllowedForUrl (URL required, used by the HTTP gate in mainThreadMcp). Auth is HTTP-only, so the gate now narrows the launch to HTTP and always passes the URL. Align the test mock with production semantics (canonical URL equality + legacy allowed===undefined => true) by reusing the exported urlsEqual helper.
Again doesn't seem to be a good use case for this
When typing at a semantic token boundary with injected text present
(e.g., inline decorations with `before.content`), characters could
briefly appear duplicated in the DOM for one render frame.

Root cause: `acceptInsertText` can expand one semantic token's range
while leaving the adjacent token at its old position, creating
overlapping ranges. `addSparseTokens` merged these into a backward
endOffset sequence because `emitToken` only rejected equal endOffsets
(`===`), not backward ones. When `LineTokens.withInserted()` iterated
these backward boundaries, it re-copied characters, duplicating them.

Fix: change `emitToken`'s guard from `===` to `<=` so backward
endOffsets are never emitted into the merged token array.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ow (#320169)

* chat: add experimental default chat provider setting for VS Code window

- Adds `chat.agentHost.defaultChatProvider` setting that mirrors the
  Agents window's `chat.agentHost.defaultSessionsProvider` but controls
  the default chat provider in the VS Code window's session-target
  picker. This lets users opt the local agent host (Copilot CLI) in as
  their default chat provider end-to-end.
- Wires the setting through the picker label/ordering, fresh chat
  session creation in `ChatViewPane`, and the 'new chat preserving
  type' flow so newly opened sidebar chats actually use the configured
  default. Explicit 'Local' selection from the picker still wins, so
  the override only applies when no explicit type is requested.
- Registers the setting in `chat.shared.contribution.ts` so it is
  available in both the VS Code window and the Agents window, and
  factors the 'effective default session type' decision into a shared
  `getDefaultNewChatSessionType` helper to avoid drift between the
  three call sites.

(Commit message generated by Copilot)

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

* use default session type as fallback for dropdown checked state

Addresses Copilot review feedback: keeps the picker label and the
dropdown's checked item consistent when no session is yet active.

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

---------

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

Also drop keypress/link events if webview isn't focused
…hout PRs (#319629)

* Add inline "Create pull request" confirmation for completed tasks without PRs

* Update

* Revert monaco change

* Review comments

* Fix

* Revert
- Add "vp" as an option to extensions/npm package.json scriptRunner enum and enumDescriptions
- Add localization string config.npm.scriptRunner.vp in package.nls.json

Replicates the changes proposed in #308794 by @jong-kyung.

Co-authored-by: Megan Rogge <meganrogge@Megans-MacBook-Pro.local>
* Browser `type` tool improvements

* Potential fix for pull request finding

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

* Potential fix for pull request finding

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

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Fix Copilot AH plugin sync errors on reconnection (#319744)

Two-part fix for #319744:

1. AHPFileSystemProvider gets a brief reconnection grace window. Per-
   authority entries keep a stack of connections (newest = active) and
   hold open requests across a transient disconnect. Watchers
   auto-reattach across reconnects via a class-level connection-change
   event. New tests cover reconnect grace, fallback to prior
   connection, immediate reject for never-registered authorities, and
   watch reattach across disconnect / late attach.

2. Plugin controller is split into two:
   - PluginController (shared, process-wide): host customizations,
     parsing helpers, and the IAgentPluginManager.
   - SessionPluginController (per CopilotAgentSession): client
     customizations, session-discovered on-disk customizations, and
     per-session enablement overrides. Publishes SessionActions
     directly via onDidPublish — no more clientId-based cross-session
     routing.

   ActiveClient is now Disposable, owns its SessionPluginController,
   and forwards publish events into the session's progress stream.
   setCustomizationEnabled fans out to every session controller,
   matching Claude's per-session model. sendMessage retries any
   previously-failed client customization sync so a transient
   connection drop during reconnection doesn't pin the error.

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

* Address Copilot review feedback

- agentHostFileSystemProvider: fix _getConnection race by re-checking
  state after subscribing
- agentHostFileSystemProvider: explicit void on fire-and-forget
  reattach() calls in watch()
- copilotAgent: remove duplicate JSDoc block on PluginController

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

* Use timeout(0) instead of setImmediate in browser-runnable tests

setImmediate is not available in WebKit, causing macOS / Browser CI
unit tests to fail.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Track redacted-ness with an explicit flag instead of inferring it from missing text. A regular thinking block with an empty text field but a valid signature (display: "omitted" or pruned) was misclassified as redacted_thinking and shipped the signature in the data field, which Anthropic rejects with "Invalid 'data' in 'redacted_thinking' block".
* Simplify SDK telemetry config

* remove unnecessary comment
…lot-proxy-to-capi

 Switch from Copilot Proxy to CAPI
* Fix Responses API reasoning id round-trip

Drop foreign thinking payloads when building Responses API reasoning input. Only genuine Responses reasoning items with rs-prefixed ids are round-tripped, preventing invalid_request_body failures for thinking_0 ids.

* Address Responses API reasoning test typing
* advanced autopilot: goal mode

* addres some comments
kycutler and others added 30 commits June 9, 2026 14:40
* Proxy browser requests in remote workspaces

* feedback

* Partial remote proxying

* back to https proxy

* clean

* refactor

* clean

* feedback
Add basic contributing guide for markdown extension
Pick up latest TS version for building VS Code
Fix empty Copilot client tool results

Successful client tool calls now return a non-empty placeholder when they have no text content, while preserving embedded resources for the model.

Fixes #315947

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts
#	src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts
…684)

Ctrl/Cmd+1..9 collided between two distinct command families in the agents
window: focusing a session already open in the grid vs opening the Nth session
from the list. On Windows both resolved to Ctrl+1..9, producing inconsistent
behavior (#320552) and Ctrl+9 opening the last session instead of the 9th
(#320553).

- Focus Session in Grid keeps Ctrl/Cmd+1..9 and now treats 9 as the LAST slot,
  matching core's Focus Last Editor Group.
- Open Session from list moves to Alt+1..9 (Win/Linux) and Ctrl+1..9 (macOS,
  WinCtrl) to avoid the collision and Option+digit symbol input on macOS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
agentHost: fix orphaned client tool calls after window reload
… #319001) (#319009)

The computePreferredOrganizationName method calls getCurrentAuthedUser()
which makes a network request to the GitHub API. When the network is
unavailable, this throws a TypeError: fetch failed that propagates as
an unhandled error. The function already handles errors for
getUserOrganizations but not for this initial auth check.

Add try/catch around getCurrentAuthedUser() to gracefully handle
network failures by returning undefined (same behavior as when the
user is not signed in). This is a best-effort operation - if the
network is unavailable, org-specific chat resources simply won't load.

Co-authored-by: vs-code-engineering[bot] <122617954+vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Paul <paul_wang347@hotmail.com>
…kspaces (#320671)

* Fix Chronicle session store corruption on remote (SSH/network FS) workspaces

* feedback update
* make handoff tooltip less sticky

* add telemetry and mute button

* update button names to be cooler
Update AHP version and add annotations channel support
* chat: send agent host completion attachments

- Adds hidden ranged attachments for accepted Agent Host skill and command completions so providers receive the selected completion metadata with the user message.
- Tracks accepted completion ranges instead of rediscovering slash tokens from provider metadata, preserving provider-owned _meta and avoiding collisions.
- Converts ranged file, skill, and command variables to AHP attachments so chat history and requests stay aligned.

Fixes microsoft/vscode#317907

(Commit message generated by Copilot)

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

* chat: address agent host completion review

- Replaces existing hidden Agent Host completion entries when the same id is accepted again so updated metadata and range tracking stay in sync.
- Marks request variable entry imports as type-only to avoid unnecessary runtime dependencies.

(Commit message generated by Copilot)

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

---------

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

* chat: use Copilot icon for Agent Host sessions in editor window

Agent Host (Copilot CLI) sessions shown in the editor window used the VS Code / VS Code Insiders codicon. Switch them to the Copilot icon so they match the Agent Host appearance in the Agents window. Removes the now-unused getAgentHostIcon() helper and its IProductService dependencies.

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

* chat: add icon test for AgentHostCopilot provider

Cover getAgentSessionProviderIcon(AgentHostCopilot) -> Codicon.copilot to guard against regressions, per PR review feedback.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: include Copilot logs in Agent Host debug export

Include matching Copilot SDK process logs when exporting Agent Host debug logs for Copilot CLI sessions. The export resolves the local or remote ~/.copilot/logs directory from the active session and stream-scans recent bounded log files for the session id before adding matching files to the archive. (Written by Copilot)

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

* chat: handle Copilot log stream cancellation safely

Keep the stream error listener attached when cancelling a matched Copilot log scan so the expected cancellation error is observed instead of reported as unexpected. (Written by Copilot)

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

* test: make Copilot logs URI assertion resilient

(Written by Copilot)

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

---------

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

* Add Folder picker chip for Agent Host sessions in multi-root windows

In a multi-root editor window the extension-host Copilot CLI shows a Folder
dropdown so users pick which root folder the single-cwd session runs in.
Agent Host sessions silently defaulted to folders[0]. This adds an equivalent
Folder picker chip backed by a per-window selection store that all
working-directory resolution sites consult.

- New IAgentHostNewSessionFolderService stores the chosen folder per
  not-yet-started session and fires a change event.
- The session handler, list controller, and config chips consult the store
  before falling back to the resolver / folders[0].
- A new OpenAgentHostFolderPickerAction + AgentHostFolderPickerActionItem
  render the chip (multi-root agent-host editor windows only), ordered last in
  the secondary chip row to match the extension-host Copilot CLI.
- The provisional session service recreates the provisional backend session at
  the newly-selected cwd (working directory is immutable post-create),
  preserving config.

(Written by Copilot)

* Fix CI: register folder service in fixtures and fix test type

- Register IAgentHostNewSessionFolderService mock in chat and inline
  chat component fixtures so AgentHostGenericConfigChips can be created.
- Make the getValue stub generic in the folder picker visibility test
  to satisfy IContext.getValue.

(Written by Copilot)

* Address review feedback for folder picker chip

- Validate the stored folder against current workspace folders; clear a
  stale selection and fall back to the first folder when the workspace
  changed.
- Label the chip with the matching workspace folder's name, falling back
  to basename only when no folder matches.
- Clear the per-session folder selection once the real backend session
  is created so the store doesn't retain state beyond the new-session
  phase.
- Mention the Folder picker in the chat accessibility help dialog.

(Written by Copilot)

* Keep folder picker chip visible-but-disabled for active sessions

Disable the chip via the action precondition (chatSessionIsEmpty) instead
of hiding it once the session has started, and clear the chosen folder on
session disposal rather than at creation time so the chip keeps showing the
correct folder and no longer flickers to the first folder during the
untitled-to-real session handoff.

(Written by Copilot)
The plaintext markdown renderer's codespan handler called escape() on text
that marked had already HTML-escaped during tokenization. The trailing
unescape pass in renderAsPlaintext only reverses one level, so entities
inside code spans leaked through double-escaped (e.g. & -> &amp;, < -> &lt;).
Removing the redundant escape() makes code spans match code-block behavior.

(Written by Copilot)
* OTel visibility in Copilot Chat UI (#47)

* [msrc/1.123] 114763

* Add maxAttributeSizeChars configuration to OpenTelemetry settings

---------


(cherry picked from commit 042dc59dbb51f58ef03a6909d5dfb0292a6b2576)

* Prompt before connecting to non-loopback remote host:port authorities (#46)

A direct `<host>:<port>` remote authority (no resolver `+` prefix) bypasses
resolver extensions and connects straight to the given server. Since this form
can originate from untrusted sources (e.g. the `remoteAuthority` of a
`.code-workspace` file), a crafted workspace could silently point the window's
extension host backend at an attacker-controlled server.

Centralize a confirmation prompt at the connection point in the renderer:
when resolving a direct authority whose host is not loopback (localhost,
127.0.0.1, ::1), ask the user to confirm before connecting and abort if
declined. Add `isLoopbackHost` helper and tests.

(cherry picked from commit 9505d0fca49eadb707c450d18dcb41a46b720a9e)

* GitHub - improve host parsing (#48)

(cherry picked from commit 4b6e2467dbd828018d602f73cc25d1b11f699d2c)

* path traversal fix (#50)

* fix path traversal

* fix compilation

(cherry picked from commit 9b31ff896671125cbfc65f33731c4a99660d6201)

* Path - improve isEqualOrParent calculation (#49)

(cherry picked from commit 0f1ba1ea103757f3023cc1f9c3eb7327c3ec4b02)

* Version bump to 1.123.1 (#52)

(cherry picked from commit db24d8bc83833082561ef0663e9479ed20f7b1ea)

* copilot: update engines.vscode to ^1.123.1

(cherry picked from commit ffa3c3f656c8df32d894e5f4d3673284d424205e)

* upgrading version to 1.123.2

* cherrypicking changes

---------








(cherry picked from commit 3c631b164c239e7aeaaae7c626b46c527b361af2)

Co-authored-by: Zhichao Li <Li.Zhichao@microsoft.com>
Co-authored-by: Zhichao Li <zhichli@microsoft.com>
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
Co-authored-by: Ladislau Szomoru <lszomoru@microsoft.com>
Co-authored-by: Sandeep Somavarapu <sasomava@microsoft.com>
Co-authored-by: ulugbekna <ulugbekna@gmail.com>
Co-authored-by: Megan Rogge <Megan.Rogge@microsoft.com>
Support skill slash completions when the token appears after whitespace in a user message while keeping slash commands leading-only.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* align picker text + update styling

* add separator
When a successful client tool result has no text but includes embedded resources, describe the attached image/file instead of returning the generic empty placeholder.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…etion-provider-for-agent-hos-9e247e0d

agentHost: complete skills after whitespace
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.