Commit Graph

160147 Commits

Author SHA1 Message Date
Dmitriy Vasyura 7e0d11b950 Merge branch 'main' into dev/dmitriv/agent-host-implicit-context 2026-06-27 17:08:18 -07:00
Rob Lourens 0acdf031f1 Agent host: use assistant intent for session activity (#323298)
Map SDK assistant.intent events to AHP session activity now that report_intent has been removed. Preserve clearing on empty intents and when the session becomes idle.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 23:53:50 +00:00
Rob Lourens 3ed83a9bc1 AgentHost - nicer display messages for the feedback comment tools (#323228)
* AgentHost - nicer display messages for the feedback comment tools

The feedback comment server tools (addComment, listComments, deleteComments,
resolveComments, viewUnreviewedComments) had no special handling in the Copilot
agent host display layer, so they fell through to the generic
`Using/Used "<toolName>"` fallback.

Add dedicated invocation and past-tense messages for these tools in
copilotToolDisplay.ts. listComments reports the number of comments parsed from
the tool result (e.g. "Checked 3 comments"), falling back to "Checked comments"
when the result is missing or malformed. The result text is threaded through
getPastTenseMessage from both the live (copilotAgentSession) and history-replay
(mapSessionEvents) paths so the message is identical on reload.

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

* AgentHost - hoist server-tool display into the owning group

The feedback comment tools (addComment, listComments, deleteComments,
resolveComments, viewUnreviewedComments) are one provider-agnostic server-tool
group, but their display strings were authored per-provider, so only Copilot
rendered them nicely; Claude showed `Used "listComments"` and Codex showed
`Called listComments`.

Add a generic, optional `getDisplay(toolName, args, result?)` to
`IServerToolGroup` and let `feedbackServerToolGroup` implement it once
(including the listComments "Checked N comments" count). A new pure
`getServerToolDisplay` dispatcher in `serverToolGroups.ts` matches a tool by
bare name or transport-prefixed form (Claude's `mcp__host__<name>`), so each
provider's display layer (copilotToolDisplay, claudeToolDisplay,
codexMapAppServerEvents) consults it first and falls back to its generic
message otherwise. `serverToolGroups` is now the single source of truth wired
into AgentServerToolHost.

Comment-tool display strings move out of copilotToolDisplay.ts; exhaustive
coverage moves to serverToolGroups.test.ts with a delegation smoke check left
in copilotToolDisplay.test.ts.

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

* AgentHost - address Copilot review feedback

- Codex: pass the tool call's real arguments (params.item.arguments) to
  getServerToolDisplay at completion instead of undefined, matching the start
  branch and enabling args-dependent past-tense messages.
- Test: drop the unused `count` parameter from the listComments past-tense
  helper; the result text fully determines the expected message.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 23:53:30 +00:00
Dmitriy Vasyura 01812da37a Merge branch 'main' into dev/dmitriv/agent-host-implicit-context 2026-06-27 16:38:31 -07:00
Dmitriy Vasyura 649cbf6741 PR feedback 2026-06-27 16:37:42 -07:00
Alexandru Dima c94714755e smoke: write remote server exit diagnostics to a file (#323278)
* smoke: write remote server exit diagnostics to a file

The server exit diagnostics added in #322697 logged via `console.error` to
stderr, which on Windows is piped through the test resolver and a cmd.exe
batch wrapper. A process `exit` handler cannot flush that async pipe write
before the process dies, so the exit-time lines we care about most were
dropped: build 451044 captured 24 `installed` lines but zero `exit` /
`beforeExit` / signal lines.

Write the diagnostics synchronously with `fs.appendFileSync` into a
`server-exit-diagnostics.log` file under the server's `--logsPath` (captured
as a smoke artifact) so they survive teardown, while still mirroring to
stderr for live visibility. Remains gated behind VSCODE_SERVER_EXIT_DIAGNOSTICS
so the shipped product is unaffected.

Co-authored-by: Copilot <223556219+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>

* Potential fix for pull request finding

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

* smoke: prevent server exit diagnostics from looping on EPIPE

The first CI run with these diagnostics (PR #323278) reproduced the remote
server crash and the new `server-exit-diagnostics.log` file captured the
trigger: an unhandled `EPIPE` from a `console.warn`/`console.error` stdio
write after the host-proxy pipe closed (here, the node.js file watcher's
'watched path got deleted' warning). Node promotes that EPIPE to an uncaught
exception, which crashes the server.

But the diagnostics also mirrored each line to `console.error`, so logging
the EPIPE exception from inside the `uncaughtExceptionMonitor` handler wrote
to the same broken pipe, threw EPIPE again, and re-entered the handler —
515k iterations producing a 386MB log file in one run.

Fix: write diagnostics only to the file (never to stdout/stderr, the channel
under investigation), and add a re-entrancy guard on the uncaught-exception
handler so a logging failure can never recurse.

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

* smoke: restore a safe stderr mirror for exit diagnostics

Addresses PR review: the description states each diagnostic line is mirrored
to stderr for live visibility, but the previous fix dropped the mirror
entirely to break the EPIPE loop. Reintroduce the mirror in a crash-safe way
instead: keep the synchronous file write as authoritative, and additionally
write to stderr only while a `mirrorToStderr` latch is set. The latch is
turned off on the first synchronous write failure, and an `error` handler on
`process.stderr` swallows async pipe errors, so a broken pipe during teardown
can never throw (and re-enter `uncaughtExceptionMonitor`) again.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-27 23:34:25 +00:00
Rob Lourens 09994a14e3 Agent host: add CPU profiling command (#323287)
* Agent host: add CPU profiling command (Written by Copilot)

Add start and stop developer commands that profile the local Agent Host, save the resulting cpuprofile, and open it in the built-in profile viewer. Support both the regular workbench status bar and the Agents window notification flow.

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

* Agent host: sanitize saved CPU profiles (Written by Copilot)

Rewrite absolute call-frame paths and append a text suffix in built products before saving Agent Host CPU profiles.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 16:32:29 -07:00
Dmitriy Vasyura 9a3530c422 Updates
Co-authored-by: Copilot <copilot@github.com>
2026-06-27 16:29:16 -07:00
Dmitriy Vasyura 7deac1aae9 Fix merge issues 2026-06-27 16:24:25 -07:00
Dmitriy Vasyura 2b879594e8 Merge branch 'main' into dev/dmitriv/agent-host-implicit-context 2026-06-27 16:23:46 -07:00
Dmitriy Vasyura 50fda3b774 Updates 2026-06-27 14:54:35 -07:00
Rob Lourens 9da4a9bba4 Route Agents window session keybindings around terminal (#323288)
terminal: route session navigation keybindings to workbench

Ensure Agents window session navigation commands are handled by VS Code when the integrated terminal has focus, with regression coverage for the default skip-shell list. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 21:51:05 +00:00
Dmitriy Vasyura 4a027b51fb PR feedback
Co-authored-by: Copilot <copilot@github.com>
2026-06-27 14:47:26 -07:00
Ralph Feltis 2ed24731f8 Add chat quota trajectory nudge (#320683)
* Add chat quota trajectory nudge

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

* Limit chat input notification CSS changes

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

* Dismiss quota trajectory nudge on action

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

* Trim redundant quota trajectory test

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

* Update quota trajectory notification link

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

* Align quota trajectory nudge requirements

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

* Exclude Edu from quota trajectory nudge

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

* Instrument quota trajectory nudge telemetry

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

* Include Max in quota trajectory nudge

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

* Address quota nudge review feedback

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

* Integrate quota trajectory notification levels

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

* Gate quota nudge experiment by locale

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

* Simplify quota nudge locale guard

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

* Remove quota nudge notification kind

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

* Address quota nudge PR comments

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

* Trim quota nudge to essential lines

Remove redundant trajectory-shown signature dedup, duplicate storeTrajectoryShown calls, the redundant terminal baseline capture, dead canUpgradePlan test scaffolding, and cosmetic churn. Inline the single-use link-click handler.

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

* Enroll quota trajectory experiment just-in-time

Defer the getTreatment exposure until the user has met every condition
required to render the nudge, so treatment and control cohorts are
assigned at the same point and users who would never see the nudge are
not enrolled. Moves the locale check into candidate computation and
removes the eager-enrollment gate, restoring the original update flow.

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

* Consolidate trajectory enrollment into warning computation

Move the just-in-time experiment enrollment into
_computeQuotaTrajectoryWarning so _update stays lean. The method
dispatches the async assignment once every render condition is met and
returns a warning only for the treatment cohort; while assignment is
pending it returns undefined and the remainder of _update falls through.

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

* Restoring comment

* Do not treat unassigned trajectory treatment as control

getTreatment returns undefined when the user is not in the experiment
flight (or assignments are unavailable), which is distinct from being
assigned to a control cohort. Store the raw treatment value and render
the nudge only on an explicit 'enabled' value, instead of coercing a
missing assignment into a synthetic 'control' enrollment.

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

* Emit enrollment telemetry only when assigned to the experiment flight

Log a chatQuotaTrajectoryNudgeEnrolled event with the resolved treatment
value when the experiment service assigns the user to a flight (treatment
is defined), to measure experiment exposure across both arms. No
telemetry is emitted when TAS returns no assignment.

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

* Use config.-prefixed boolean treatment key for quota trajectory nudge experiment

ExP for VS Code requires experiment treatment keys to be prefixed with
config. The treatment is a simple yes/no, so use a boolean type instead
of a string.

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

* Align quota nudge telemetry with generic notification telemetry

Remove trajectory nudge shown and dismissed interaction telemetry now that
generic chat input notification telemetry covers those interactions. Keep the
learn more link click event because it is specific to this nudge.

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

* Address quota trajectory nudge review feedback

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

* Remove active trajectory telemetry state

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

* Refactor

* Retry CI after smoke test crash

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

* Remove quota trajectory locale gate

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

* Address quota trajectory review comments

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

* Update quota trajectory nudge copy

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

* Avoid extra chat model lookup helper

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

* Capitalize standalone quota trajectory link

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

* Add period to quota trajectory nudge copy

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

* Move quota trajectory SKU targeting to experiment

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

* Migrate quota nudge to Copilot experiment config

Resolve the quota trajectory nudge through the Copilot extension's experiment-based configuration service so SKU targeting remains in ExP and workbench avoids importing extension code directly.

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

* Avoid blocking quota experiment command activation

Register Copilot contributions before waiting for experimentation so the workbench command bridge can activate promptly. Bound the quota experiment treatment wait so transient experimentation initialization failures retry instead of hanging the workbench command indefinitely.

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

* Revert "Avoid blocking quota experiment command activation"

This reverts commit 6a3a1271aa.

* Register quota experiment command before treatment wait

Register the quota trajectory experiment bridge command before the Copilot extension waits for initial experiment treatments, so workbench callers do not silently miss enrollment while Copilot contributions are still blocked. Keep the command implementation shared with the context key contribution path.

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

* Fix Copilot command bridge CI failures

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

* Allow hidden quota trajectory experiment setting

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

* Generalize hidden advanced config validation

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

* Rerun PR checks

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

* Rerun PR checks

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

* Use workbench assignment for quota nudge

Resolve the quota trajectory treatment directly through the workbench assignment service and remove the Copilot extension command/config bridge.

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

* Revert unused config test workaround

Remove the package.json configuration test workaround now that the quota trajectory experiment no longer uses a Copilot setting.

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

* Restore isPublic-based advanced config test generalization

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

* no-mistakes(document): document IChatInputNotification.telemetryId field

* no-mistakes(review): fix quota telemetry: threshold, linkToAuto, trajectoryNudge id

* no-mistakes(document): Add doc comment for `canSwitchModelByIdentifier`

* no-mistakes(lint): Fixed missing sinon import in chatQuotaNotification test

* Remove engineering-system changes from quota PR

Restore package files and the Copilot configuration test workaround now that the quota experiment no longer uses a Copilot setting.

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

* Address quota trajectory review nits

Route treatment resolution failures through ILogService and simplify the trajectory treatment request path/comment.

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

* Remove unnecessary notification telemetry comment

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

* Clarify quota trajectory cohort lookup comment

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

* Rerun PR checks

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

* Assume Auto is available for quota nudge

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

* Refine quota nudge auto model handling

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

* Centralize Auto model selection detection and identifier

Revert the chatInputPart.ts additions (Auto is assumed always available) and
move 'is auto selected' into the common chatSelectedModel module as
isSelectedModelAuto, mirroring the sibling isSelectedModelCopilot. Export the
existing AUTO_MODEL_IDENTIFIER from languageModels.ts as the single source of
truth, reused by both the nudge's switch-to-Auto command and the detection
helper.

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

* Make Try Auto link work in Copilot CLI agent-host sessions

The quota trajectory nudge's Try Auto link was hardcoded to the 'copilot/auto' identifier for both detection and switching. In a Copilot CLI agent-host session the Auto model is registered as 'copilotcli:auto' and the general 'copilot/auto' is filtered out of the session's model pool, so the link silently no-opped and 'already Auto' was never detected.

Key Auto off the canonical metadata.id === 'auto' marker instead: add AUTO_MODEL_ID + ILanguageModelChatMetadata.isAutoModel, use it in isSelectedModelAuto, and add a session-aware ChatInputPart.switchToAutoModel() that the nudge calls. Works for both the Copilot panel and the Copilot CLI harness.

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

* Simplify quota trajectory nudge to a single learn-more link

Drop the "switch to Auto" capability and all Auto-model detection from the
quota trajectory nudge. The nudge now shows only a learn-more link to
https://aka.ms/token-usage-tips and logs chatQuotaTrajectoryNudgeLinkClicked
when clicked.

Revert the Auto-detection/switching scaffolding back to its pre-PR state:
- languageModels.ts: remove AUTO_MODEL_ID export, isAutoModel/isAutoModelIdentifier
- chatSelectedModel.ts: remove isSelectedModelAuto
- chatInputPart.ts: remove switchToAutoModel
- languageModels.test.ts: remove the corresponding suites

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 20:35:45 +00:00
Rob Lourens bcc323da54 sessions: Align session navigation keybindings (#323286)
sessions: align list navigation bracket shortcuts

Add the macOS bracket shortcuts used by editor navigation to the sessions list previous/next commands while preserving the sessions-only Alt+Up/Down alternates. Update the sessions list spec to document the navigation bindings. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 20:28:57 +00:00
Rob Lourens b129e7f3ca chat: dispose leaked request and toast listeners (#323230)
* chat: dispose request and toast listeners

Own language model cancellation callbacks and browser toast event listeners so they are cleaned up with their request-scoped disposable stores. Add regression coverage for completed language model requests.

(Written by Copilot)

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

* chat: strengthen cancellation listener test

Cancel the source token after response completion and verify cancellation is no longer forwarded to the extension host.

(Written by Copilot)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 18:55:49 +00:00
Rob Lourens b71651ed53 chat: Hide debug log export for Agent Host sessions (#323281)
chat: hide debug log export for agent host sessions

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 18:35:22 +00:00
Paul da4387232c Add smoke tests for model configs (#323205) 2026-06-27 17:51:29 +00:00
Connor Peet 998bb7522e Merge pull request #323272 from microsoft/connor/fix-peer-chat-first-send
sessions: keep peer chats loaded while sending
2026-06-27 10:51:11 -07:00
Connor Peet b02069d52a Agent host: keep peer chats loaded while sending
Hold the target peer chat model reference across the first send so ChatService does not reject newly-created subchats as unknown sessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 09:22:08 -07:00
Connor Peet b83c011c4c Merge pull request #323223 from microsoft/connor/agent-host-chat-channels
agentHost: route session state through chat channels
2026-06-27 08:55:43 -07:00
Ulugbek Abdullaev 4fc2b3348b NES: cache cross-file suggestions under the active document (#323150)
* NES: cache cross-file suggestions under the active document

When the model returns a Next Edit Suggestion for a document other than
the one being edited (cross-file NES), it was only cached under the target
document, so it could not be re-served until the user navigated there.
Also cache an `activeDoc (content + edit window) -> edit-in-target`
association so the suggestion can be re-served from cache while the cursor
is still in the active document.

A cross-file entry is served only while its target document is open and
byte-identical to the snapshot the edit's offsets index into; otherwise the
read path treats it as a cache miss and refetches, rather than serving a
misplaced edit or getting stuck re-serving a dead entry until the active
document changes. At stream end the active document is no longer cached as
"no edit" when a cross-file entry was just stored under the same key, which
would otherwise clobber it.

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

* Dispose provider and documents in runCrossFileScenario

Tear down the NextEditProvider (which registers autoruns/watchers on
openDocuments) and both documents at the end of each cross-file scenario
run so the tests are self-contained and do not accumulate observers.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 17:02:55 +05:00
Zhichao Li 1b43d57d78 Merge pull request #323227 from microsoft/zhichli/otelpolicy2
Enterprise OTel managed-settings policy for Copilot (extension + agent host)
2026-06-27 02:50:34 -07:00
Zhichao Li 997c3786fa docs(add-policy): warn that policyData must be regenerated in a clean env
A plain 'npm run export-policy-data' loads dev-profile extensions, injecting
referencedSettings the fixture-based PolicyExport integration test won't
produce — failing CI in a way that is not reproducible locally. Document the
isolated regeneration command.
2026-06-26 22:18:59 -07:00
Zhichao Li 0ce1f55d29 fix: regenerate policy data to match fixture-based export
The checked-in policyData.jsonc was generated with the Copilot extension
loaded, which injected referencedSettings linking the OTel extension
settings to the core CopilotOtel* policies. The PolicyExport integration
test regenerates using the test fixture distro with no user extensions, so
those referencedSettings are absent. Regenerate in an isolated environment
to match the fixture-based export.
2026-06-26 22:15:11 -07:00
Joaquín Ruales 9d449b8048 Allow setting agentHostChatToolsEnabled in stable (#316941) 2026-06-26 22:01:57 -07:00
Zhichao Li e5ec5abcc6 fix: register otel protocol/serviceName/resourceAttributes/headers config keys to match package.json 2026-06-26 21:38:28 -07:00
Zhichao Li 7b0180b3c3 docs: update OTel user + agent-host docs for managed-settings precedence and new settings 2026-06-26 21:38:27 -07:00
Zhichao Li e9a25536d6 refactor: address PR review — policy precedence docs, grpc transport inference, prototype-pollution hardening 2026-06-26 21:38:26 -07:00
Zhichao Li 649467ab6d fix: align agentOTelEnv test config with widened otlpProtocol type 2026-06-26 21:38:25 -07:00
Zhichao Li 597760e9ba Merge remote-tracking branch 'origin/main' into zhichli/otelpolicy2 2026-06-26 21:38:24 -07:00
Justin Chen 5b9be8ab46 actual fix for single tool calls thing that didn't work yesterday (#323234)
* actual fix for single tool calls thing that didn't work yesterday

* address comments
2026-06-27 04:35:48 +00:00
Connor Peet eb76ea0183 Agent host: align tests with chat channels
Fix client-tool completion routing to resolve providers by parent session while preserving the originating chat channel for provider callbacks.

Update agent host unit and protocol fixtures to dispatch chat actions on explicit AHP chat channels and keep subagent chat state separated from parent sessions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 21:20:37 -07:00
Dmitriy Vasyura 33ec9df282 PR feedback 2026-06-26 21:11:36 -07:00
Connor Peet 1620b63613 Agent host: require chat URI for sends
Make agent sendMessage receive both the parent session URI and the owning chat URI explicitly. This keeps default-chat sends from being mistaken for base64 session IDs and preserves the strict chat-channel invariant.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 20:31:09 -07:00
Dmitriy Vasyura f28738cfbf Merge branch 'main' into dev/dmitriv/agent-host-implicit-context 2026-06-26 19:41:31 -07:00
Dmitriy Vasyura 6b8c0586df Updates 2026-06-26 19:40:04 -07:00
Dmitriy Vasyura 067c9338c1 Handle user-attached unsaved docs as well 2026-06-26 19:16:32 -07:00
Justin Chen 98d7b285ad fix rounded separator in action widget (#323236) 2026-06-27 01:53:29 +00:00
Dmitriy Vasyura 3733d05a1b Reuse constant 2026-06-26 18:34:32 -07:00
Dmitriy Vasyura e2f6e29974 PR feedback 2026-06-26 18:30:34 -07:00
Dmitriy Vasyura 3eb1891409 Merge branch 'main' into dev/dmitriv/agent-host-implicit-context 2026-06-26 18:29:50 -07:00
Connor Peet 45448a01ca Merge origin/main into agent host chat channels
Resolve upstream conflicts while preserving strict AHP chat-channel routing and the PR feedback fixes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 17:35:30 -07:00
Rob Lourens 4c0e33c44a Show per-turn file changes summary for agent host chat responses (#323215)
* Show per-turn file changes summary for agent host chat responses

Render the "Changed N files" summary under completed agent host chat
responses, driven by the per-turn changeset the host computes
server-side (the same source as the Agents window Changes view) rather
than the chat editing session.

- Add IChatResponseFileChangesService, a per-session-type provider
  registry the changes-summary content part consults before falling back
  to the editing session. The summary part self-hides when the resolved
  diffs are empty, so turns with no edits show nothing.
- Add the agent host provider, which subscribes to the session's
  per-turn changeset (keyed by the response's turn id) and maps its
  files into edit-session diffs.
- Relax the chat list renderer gate so the summary is created for agent
  host responses (which emit external edits, not text edit groups).
- Extract a shared FileEdit normalization helper and reuse it across the
  external-edit, snapshot, and changeset mappers.

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

* Fix agent host handler tests and address review feedback

- Stub IChatResponseFileChangesService in the agent host chat
  contribution and client-tools tests, which instantiate
  AgentHostSessionHandler (it now registers a response file changes
  provider). This fixes the unit test failures.
- Use isEqual for rename detection in normalizeFileEdit, matching the
  prior adapter behavior (case-insensitive paths).
- Use the canonical agent-host-copilot chat session scheme in the
  provider test.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-27 00:29:49 +00:00
Connor Peet 5192cc2b76 Agent host: enforce chat-channel side effects
Address PR feedback by requiring chat actions and tool confirmations to flow on their AHP chat channels. Fix disconnected-client cleanup to iterate chats explicitly, normalize telemetry ids, and unblock subscription hydration on errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 17:25:39 -07:00
Zhichao Li 65bcc23a6d docs: remove internal OTel managed-settings planning notes 2026-06-26 16:58:47 -07:00
Dmitriy Vasyura 3f9cc9090f PR feedback 2026-06-26 16:52:23 -07:00
Dmitriy Vasyura d3ea11a5a5 Merge branch 'main' into dev/dmitriv/agent-host-implicit-context 2026-06-26 16:45:35 -07:00
Dmitriy Vasyura a340199244 PR feedback 2026-06-26 16:43:19 -07:00
Connor Peet dac0f5b391 Merge pull request #323211 from microsoft/connor4312/ahp-flattened-session-today
agentHost: adopt flattened session states and drafts
2026-06-26 16:40:57 -07:00