Name the agent's execution source in session management - #651
Open
Yuandi (DDKinger) wants to merge 2 commits into
Open
Name the agent's execution source in session management#651Yuandi (DDKinger) wants to merge 2 commits into
Yuandi (DDKinger) wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the agent pane’s session-management header so it consistently shows the same agent identity (including execution source/backend) as the chat view, addressing the loss of “Copilot · ” context when opening session management.
Changes:
- Refactors
AgentPaneContent::_refreshLabel()to build a shared<agent> · <backend>identity and then conditionally append version/model only in the chat view. - Keeps the agent logo visible in session-management view by making
_refreshLogo()depend only on whether an agent name is known. - Updates the en-US resource comment for
AgentPane_SessionsTitleFormatto describe the expanded{0}meaning (string value unchanged).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/cascadia/TerminalApp/AgentPaneContent.cpp | Unifies label composition across chat vs. sessions view and preserves agent logo visibility in sessions view. |
| src/cascadia/TerminalApp/Resources/en-US/Resources.resw | Updates translator comment for the sessions title format to reflect {0} now including execution environment when present. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The agent pane bar names the execution source it resolved ("Copilot ·
Debian" for a WSL agent, "Copilot · Windows" for a host one), but pressing
F2 replaced that with "Agent sessions: Copilot": no mark, no backend.
Nothing else in the sessions view repeats which distro the pane's agent
runs in, so the one place that knew dropped it exactly when the user went
looking for sessions.
Build the identity once and reuse it in both views. The sessions view
keeps its "Agent sessions: {0}" title and now fills it with
"<agent> · <backend>"; only the chat view appends the version and model,
which describe the live conversation rather than the session list.
`_refreshLogo` also stops collapsing the agent mark in the sessions view,
so the two views open with the same logo and identity.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rows for in-distro sessions led with a bracketed `[WSL-Ubuntu] ` tag, so a WSL list read as a column of brackets and the distro sat far from the provider it qualifies. The tag also predates source filtering. Rows are now narrowed to the viewing pane's own execution source, so every visible row shares one location and the tag disambiguates nothing -- it only says which distro the pane already is. Fold it into the existing provider suffix instead: `· copilot · Ubuntu`. `origin_prefix_for` keeps only its agent-pane marker, and the distro inherits the provider's surfacing rule, appearing on the selected or active row. A row whose provider is unknown still names its distro. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Yuandi (DDKinger)
force-pushed
the
dev/DDKinger/sessions-title-agent-source
branch
from
August 23, 2026 08:04
85ba867 to
28d750a
Compare
Comment on lines
+457
to
+458
| - Naming the distro on the row, now as a `· <distro>` suffix beside the CLI | ||
| provider (`cli_suffix_for`) rather than a leading `[WSL-<distro>]` tag. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Session management didn't say where the agent runs the way the agent pane does,
and said it in a place of its own for rows.
Title bar. Before: the agent pane bar named the agent and where it runs --
Copilot · Debianfor a WSL agent,Copilot · Windowsfor a host one -- butopening session management replaced that with
Agent sessions: Copilot: nologo, no backend. After: the sessions view keeps the agent logo and reads
Agent sessions: Copilot · Debian. The chat view is unchanged.Rows. Before: an in-distro row led with a bracketed
[WSL-Ubuntu]tag, soa WSL list read as a column of brackets and the distro sat far from the provider
it qualifies. After: the distro joins the existing provider suffix --
· copilot · Ubuntu.Detailed Description of the Pull Request / Additional comments
_refreshLabelnow composes<agent> · <backend>once and reuses it. Thechat view still appends the version and connected model; the sessions view
wraps the identity in the existing
Agent sessions: {0}title instead of justthe agent name, and version and model stay out of it.
_refreshLogono longercollapses the agent mark in the sessions view.
Only the en-US
<comment>forAgentPane_SessionsTitleFormatchanged, to say{0}is now the agent and its environment. The string value is untouched, sono locale needs retranslation.
For rows, the bracketed tag also predates source filtering: rows are now
narrowed to the viewing pane's own execution source, so every visible row
shares one location and the tag disambiguates nothing -- it only repeats which
distro the pane already is.
origin_prefix_forkeeps only its agent-panemarker, and the distro inherits the provider's surfacing rule (selected or
active row). A row whose provider is unknown still names its distro.
Validation Steps Performed
cargo test: 1616 passed, 0 failed. Updatedrender_sessions_view_paints_wsl_distro_tagto assert the new suffix andreplaced the prefix unit test with
cli_suffix_appends_the_wsl_distro.