Skip to content

[pull] main from microsoft:main#1386

Merged
pull[bot] merged 9 commits into
code:mainfrom
microsoft:main
Jun 19, 2026
Merged

[pull] main from microsoft:main#1386
pull[bot] merged 9 commits into
code:mainfrom
microsoft:main

Conversation

@pull

@pull pull Bot commented Jun 19, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

romalpani and others added 9 commits June 18, 2026 09:42
Reword the tip shown above the prompt box when creating a new chat within a session to clearly convey it is a parallel conversation that builds on the session's changes.
* agentHost: persist and restore peer chats across restart

Peer (additional) chats in a Copilot CLI session were in-memory only and
disappeared on restart. Persist each peer chat's backing SDK conversation id
in the session DB, resume it on session restore, and re-register it (with
history) in the state-manager chat catalog.

- copilotAgent: persist {chatId -> {sdkSessionId, model}} under copilot.chats;
  add getChats, _ensureChatSession (resume from persisted id), and make
  disposeChat delete the persisted entry + SDK conversation.
- IAgent: add optional getChats.
- agentHostStateManager: add restoreChat to seed a peer chat's ChatState and
  add it to the catalog.
- agentService: restoreSession now restores persisted peer chats with history.
- Tests for getChats/disposeChat persistence and restore re-registration.

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

* agentHost: address CCR feedback on peer-chat persistence

- Validate persisted peer-chat entries on read; drop ones without a usable
  string sdkSessionId instead of letting invalid ids reach deleteSession.
- Build the serialized catalog with a null-prototype object to avoid
  prototype pollution from a client-chosen chatId (e.g. __proto__).
- Clarify the disposeChat comment (it resolves the SDK id, it does not resume).
- Add a regression test covering corrupted/invalid persisted entries.

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

* agentHost: fix restored peer chat stuck loading after reload

Switching to a restored peer chat after a window reload left the chat
on a perpetual loading spinner. Disposing the outgoing default chat
session ran _releaseSessionSubscription(session), which tore down ALL
chat subscriptions of the backend session — including the incoming peer
chat's subscription that provideChatSessionContent was concurrently
awaiting. _whenSubscriptionHydrated then waited forever on a disposed
subscription, so the chat content promise never resolved.

A chat session's dispose now releases only its own conversation
subscription via _releaseChatSessionSubscriptions, never a sibling peer
chat's. The shared session subscription (and its lockstep default-chat
subscription) is kept alive while any sibling chat session is still
active or mid-hydration (tracked by _hydratingChatSessions).

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

* agentHost: confirm before deleting a chat

Deleting an individual chat in a Local/Remote Agent Host session
(Copilot CLI) removed the chat immediately with no confirmation, unlike
the Copilot Chat CLI session provider. Show the same confirmation dialog
before disposing the chat, and bail out when the user cancels.

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

---------

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

* Suggest Agent Host Copilot CLI for historical local harness session

* address copilot feedback

* continue in button without agent host tag

* wording to mention agent host and not copilot cli
* Improve terminal file write path quote normalization

* address feedback
@pull pull Bot locked and limited conversation to collaborators Jun 19, 2026
@pull pull Bot added the ⤵️ pull label Jun 19, 2026
@pull pull Bot merged commit 17df838 into code:main Jun 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants