* Copilot CLI agent-host: experimentation overrides + config split
Ports reasoningEffortOverride and modelCapabilityOverrides from the Copilot
Chat extension to the Copilot CLI agent-host provider, and splits
Copilot-CLI-specific root-config keys into a dedicated schema.
- New settings chat.agentHost.reasoningEffortOverride and
chat.agentHost.modelCapabilityOverrides (experimental/advanced), forwarded
into the local agent host root config.
- New copilotCliConfig module owns CLI-only keys; opus48Prompt,
enableCustomTerminalTool, rubberDuck moved out of the shared schema (wire
strings unchanged, so persisted config stays valid).
- Reasoning-effort override applied at session create and mid-session model
change; family alias applied for prompt routing only (wire model id
untouched).
- Shared AgentHostRootConfigForwarder de-duplicates the settings->root-config
forwarding (schema gate, hydration retry, cross-window loop guard).
* agentHost: consolidate CLI setting IDs, extract sandbox forwarder, trim comments
- Move the chat.agentHost.* Copilot-CLI setting IDs into copilotCliConfig.ts
beside their root-config keys; rename the prompt contribution to
AgentHostCopilotCliSettingsContribution.
- Extract the sandbox settings forwarding into AgentHostSandboxForwarder.
- Trim verbose doc/inline comments across the changed agent-host files.
* agentHost: revert comment-only changes in agentHostSandboxForwarder (keep import change only)
* agentHost: clarify reasoning-effort override wording (recognized level vs model-supported)
Default plugin MCP server cwd to the plugin root when unset, and expand both plugin root aliases for all plugin formats.
Fixes#323475
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes two managed-settings (GHEC managed-settings.json) bugs:
- #324227: the default chat model was carried under `permissions.model`
by the server/file schema but read as the top-level `model` key, so the
`chat.defaultModel` policy (e.g. `auto`) was never applied to new chats.
Point COPILOT_MODEL_KEY at the flattened `permissions.model` path.
- #324263: the `ChatEnabledPlugins` policy was treated as a strict allowlist,
so any enterprise `enabledPlugins` entry blocked every plugin a user had
installed. Make it additive: a plugin is blocked only when explicitly
mapped to `false`.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Harald Kirschner <hkirschner@microsoft.com>
* sessions: single-pane add-tab tweaks and tab-bar border
Single-pane layout polish for the Agents window docked editor:
- Rename the `+` add-tab entries "New File" -> "Files" and "New Browser"
-> "Browser".
- Add a "Search" add-tab entry (Cmd+K S) that opens a new Search editor.
- Show the "Changes" and "Files" add-tab entries only when their managed
tab is closed, driven by new context keys
(SinglePaneChangesTabMissingContext / SinglePaneFilesTabMissingContext)
set by the layout controller; reopening clears the tab's dismissal so
the controller resumes managing it.
- Give the editor tab bar a bottom border using the same agentsPanel
border the parts use, and repeat it along the docked detail panel's top
edge so the separator runs the full width.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: add tests for add-tab context keys and actions (CCR)
Address Copilot Code Review feedback on #324514:
- Add unit tests for NewSearchTabAction (invokes openNewSearchEditor) and
NewChangesTabAction (opens the changes editor for the active session, and
no-ops without one).
- Add layout-controller tests asserting the SinglePaneChangesTabMissingContext
/ SinglePaneFilesTabMissingContext keys flip true when a managed tab is
closed, and that reopening the Changes tab clears its dismissal and the
missing context.
To make the context keys observable/deterministic in tests, compute them
from the final group state at the end of `_syncManagedTabs` (in the finally,
guarded by generation) instead of synchronously in the autorun before the
async tab reconciliation ran.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* nes: dedupe NextEditProvider streamed-edit handling into shared helper
Extract the per-edit rebase+cache logic shared by the regular fetch path
(`_executeNewNextEditRequest`) and the speculative path
(`_runSpeculativeProviderCall`) into a single `_cacheStreamedEdit` method.
Both loops previously open-coded the same convert -> rebase -> compose ->
setKthNextEdit -> cross-file cache pipeline, which had started to drift.
Also:
- extract the inline doc-state type into a named `DocState` interface and
mark the non-reassigned fields `readonly`
- reuse the existing exported `StreamedEdit` type instead of a local
duplicate
Behavior-preserving: the only differences are trace-level log messages.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* nes: rename _cacheStreamedEdit to _rebaseAndCacheStreamedEdit
The method does more than cache: it also rebases the streamed edit onto the
edits applied so far and mutates the per-doc accumulators. The new name
reflects that wider responsibility.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* nes: pass _rebaseAndCacheStreamedEdit args as an options object
Replace the nine positional parameters with a single typed
RebaseAndCacheStreamedEditArgs object and group the active-document fields
(id, contents, cursorOffset) under `activeDoc`. This removes the
call-site ambiguity of several same-typed/optional positional arguments.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* nes: let _rebaseAndCacheStreamedEdit own docContents advancement
Previously the helper mutated editsSoFar/nextEdits/patchIndices and the
cache, but left advancing the target document's running `docContents` to
each caller (a foot-gun: a future caller could forget it, desyncing the
cache key from subsequent edits).
The helper now owns the full per-edit state transition: it snapshots the
pre-edit contents, populates the cache against that snapshot, then advances
`docContents`. The snapshot is returned as `docContentsBeforeEdit` so the
regular path can still log the first edit against the pre-edit contents.
`targetDocState` is no longer returned, so callers can't mutate it.
Behavior-preserving.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* nes: drop redundant targetDocument fallback in _rebaseAndCacheStreamedEdit
StreamedEdit.targetDocument is a required DocumentId, so the
`?? activeDoc.id` fallback was dead code that could mislead readers into
thinking targetDocument may be omitted. Addresses PR review feedback.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Only show completion feedback command for paid users
The 'Send Copilot Completion Feedback' command is attached to every
inline completion list, which surfaces the feedback button for all
users including free and unauthenticated ones. This has been a source
of low-signal issue-tracker spam.
Gate the command so it is only offered when the Copilot token belongs
to a paid user (not free and not no-auth).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Fix completion feedback token shadowing
Rename the Copilot auth token local so it does not shadow the cancellation token used by inline completion generation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>