* Improve skill completion filtering and avoid duplicates in Copilot agent
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Remove unnecessary return statement in AgentHostSkillCompletionProvider
* Filter out plugins with non-file scheme directories in CopilotAgent to prevent duplicates
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The `sessions.goBack`/`sessions.goForward` actions registered Ctrl+Shift+Tab
and Ctrl+Tab as secondary keybindings at `WorkbenchContrib` the sameweight
chords and weight as the editor quick-open actions. With equal weight the editor
actions won the conflict in the Agents window, so the chords never triggered
session navigation.
Bump the weight to `WorkbenchContrib + 1` so the session bindings win. The
the Agents window, leaving the main workbench Ctrl+Tab behavior untouched.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Align NES recording bookmark with prompt-build snapshot
The recording bookmark used as requestTime in alternative-action telemetry
was created at provider entry time, but document/selection state used to
build the prompt is snapshotted later in _executeNewNextEditRequest. This
caused replay tools to miss selection-change events that were actually
reflected in the prompt.
* Plumb refreshed bookmark into telemetry builder
Addresses Copilot review: LlmNESTelemetryBuilder snapshots the bookmark
in its constructor and reads _requestBookmark.timeMs later, so updating
only logContext.recordingBookmark left telemetry requestTime unchanged.
Add a setter and call it from _executeNewNextEditRequest.
* fix: update CI status widget icons to compact versions and adjust CSS for improved layout
Co-authored-by: Copilot <copilot@github.com>
* fix: adjust gap in CI status widget count badge and add opacity to text
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: mrleemurray <mrleemurray@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
- Adds '#' as an alternative trigger character for file completions in the
agent host message composer, mirroring the '#'-mention convention familiar
from VS Code Chat. Users can now type either '@filename' or '#filename' to
attach a workspace file reference.
- Extends CompletionTriggerCharacter enum with Hash = '#' so clients learn
about both trigger characters during the initialize handshake.
- Preserves the trigger character in the completion result so insert-text
uses the same character the user started typing.
Fixes https://github.com/microsoft/vscode/issues/319769
(Commit message generated by Copilot)
Pass Agents session ids through the chat view binding path instead of using a workbench contribution to scan chat widgets. Move temporary-session history preservation into the session replacement handler.
* fix: prune missing remote folder from Recently Opened (#319230)
Remote counterpart to the local remove-on-failed-open in WindowsMainService.resolvePath (#74465). At LifecyclePhase.Eventually, the freshly opened workbench stats the current single-folder remote folder URI via the remote file service and prunes from Recently Opened only on authoritative FILE_NOT_FOUND. Transient errors (FILE_OTHER_ERROR / Unavailable) and unregistered providers leave the entry intact.
* address review: restrict prune to vscode-remote authorities (avoid pruning vscode-vfs entries)
* address review: register contribution from workspaces.contribution.ts (keep entry points untouched)
* address review: drop hasProvider guard; rely on FILE_NOT_FOUND filter
hasProvider is sync and the remote provider registers asynchronously via onWillActivateFileSystemProvider, so the earlier short-circuit could permanently skip the prune for the session if the contribution ran before activation. Rely solely on the authoritative FILE_NOT_FOUND filter: any other error (no provider, unavailable, host unreachable) maps to FILE_OTHER_ERROR and leaves the entry intact.
* address review: ignore cancellation errors from window-close mid-stat
* address review: drop any-cast in test (typed Pick); add trailing commas
- Lets users rename any agent-host chat session directly from the message
input via `/rename [title]`, without depending on a specific agent SDK to
implement renaming — the command is intercepted server-side and redirected
to a title change, so it works uniformly across every session type.
- Surfaces a brief "Renamed: {name}" turn response so the rename is visible
in the transcript and the user gets clear feedback.
- Propagates server-side title changes to the live chat model so the view
title updates immediately, and exposes the persisted title on reopen so the
stale auto-generated title no longer reappears.
- Broadens the sessions viewer rename affordance (context menu, F2, picker
pencil) to all agent-host session types instead of only Copilot, matching
the now-generic rename capability.
Fixes#319814
(Commit message generated by Copilot)
* Insert paragraph separator between Copilot CLI assistant messages
When the CLI emits multiple assistant messages in a single turn, each
message arrives as its own `assistant.message_delta` /
`assistant.message` event with a distinct `messageId`. The handlers
forwarded each event to `stream.markdown(...)` with no separator, so
consecutive messages fused into a run-on paragraph
(e.g. "...wiring:Now add...").
Track the last emitted `messageId` and prepend `\n\n` whenever the
incoming event carries a different (defined) id. Streaming deltas
sharing the same `messageId` remain unaffected.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add regression test for undefined messageId legacy behavior
Addresses Copilot review feedback: lock in that legacy SDK emissions
without a defined messageId continue to be concatenated without an
inserted separator, rather than producing spurious blank paragraphs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* NES: add global-budget cascade specification
Add a specification document for the opt-in global-budget cascade in the
NES/xtab prompt builder, sitting next to promptCrafting.ts (following the
existing recentFilesForPrompt.md precedent).
Covers:
- Scope: participating parts and intentionally excluded parts
(currentFile, lintOptions)
- Defaults: order, shares, totalTokens
- Algorithm: per-step budget math and forward-only surplus flow
- Per-part floor/ceiling guarantees and pool ceiling
- Validation rules with exact error strings
- Wiring and experiment configuration keys
- Four worked examples at totalTokens = 5000
- Behavior when languageContext / neighborFiles are disabled
- Composition with the independently-clipped currentFile
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* NES: address Copilot review comments on global-budget cascade spec
- Document that neighborFiles also mutates docsInPrompt and that the
accumulated set affects diffHistory selection when onlyForDocsInPrompt
is enabled.
- Note that the per-part floor guarantee assumes non-negative shares
(negatives are clamped to 0 by max(0, floor(...))).
- Replace <sum> placeholder in the validation error row with
${sharesSum} to match the implementation's template literal.
- Reflect per-step flooring in the effective-cap formulas and the
T = 5000 table for the both-off scenario: diffHistory caps are
1666 / 3498 / 4998 (not 1666 / 3500 / 5000), since the total cascade
pool ceiling is 4998 at T = 5000.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: memory leak in pty host service
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix
* Address PR review comments
- Rename ptyHostStore to _ptyHostStore for consistency with other private fields
- Simplify _startPtyHost: assign the store inside instead of returning a 3-tuple
- Use _optionalProxy in _disposePtyHost to avoid re-spawning during shutdown
- Reset __connection/__proxy on dispose
- Add regression test that verifies listener counts stay stable across restarts
* Minor tweaks
* Minor tweaks
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Dmitriy Vasyura <dmitriv@microsoft.com>
Co-authored-by: Copilot <copilot@github.com>
* Release terminal link cache and cancel pending link providers on terminal close
ExtHostTerminalService kept per-terminal entries in _terminalLinkCache and _terminalLinkCancellationSource forever: populated them but nothing ever removed them when a terminal was closed. Each terminal that ever had links queried leaked its cached links plus a CancellationTokenSource until the extension host exited.
Clear both maps in and dispose(true) the in-flight cancellation source so dangling provider promises resolve instead of hanging.
* Update unit-test
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
Fix auto mode with empty model providers
Treat an empty current model provider as no provider affinity so Auto Mode still falls back to the first available model with a known endpoint.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* sessions: prevent new-session draft from overriding restored sessions
After restore lays out the persisted grid, the empty new-session slot's
workspace picker could still resolve asynchronously (on the same provider
-registration event restore waits for) and create + activate an untitled
draft, stealing the active slot from the just-restored session.
Fix the race with three changes:
- Register ISessionsManagementService eagerly so the restore wiring and
visibility model are alive before first paint.
- Guard NewChatWidget's async workspace-selection handler with
this._store.isDisposed so a late-resolving picker cannot create a draft
for a slot already rebound to a restored session.
- Never persist untitled drafts: drop them from the snapshot so a stale
draft can never be restored.
Also remove the now-unneeded view-layer restore-suppression machinery
(restoring flag, begin/endSessionRestore) and update LAYOUT.md.
* fix tests