GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(tui): add Subagents section to session sidebar by tttturtle-russ · Pull Request #15738 · anomalyco/opencode Conversation
|
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several related PRs that address similar functionality: Potential Related PRs:
These PRs appear to address related subagent display and navigation features, though some may be older implementations or for different platforms (desktop/web vs TUI). You may want to review them to ensure there's no overlapping functionality or to see if your changes complement or supersede any of these. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Show live status of child sessions spawned by the parent agent in the sidebar, including title, and working/idle state. Section is collapsible when more than 2 subagents are present.
0e37c4a to
3faeaec
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This PR adds a "Subagents" section to the session sidebar in the TUI, enabling users to monitor the live status and titles of all child sessions spawned by the current parent agent. This addresses the difficulty of tracking subagent progress when context is long.
Changes:
subagents key to the expanded store (defaulting to true)subagents computed memo that filters sync.data.session for sessions whose parentID matches the current session💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| {title()} | ||
| </text> | ||
| <text fg={theme.textMuted}> | ||
| {status() === "idle" ? "idle" : "working"} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The status() check only handles "idle" vs. everything else, but sync.session.status() can return three distinct values: "idle", "working", and "compacting" (when session.time.compacting is set). When a subagent's session is compacting, it will display "working" with a warning color, which is misleading because compacting is a distinct background housekeeping operation. The displayed label should reflect the compacting state, and the indicator color could differentiate it (e.g., use a different color or a different label like "compacting").
| {status() === "idle" ? "idle" : "working"} | |
| {status() === "idle" ? "idle" : status() === "compacting" ? "compacting" : "working"} |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| <text fg={theme.text}> | ||
| <b>Subagents</b> | ||
| <Show when={!expanded.subagents}> | ||
| <span style={{ fg: theme.textMuted }}> ({subagents().length})</span> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
When the Subagents section is collapsed (more than 2 subagents), the header shows only the total count, e.g., (4). The MCP section (an established pattern in this file) shows a more informative summary in its collapsed header, e.g., (3 active, 1 error). Since the primary reason for this feature is to track working vs. idle subagent status, the collapsed header would be more useful if it showed a count breakdown, such as (3 working, 1 idle), consistent with the MCP section pattern.
| <span style={{ fg: theme.textMuted }}> ({subagents().length})</span> | |
| {(() => { | |
| const counts = subagents().reduce( | |
| (acc, id) => { | |
| const status = sync.session.status(id) | |
| if (status === "idle") { | |
| acc.idle += 1 | |
| } else { | |
| acc.working += 1 | |
| } | |
| return acc | |
| }, | |
| { working: 0, idle: 0 }, | |
| ) | |
| return ( | |
| <span style={{ fg: theme.textMuted }}> | |
| {" "} | |
| ({counts.working} working, {counts.idle} idle) | |
| </span> | |
| ) | |
| })()} |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.