feat: add sub-agents section to agent info menu

Added a "Sub-Agents" section to the agent info menu dropdown that:
- Queries session store for agents where parentAgentId matches current agent
- Displays child agents as clickable menu items with chevron icons
- Shows "No sub-agents" when the agent has no children
- Navigates to child agent screen when tapped

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2025-12-21 17:25:02 +00:00
co-authored by Claude Opus 4.5
parent 11afd22858
commit cdc17006da
2 changed files with 97 additions and 2 deletions
+2 -1
View File
@@ -324,7 +324,7 @@ Files requiring modification:
- Run typecheck after changes.
- **Done (2025-12-21 21:45)**: Added filter in `use-aggregated-agents.ts:66-68` to skip agents with `parentAgentId` when building the aggregated agents list. Also included `parentAgentId` in the aggregated agent object. Typecheck passes.
- [ ] **Implement**: Add sub-agents section to agent info menu.
- [x] **Implement**: Add sub-agents section to agent info menu.
- In `[agentId].tsx:536`, add a "Sub-Agents" section to the menu
- Query the session store for agents where `parentAgentId === currentAgentId`
@@ -332,6 +332,7 @@ Files requiring modification:
- Tapping a child agent navigates to that agent's screen
- Show "No sub-agents" if none exist
- Run typecheck after changes.
- **Done (2025-12-21 22:00)**: Added Sub-Agents section to agent info menu in `[agentId].tsx`. Added `childAgents` selector to query agents with matching `parentAgentId`. Added `handleNavigateToChildAgent` callback for navigation. UI shows "No sub-agents" when empty, or clickable list of child agents with chevron icons. Typecheck passes.
- [ ] **Test**: Verify parent/child hierarchy end-to-end.