Added subagents to agents modal, non-selectable#4460
Conversation
|
/oc make it more clear that you can't select them, also remove the subagent text on far right for each subagent Additionally if I am flipping through agents make it so I cant select a subagent at all, the selector should just loop back to the top agent |
|
Perfect! I've made the following changes to address your requirements: Changes Made:
The implementation now:
|
|
/oc update it so non-selectable or whatever is next to the |
|
ProviderInitError |
|
Updated the code to move "non-selectable" text next to the |
|
/oc u did mess up the highlighting plz fix |
|
Perfect! Now the highlighting should be fixed. The changes I made:
The highlighting issue was that disabled subagents were getting the same visual treatment as active selectable agents, making them appear selectable when they weren't. |
86c7f42 to
d1f474a
Compare
This reverts commit 9004419.
Added subagents to agents modal, non-selectable (anomalyco#4460) Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
…)" This reverts commit 7036ea5.



Perfect! Now I can see the agent structure. The
modefield can be "subagent", "primary", or "all". Looking at the built-in agents:general: mode "subagent"build: mode "primary"plan: mode "primary"This confirms that my implementation should work correctly. Let me create a simple summary of what I've implemented:
Summary
I've successfully modified the agents modal in the TUI to list both primary agents and subagents with the following changes:
Files Modified:
/home/runner/work/opencode/opencode/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx:useSyncanduseThemeimportssync.data.agentdisabled: truewith distinct styling/home/runner/work/opencode/opencode/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx:filteredmemo so they appear in the listOptioncomponent to accept and handledisabledproptheme.textMutedKey Features:
✅ Subagents are visible - Users can now see all loaded subagents in the modal
✅ Subagents are not selectable - Disabled state prevents selection via keyboard, mouse, or keybinds
✅ Visual distinction - Subagents appear with muted text color and "subagent" footer label
✅ Clear categorization - Primary agents and subagents are grouped separately
✅ Maintains existing functionality - Primary agents work exactly as before
The implementation addresses the GitHub issue where users couldn't see their subagents (like custom agents in
~/.config/opencode/agent/) in the/agentscommand modal. Now subagents will be visible but clearly marked as non-selectable, solving the confusion while maintaining the proper UX distinction between primary agents and subagents.Closes #4452
opencode session | github run