SIGN IN SIGN UP

agent-host: filter session list by workspace folders (#317441)

* agent-host: filter session list by workspace folders

When connected to the local agent host, only show sessions whose
workingDirectory is inside one of the current workspace folders. When
no folders are open (e.g. the Agents window), filtering is disabled so
behavior is unchanged.

Also re-fetch sessions when workspace folders change, and emit removed
items from refresh() so the list updates correctly when sessions fall
out of scope.

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

* agent-host: address Copilot review on session list filtering

- Detect notifications that race with an in-flight listSessions() via
  a mutation generation counter; re-fetch instead of overwriting the
  notification-updated in-memory state.
- Don't fire empty IChatSessionItemsDelta events from refresh().

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
R
Rob Lourens committed
2f1fad8957c9ac7d29cc27b1fb73a6d425be1bc9
Parent: 9c67e1f
Committed by GitHub <noreply@github.com> on 5/20/2026, 4:25:28 AM