Commit Graph

159493 Commits

Author SHA1 Message Date
Alex Ross
d00a7238ac Try to fix another Copilot CLI bug (#321935) 2026-06-18 16:51:01 +02:00
Ladislau Szomoru
4f7bfe0d25 AgentHost - refactor the changeset operation service so that it can be added to the service collection (#321922)
* AgentHost - refactor the changeset operation service so that it can be added to the service collection

* Pull request feedback
2026-06-18 16:24:35 +02:00
Benjamin Christopher Simmonds
c917ed551e chat: align reveal unreviewed widget with agent feedback widget (#321907)
* chat: align reveal unreviewed widget with agent feedback widget

Use 'Agent Review' (not 'Code Review') as the kind label in both the reveal unreviewed confirmation and the agent feedback editor widget. Unify the kind badge color across both widgets and both kinds (PR Review + Agent Review) on the shared charts-purple token. Render the comment's file name via ResourceLabels so the file icon shows, and apply 6px 11px 6px 6px padding to the confirmation message.

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

* chat: register INotebookDocumentService in reveal unreviewed fixture

ResourceLabels (via ResourceLabelWidget) depends on INotebookDocumentService; the screenshot fixture failed to instantiate the file label without it. Register the mock alongside the other ResourceLabels dependencies.

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

* chat: snap reveal widget padding to the spacing token scale

11px was off the design-token spacing scale; use --vscode-spacing-size120 (12px) for the right padding and --vscode-spacing-size60 for the others so the design-token validator stays clean.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 13:10:35 +00:00
Don Jayamanne
fce843a4bc Enhance session management with structural equality checks for session workspace and folder, and update event firing logic for session changes (#321877)
* Enhance session management with structural equality checks for session workspace and folder, and update event firing logic for session changes

* Potential fix for pull request finding

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

* Refactor test for sessionWorkspaceEqual to improve readability and maintain consistency

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-18 22:53:02 +10:00
Benjamin Christopher Simmonds
98d5661808 sessions: attach agent feedback as annotations and resolve PR threads on resolve/delete (#321913)
* sessions: attach agent feedback as annotations and resolve PR threads

When submitting agent feedback for an agent-host session, attach the
just-submitted comments to the chat request so the agent receives them.
Each submitted comment is sent as its own MessageAnnotationsAttachment
referencing the session's annotations channel + annotation id, so the
agent reads content via the listComments tool and acts on exactly those
comments (with a simple-attachment fallback when no channel is known).

Also resolve the originating GitHub pull request review thread when a
PR-review feedback comment is resolved or deleted - whether by the user
or by the agent's resolveComments/deleteComments tools - via a single
observer on onDidChangeFeedback, reusing ICodeReviewService.

The act-on-feedback skill now instructs the agent to act on only the
attached comments when any are attached, otherwise all listed comments
or whatever the user specified.

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

* sessions: update agent-host attachment tests for feedback attachment behavior

Two pre-existing tests asserted that agent feedback variables were dropped
from agent-host requests (the old 'feedback lives in the annotations channel'
behavior). Now that submitted feedback is attached to the request, update both
to expect the simple-attachment fallback that is produced when no annotations
channel resource is known.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 12:40:52 +00:00
Ladislau Szomoru
3836b0a671 AgentHost - make AgentHostGitStateService a real service that is part of the service collection (#321917)
* AgentHost - make AgentHostGitStateService a real service that is part of the service collection

* 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>
2026-06-18 12:36:50 +00:00
Sandeep Somavarapu
88e5b5eb9e sessions: fix layout toggle/restore behavior and simplify folder tooltip (#321910)
* sessions: fix layout toggle/restore behavior and simplify folder tooltip

- Rename the title bar "Toggle Secondary Sidebar Visibility" action to
  ToggleSidePanelAction and make it toggle the editor + auxiliary bar
  together, remembering and restoring only the previously-visible parts.
- Fix several reload/session-switch restore bugs in the session layout
  controller: keep the auxiliary bar hidden after reload when a session
  with editors closed both parts, and avoid force-revealing the editor
  part on initial restore.
- Sync part-visibility context keys on reload so the editor title bar
  chevron reflects the restored auxiliary bar state.
- Remove the now-unused changesTitleBarWidget.
- Simplify the session header folder tooltip to always show the working
  directory path.
- Add KeybindingWeight.SessionsContrib for sessions keybindings.

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

* sessions: address review feedback on side panel toggle

- Replace the misleading Changes-view telemetry with a dedicated
  vscodeAgents.layout/toggleSidePanel event and remove the now-unused
  logChangesViewToggle helper.
- Update the command metadata description and screen reader announcements
  to use "Side Panel" terminology instead of "Secondary Side Bar".
- Document the Toggle Side Panel command in the Agents window
  accessibility help.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 12:01:58 +00:00
Ladislau Szomoru
e1941e0ed7 AgentHost - extract changeset subscriptions into a separate service (#321906)
* WIP - initial refactoring

* More refactoring

* Extract changeset subscriptions into a separate service

* Pull request feedback
2026-06-18 13:02:59 +02:00
Sandeep Somavarapu
fb668f16dd sessions: show repo and working dir on separate lines in session header hover (#321908)
Update the session header workspace hover to display the folder path and
git branch on separate lines. Always use the folder icon for the working
directory, and when the working directory differs from the repo root, show
the repo folder (with its original cloud/folder/worktree icon) on its own
line above the working directory.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 10:46:23 +00:00
Christof Marti
447b53ad32 Remove unused telemetry URLs, add note when proxySupport is not set to default (#321904) 2026-06-18 10:37:28 +00:00
Benjamin Christopher Simmonds
749a225d35 sessions: clear chat widget before loading new chat (#321894)
* sessions: clear chat widget before loading new chat

Clear the embedded ChatWidget immediately when a session view switches to a different chat resource so stale transcript content is not shown while the next model loads.

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

* sessions: address chat view swap feedback

Use value-based URI checks on chat load failures, cancel pending loads on dispose, and log any clear failures instead of ignoring the promise.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 10:26:06 +00:00
Alex Ross
193b1196d8 Add a second turn to the chat smoke tests (#319942)
* Reduce duplicate code

* Add a second turn to the chat smoke tests

* Fix tests

* "fix" sandbox test

* Make things work

* Get tests passing

* CCR feedback

* Simplify diff

* Undo chatView.ts changes

* Missing Claude warm up
2026-06-18 12:22:13 +02:00
Sandeep Somavarapu
ee44398a29 agent host: multi-chat session support for Copilot CLI (#321888)
* Implement multi-chat session support for Copilot CLI in Local Agent Host Provider

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

* Address CCR feedback: session-rename telemetry, createChat race, observable read

- Add dedicated onDidRenameSession event + agents/sessionRenamed telemetry
  so session-title renames are no longer misclassified as chat renames
- Re-check chat existence inside the per-session sequencer in createChat to
  avoid a race overwriting/disposing an already-registered conversation
- Cache mainChat.title read in chatCompositeBar autorun

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

* agentHost: dispatch default-chat turn lifecycle on session URI

After merging origin/main's default-chat compat layer, turn-lifecycle
actions (turnStarted, truncated, turnCancelled) must target the session
URI for the default chat (and the peer chat URI for peer chats), so the
server routes them to the default chat and subagent session URIs derive
correctly. Conversation side-channel actions and tool-call observation
keep using the resolved chat URI.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 09:54:11 +00:00
Alexandru Dima
0055e671b3 Guide terminal tool to request sandbox network/unsandboxed access proactively (#321650)
* Guide terminal tool to request sandbox network/unsandboxed access proactively

Rework the sandbox guidance in createSandboxLines so the model sets
requestAllowNetwork / requestUnsandboxedExecution on the FIRST attempt for
commands that clearly need them (git fetch/pull/push, package installs,
downloads for network; writes outside the workspace/$TMPDIR, system paths,
elevated privileges for unsandboxed), instead of running once, failing, and
retrying. Network-only needs are steered to requestAllowNetwork rather than
leaving the sandbox.

* Clean up and use an options bag

* Add a `sandboxMode`

* Simplify code

* Wording improvements

* More wording

* Improve instructions and add initial snapshot tests for them

* Also add schema to the snapshots

* fix unit tests

* Reduce filenames

* Review feedback

* More review feedback
2026-06-18 11:10:12 +02:00
Sandeep Somavarapu
fb05a90325 sessions: restore close button for the bottom panel (#321890)
Contribute the existing workbench.action.closePanel command to the
agents window panel title menu so the panel shows a Hide Panel (close)
button again. The action already carries the PanelVisibleContext
precondition, so it only appears while the panel is visible.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 08:40:07 +00:00
Ulugbek Abdullaev
18f683e0a7 Fix Agents window aux bar showing Files instead of Changes (#321611)
* Fix aux bar showing Files instead of Changes in Agents window

`_syncAuxiliaryBarVisibility` restored a saved active view container
unconditionally and always opened Files for untitled sessions, so:

- a stale saved "Files" selection (from a previous session switch or
  window shutdown) shadowed the "prefer Changes when there are changes"
  rule, and
- the Files pane was force-opened even when the user had hidden/unpinned
  it (open bypasses the pinned/hidden state).

Now:
- a saved Files selection is no longer restored as-is; the default logic
  decides Files vs Changes based on whether the session has changes,
- untitled sessions follow the same default (Changes when they have
  changes), and
- Files is only opened when its pane is still pinned; otherwise we fall
  back to Changes.

Fixes #321610

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

* Address Copilot review: align pinned check wording and test stub

- Reword the restore comment to say "pinned" only, matching the
  getPinnedPaneCompositeIds-based check.
- Make the IPaneCompositePartService test stub return pinned ids only
  (production does not treat an active-but-unpinned composite as pinned).
- Explicitly model the active container as pinned in the
  "remembers active view container on session switch" test.

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

* Preserve explicit pane choice; only fix untitled + hidden Files cases

Per feedback, persisting the user's explicit auxiliary bar choice across
session switches and restarts is intended and must be preserved. Restore
any saved active container (including Files) as long as its pane is still
pinned, instead of refusing to restore a saved Files selection.

The remaining genuine bugs are:
- untitled sessions with changes short-circuited to Files (now use the
  default, which prefers Changes when there are changes), and
- a hidden/unpinned Files pane was force-reopened (the pinned check now
  skips it and falls back to Changes).

Update the test that previously asserted Changes won over a saved Files
selection to instead assert the explicit Files choice is restored.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 10:30:45 +02:00
Don Jayamanne
77b96cfbad agentHost: handle no-op Copilot compaction errors (#321875)
Handle no-op Copilot compaction errors (#321827)

Treat Copilot CLI history compact errors containing "nothing to compact" as a successful no-op so /compact completes with the standard completion message.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 08:27:55 +00:00
Don Jayamanne
2fa0bc3c62 agentHost: generate Copilot worktree branch names (#321866)
* agentHost: generate Copilot worktree branch names

- Uses the Copilot utility completion service to create more meaningful worktree branch names from the user's original prompt, matching the generated-title-style behavior requested for Agent Host sessions.

- Keeps branch-name construction centralized so Copilot generation, old first-message slug fallback, and session-id fallback all produce consistent agents/ branches with the session id suffix where appropriate.

- Preserves worktree creation reliability by falling back to the previous local slug approach when utility generation is unavailable, invalid, or fails.

Fixes #321801

(Commit message generated by Copilot)

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

* agentHost: inject Copilot branch name generator

- Promotes CopilotBranchNameGenerator to an Agent Host DI service so CopilotAgent can depend on the branch-name abstraction directly instead of manually constructing it.

- Registers the generator alongside the Copilot API service in both Agent Host startup paths and test service collections.

- Keeps branch-name generation replaceable in tests and future callers while preserving the centralized fallback behavior.

(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>
2026-06-18 18:06:30 +10:00
Lee Murray
f59537d749 Merge pull request #321790 from microsoft/mrleemurray/editor-floating-panels-exploration
feat(workbench): experimental floating panels for the main workbench
2026-06-18 07:48:39 +01:00
Don Jayamanne
aae0b7190e Remove specific branch reference from git clone command in mixin-vscode-capi.yml (#321880) 2026-06-18 06:25:12 +00:00
Don Jayamanne
c5089d321b Update action retrieval to support argument forwarding in ChatContextUsageDetails (#321874) 2026-06-17 23:08:24 -07:00
Don Jayamanne
1a9787be44 Add constants for Copilot integration and update git clone command (#320997)
* Add COPILOT_INTEGRATION_ID and COPILOT_LICENSE_AGREEMENT constants for CAPI integration

* Update git clone command to specify branch and log integration ID in CopilotAgent

* 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>

* for testing

* Refactor CopilotApiService to override getIntegrationId for testing purposes

* Add licenseAgreement.ts to indentationFilter exclusions

* Add licenseAgreement.ts to unicodeFilter exclusions

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-18 16:01:10 +10:00
Hawk Ticehurst
fb60e8e547 Update workbench session list items to use pixel spinners (#321814)
* Update workbench session list items to use pixel spinners

* Address PR feedback

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

* Add needs input pixel spinner

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-17 22:40:33 -07:00
Paul
bc5305d748 Add support for Copilot CLI quotas in agent host (#321867) 2026-06-17 19:49:46 -07:00
Kyle Cutler
03a934e2f9 Fix improper URL encoding in browser editor titles (#321817) 2026-06-18 02:24:06 +00:00
Josh Spicer
9679e5fa49 Gate chat.agentHost.enabled behind editor preview policy (#321824)
* Gate chat.agentHost.enabled behind editor preview policy

Add a policy block to the agent host enabled setting so that
organizations with chat_preview_features_enabled set to false
will have the setting forced to false, matching the pattern used
by ChatHooks, ChatToolsAutoApprove, and other preview-gated settings.

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

* Fix minimumVersion, reuse NLS key, and update policy data

Address review feedback:
- Set minimumVersion to 1.126 (current VS Code version)
- Reuse existing NLS key to avoid duplicate translation entries
- Add ChatAgentHostEnabled to generated policyData.jsonc

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

* Gate chat.agentHost.enabled behind editor preview policy

Register the bare setting (type + default) in the common layer so the
main process knows the default for agent host spawning. The policy block
with its value callback is added via updateConfigurations in the browser
layer (agentHost/browser/agentHost.config.contribution.ts) because
functions cannot be structured-cloned over Electron IPC.

Co-authored-by: digitarald <digitarald@github.com>

---------

Co-authored-by: digitarald <digitarald@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-17 18:51:51 -07:00
Don Jayamanne
9b96420edb Avoid unneccesarily deleting dirs when syncing customizations (#321860)
* Avoid unneccesarily deleting dirs when syncing customizations

* test: add cases for rebundling behavior and file removal handling
2026-06-18 11:33:29 +10:00
Dmitriy Vasyura
13a3f8011b Remove dismissing of the trust dialog since workspace is now untrusted by default (#321854) 2026-06-17 18:19:30 -07:00
Paul
63384c0f5a Show per-turn costs for Claude in Agent Host (#321686) 2026-06-18 11:10:52 +10:00
Tyler James Leonhardt
db33d0d4e7 Suppress Copilot-Integration-Id on CAPI models discovery (#321855)
* Suppress Copilot-Integration-Id on CAPI models discovery

Forward the suppressIntegrationId option through ICopilotApiService.models() and opt in from the three premium model-discovery callers (ClaudeAgent, ClaudeProxyService, CodexAgent), mirroring their messages/responses calls. Without it, the limited 'vscode-nl' integration derived from the no-auth SKU causes CAPI to refuse premium models, so the model list comes back empty/limited. The internal gpt-4o-mini utility resolver is left untouched.

* Add models() suppressIntegrationId header test
2026-06-18 00:10:58 +00:00
Carl Brochu
46c7255039 Add SKU to enhance GH telemetry events (#321046)
* Add SKU to enhanced/restricted GH telemetry events

The sendEnhancedGHTelemetryEvent and sendEnhancedGHTelemetryErrorEvent
methods were not enriching events with the SKU field from the copilot
token, unlike sendGHTelemetryEvent which already did this.

This caused ~90% of copilot-chat telemetry events (engine.messages,
engine.messages.length, provideInlineEdit, etc.) to have null SKU in
the restricted telemetry pipeline.

Fixes microsoft/vscode-internalbacklog#7962

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

* Refactor: extract _addSku helper, only set sku when defined

Address PR feedback:
- Extract duplicated SKU logic into private _addSku method
- Only add sku property when token SKU is present (omit when undefined)

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

---------

Co-authored-by: Carl Brochu <carlbrochu@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-17 17:10:13 -07:00
Paul
e2b9235177 Restore model config for chat sessions (#321672) 2026-06-17 16:46:44 -07:00
Osvaldo Ortega
d8716e0178 Instrument Cloud Agent backend v1/v2 rollout behind an experiment (#321818)
* Instrument Cloud Agent backend v1/v2 rollout

Put the `chat.cloudAgentBackend.version` toggle (v1 = Jobs API, v2 = Task
API) behind an experiment so the rollout can be ramped and rolled back
remotely via ExP, and add an arm-tagged telemetry surface so the two
backends emit identical funnel and guardrail signals for apples-to-apples
monitoring.

Previously v1 was partly instrumented and v2 emitted nothing, making any
A/B comparison impossible. A shared `ICloudBackendInstrumentation` is now
injected into both backends and stamps every event with `backendVersion`,
covering session creation, activation, follow-up, and per-operation
errors, plus matching OTel metrics. v2's silent catch sites now report
through it, and `TaskApiError` carries the HTTP status for error
classification. Legacy v1 backend events are consolidated into the shared
surface and kept for dashboard continuity.

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

* Rename "arm" to "backend version" in cloud telemetry comments

"arm" is A/B-experiment jargon not used elsewhere in the codebase. Swap it
for "backend version" in comments, docstrings, and GDPR comment text to
match the existing `backendVersion` / v1 / v2 vocabulary. Comment-only
change; no identifiers or behavior affected.

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

* Address cloud backend rollout PR review comments

- Move backend_version attribute to the canonical github.copilot.* namespace
- Derive numeric HTTP status inside operationFailed so the status measurement is populated
- Carry HTTP status on v1 (Jobs API) invalid-job errors via JobsApiError so v1 create failures classify by status
- Only emit cloud pr_ready.count for v1 (Task API activation is a first turn, not a PR)
- Add unit tests for the new cloud metrics
- Document the new cloud operation/error metrics and backend_version attribute

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

* Fix TaskApiBackend construction in fetchSessionList specs

Three fetchSessionList test cases constructed TaskApiBackend without the
required instrumentation argument, failing the CI typecheck (TS2554).

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-17 16:41:16 -07:00
Logan Ramos
b4605859a5 Display session cost + persist context widget (#321803)
* Display session cost + persist context widget

* fix tests + comments
2026-06-17 23:03:22 +00:00
Benjamin Christopher Simmonds
c4125b9e33 chat: add viewUnreviewedComments agent-host tool with confirmation UI (#321804)
* chat: add viewUnreviewedComments agent-host tool with confirmation UI

The `listComments` server tool now appends a note when there are pull
request or code review comments the user has not accepted yet (still in
the `created` state), pointing the agent at a new `viewUnreviewedComments`
tool. The note is omitted when there are no such comments.

`viewUnreviewedComments` is a confirmation-gated server tool (excluded
from auto-approve for both Claude and Copilot). Its custom confirmation
renders each unreviewed comment with a checkbox (reveal to the agent or
not), the feedback kind badge and file, an action to open the file and
reveal the comment, and an action to delete the comment. Accepting moves
the checked comments to the Accepted state (revealed to the model and
shown in the UI); unchecked comments stay Created. The tool then returns
exactly the revealed comments.

The chat layer stays decoupled from the sessions feedback model via
commands registered by the agent feedback feature. Adds a component
explorer fixture for the confirmation UI.

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

* chat: address PR review feedback for viewUnreviewedComments

- Make the tool result precise: the confirmation now flags exactly the
  comments the user chose to reveal (pendingAgentReveal on the shared
  annotations meta, set via acceptFeedback({ revealToAgent: true })), and
  the server tool returns only those and clears the flag so later
  invocations don't re-return previously revealed/accepted comments.
- Match requiresConfirmation(toolName) signature in the test fakes.
- void the floating _populate() promise in the confirmation sub-part.
- createContentElement returns an empty string instead of throwing.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-17 22:44:43 +00:00
Benjamin Christopher Simmonds
82a91ac488 Merge pull request #321844 from microsoft/benibenj/hurt-roundworm
Add two new PR icons
2026-06-18 00:41:21 +02:00
Paul
94fec8d69e Address unified model picker feedback (#321812) 2026-06-17 22:03:08 +00:00
BeniBenj
80e534062c two new PR icons 2026-06-18 00:02:34 +02:00
Megan Rogge
f1339a4faf Revert "Add stream-stall telemetry to Anthropic Messages streaming (#321432)" (#321842)
Revert "Add idle watchdog + telemetry to Anthropic Messages streaming (#32143…"

This reverts commit f8574878be.
2026-06-17 22:02:28 +00:00
Ulugbek Abdullaev
5bcc8d9c64 nes: patch: implement fast yield line with cursor (#321841)
* nes: refactor: simplify patch repsonse handler

* nes: refactor: simpler name for response handler

* nes: remove unused Log kind for duplicate additions mode

* refactor(xtab): simplify XtabPatchResponseHandler

- Convert static class to namespace for better autocomplete ergonomics
- Extract duplicate-additions policy into applyDuplicatePolicy() returning
  an EditDecision discriminated union, flattening the main loop
- Remove DuplicateAdditionsMode.Log (already absent from enum)
- Remove onDuplicateRemoved callback (never used in production) along with
  OnDuplicateRemovedCallback and DuplicateAdditionRemovalSummary types
- Minor cleanups: explicit boolean return on Patch.addLine, remove
  redundant else/if branches in extractEdits

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

* nes: patch: implement fast yield line with cursor

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-17 23:55:02 +02:00
Ladislau Szomoru
73ac601f63 AgentHost - refactor how operations are refreshed (#321837)
* Refactor how we track changeset subscriptions

* Refactor how we update changeset operations
2026-06-17 23:54:14 +02:00
Bhavya U
532673aef9 Surface Agent Host (Copilot CLI) sessions in the Chat Debug Logs panel (#321809)
Adds a core-side IChatDebugLogProvider that reads each Agent Host Copilot CLI
session's on-disk events.jsonl and converts the records into debug-panel events,
reconstructing the user -> model-turn -> tool-call trajectory tree. Local and
remote (remote-<authority>-copilotcli) agent-host sessions are made debug-eligible,
historical local sessions are discovered for the home list, and the currently-viewed
session's events.jsonl is watched for live refresh.

Usage reporting:
- Session-cumulative input/cache tokens and Copilot AIU are back-filled from the
  session.shutdown summary onto model-turn events so the Summary tiles sum exactly;
  in-progress sessions fall back to live AHP session-state usage.

Lifecycle:
- Add IChatDebugService.onDidEndSession so the provider can dispose its live file
  watcher when the session it follows is closed.
2026-06-17 14:47:41 -07:00
Sandeep Somavarapu
ae6d4640a6 sessions: make session header diff stats clickable to open multi-file diff (#321815)
* sessions: make session header diff stats clickable to open multi-file diff

Adds a clickable diff-stats item to each session header that opens the
multi-file diff editor, and removes the branch name from the header title.

- Introduce a generic SessionHeaderMeta toolbar and a generic
  ViewAllChangesAction + action view item for the session header.
- Keep the Changes view's own ChangesDiffStatsAction/action item separate.
- Add a unified ISessionContext service used by the header, pickers and
  new chat input to resolve the active/scoped session.

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

* sessions: address CCR feedback on diff-stats header

- Only force a 50/50 editor split on first reveal (no cached grid width),
  so user-adjusted editor/sessions widths are preserved across show/hide.
- Add :focus-visible styling to the diff-stats action label for a visible
  keyboard focus indicator.
- Document the 'View All Changes' diff-stats affordance in the Agents window
  accessibility help.

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

* sessions: remove obsolete aux-bar-on-editor-reveal test

The editor->aux-bar enforcement was removed from the layout controller,
so the test asserting that behavior no longer applies.

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

* sessions: add component fixture for session header diff stats

Adds a component fixture rendering the real ViewAllChangesActionViewItem
(session header diff stats) across single/multiple-file, insertions-only,
deletions-only and no-changes states in Dark and Light themes. Exports the
action view item so the fixture renders the production component.

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

* sessions: migrate new permission-mode picker to ISessionContext after merge

A main commit added a permission-mode picker using the removed
ISessionInputContext service; point it at ISessionContext to match this
branch's migration.

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

* sessions: fix editor opening at minimum width on first reveal

The previous fix gated the even 50/50 split on the grid having no cached
editor width, but the grid always seeds a cached visible size from the
serialized descriptor, so the split never ran and the editor opened at its
minimum width.

Track the first reveal with a runtime flag instead: apply the even split
only the first time the editor is revealed in this workbench instance, and
treat a restored-visible editor as already split so user-adjusted widths are
preserved across show/hide cycles.

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

* sessions: add tests for editor even-split on first reveal

Cover the first-reveal split, no re-split on later reveals, and the minimum-width clamp using the existing prototype-harness pattern.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-17 21:43:34 +00:00
Benjamin Christopher Simmonds
1331bf30a3 Revert "sessions: keep PR icon visible for inactive sessions and limit PR polling (#321631)" (#321836)
This reverts commit 507c2387dc.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-18 02:41:27 +05:00
Josh Spicer
35054242b4 Document GitHub Copilot managed settings in add-policy skill (#321808)
* Document GitHub Copilot managed settings in add-policy skill

Add a github-managed-settings.md sub-file covering the new enterprise
managed-settings modality (native MDM / file / GitHub server -> the
canonical IPolicyData.managedSettings bag) and the policyReference
mechanism (one policy governing many settings). Update SKILL.md to link
the sub-file and refresh the policy-sources and key-files tables.

Grounded in PRs #318623, #320991, #321218, #321515.

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

* Tighten managed-settings skill after council fact-check

Cross-checked every claim against the source and the four PRs:
- Correct the channel count: VS Code feeds the bag from native MDM +
  server endpoint only; managed-settings.json is external-schema-only and
  not read by VS Code.
- Fix "JSON.parse" -> PolicyConfiguration.parse() (lenient JSONC visitor).
- Quote ManagedSettingValue verbatim (= PolicyValue).
- Clarify native MDM is a separate input merged in getPolicyData, not on
  policyData; document MDM-wins merge order precisely.
- Note schema is nested vs the flattened bag key; add the
  extraKnownMarketplaces github/git-only divergence alongside the strict
  boolean one.
- Soften the catalog claim: referencedSettings only captures references
  loaded at export time (sessions Claude ref absent from policyData.jsonc).
- Fix example file path (chat.shared.contribution.ts) and restore the
  chat_preview_features_enabled OR in the ChatToolsAutoApprove sample.
- Make the main.ts wiring snippet match the real two-step structure.

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

* Address PR review: annotate example minimumVersion values

Mark the concrete minimumVersion values in example blocks as historical
values transcribed from existing policies, with an inline note that new
policies derive minimumVersion from package.json major.minor (Step 1).

The file-based-channel and JSON.parse review comments were already
resolved in the prior council-fix commit.

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

* Clarify policy multiplexing in add-policy skill

After another pass through the policy wiring, clarify that
MultiplexPolicyService is used in two places: main-process OS/file policy
reader multiplexing, and renderer/session multiplexing of the main policy
channel with AccountPolicyService.

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

* Promote policyReference guidance to main add-policy skill

policyReference is a general policy mechanism, not specific to Copilot
managed settings. Make the main SKILL.md section self-contained with the
owner/reference model, validation rules, export behavior, IPC-safe
serialization, and diagnostics notes. Keep the managed-settings sub-file
as a cross-reference only for managed-settings-specific examples.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-17 23:35:21 +02:00
Martin Aeschlimann
81d69a3b56 copilot customization discovery: initial (#321829) 2026-06-17 23:35:03 +02:00
Giuseppe Cianci
71969046d4 Merge pull request #321796 from microsoft/agents/codex-harness-improvement-plan
Codex agent-host harness: feature parity + smoke coverage
2026-06-17 23:19:16 +02:00
Giuseppe Cianci
5dce713a20 Merge pull request #321798 from microsoft/agents/create-a-draft-pr-to-do-the-same-5eaa17f9
relauncher: prompt restart when chat.agentHost.codexAgent.enabled changes
2026-06-17 20:29:42 +02:00
Benjamin Christopher Simmonds
efee8f3150 chat: open new-file edit pills in a normal editor instead of diff (#321776)
When a chat file-edit pill represents a pure addition whose original version did not exist or was empty, clicking it now opens the file in a normal code editor instead of a diff editor.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-17 11:12:50 -07:00
Kyle Cutler
0c245a762d Improve hint message for remote browser errors (#321800) 2026-06-17 18:02:50 +00:00