Commit Graph

22 Commits

Author SHA1 Message Date
Mario Zechner ae351257b6 Fix tree selector: proper selectedBg theme color, correct filter logic
- Add selectedBg theme color for active line highlight
- Fix filter modes:
  - no-tools: default minus tool results (still hides label/custom)
  - user-only: just user messages
  - labeled-only: just labeled entries
  - all: everything
- Update theme.md with new color tokens (50 total)
2025-12-30 22:42:25 +01:00
Mario Zechner e4df5d14b5 Tree selector improvements: active line highlight and tool filter
- Add inverse background highlight for selected/active line
- Add 'no-tools' filter mode to hide tool results
- Add isShiftCtrlO to cycle filters backwards
- Filter order: default → no-tools → user-only → labeled-only → all
2025-12-30 22:42:25 +01:00
Mario Zechner 01dae9ebcc Fix branch summarization abort handling and tree navigation
- Check response.stopReason instead of catching errors for abort detection
- Return result object from _generateBranchSummary instead of throwing
- Fix summary attachment: attach to navigation target position, not old branch
- Support root-level summaries (parentId=null) in branchWithSummary
- Remove setTimeout hack for re-showing tree selector on abort
2025-12-30 22:42:23 +01:00
Mario Zechner 159e19a010 Fix tree selector gutter alignment, add page navigation, improve styling
- Fix gutter/connector alignment by tracking gutter positions with GutterInfo
- Convert recursive markContains to iterative to avoid stack overflow
- Add left/right arrow keys for page up/down navigation
- Consistent assistant message styling (green prefix, appropriate status colors)
- Remove leaf marker (*), active path bullets are sufficient
- Add Expandable interface for toggle expansion
- Fix BranchSummaryMessageComponent expansion toggle
2025-12-30 22:42:23 +01:00
Mario Zechner 975e90ea8c fix(coding-agent): prioritize active branch in sorting and fix gutters spacing 2025-12-30 22:42:23 +01:00
Mario Zechner 97e5e8c918 fix(coding-agent): use smaller bullet marker with space for active path 2025-12-30 22:42:23 +01:00
Mario Zechner 3493e47b4d fix(coding-agent): move active path marker to right before entry text 2025-12-30 22:42:23 +01:00
Mario Zechner 96c071b4c4 feat(coding-agent): highlight active path with ● marker in tree selector 2025-12-30 22:42:23 +01:00
Mario Zechner 8d3b4dd762 fix(coding-agent): keep gutters when rendering virtual root children 2025-12-30 22:42:23 +01:00
Mario Zechner 6465bc502f fix(coding-agent): show gutters without connectors on virtual root children 2025-12-30 22:42:23 +01:00
Mario Zechner d568ebd659 feat(coding-agent): add gutters and connectors back to tree selector
- Show ├─ for non-last siblings, └─ for last sibling
- Show │ gutter for descendants of non-last siblings
- Properly handle multiple roots display shift
2025-12-30 22:42:23 +01:00
Mario Zechner e50eae1054 fix(coding-agent): display multiple roots at indent 0, keep child logic intact 2025-12-30 22:42:23 +01:00
Mario Zechner 32ec1fa883 fix(coding-agent): treat multiple roots as children of virtual branching root 2025-12-30 22:42:23 +01:00
Mario Zechner 7c103ddc55 refactor(coding-agent): simplify tree indentation
- At indent 0: stay flat unless parent branches
- At indent 1: children go to indent 2 (visual grouping)
- At indent 2+: stay flat for single-child chains
- Remove gutter/connector complexity for now
2025-12-30 22:42:23 +01:00
Mario Zechner 6fbc3a01ef refactor(coding-agent): cleaner tree gutter/indent logic
- Only indent when parent has siblings (branch point)
- gutterLevels array tracks which levels need │ vs spaces
- connector: none/branch/last for ├─/└─ display
2025-12-30 22:42:23 +01:00
Mario Zechner 1d90592df1 fix(coding-agent): always show error/aborted assistant messages in tree 2025-12-30 22:42:23 +01:00
Mario Zechner 5726770d1f fix(coding-agent): always show current leaf in tree selector even if aborted/error 2025-12-30 22:42:22 +01:00
Mario Zechner 2922020382 feat(coding-agent): improve tree selector tool display
- Tool results show formatted call info like [read: path:1-10], [bash: cmd]
- Skip assistant messages with stopReason error/aborted
- Skip assistant messages with only tool calls (no text)
- Format built-in tools like tool-execution.ts (read, write, edit, bash, grep, find, ls)
- Custom tools show truncated JSON args
2025-12-30 22:42:22 +01:00
Mario Zechner b153b528e8 feat(coding-agent): show tool name instead of result content in tree selector 2025-12-30 22:42:22 +01:00
Mario Zechner 6b7ad0ed4b feat(coding-agent): reimplement tree selector features
- Label editing with 'l' key
- Ctrl+O cycles through filters: default -> user-only -> labeled-only -> all
- Preserve cursor position when toggling filters
- Labels shown at front of node
- Normalize tabs/newlines in content
- extractContent limited to 200 chars for performance
- truncateToWidth on all rendered lines
- Iterative flattenTree to avoid stack overflow
- Linear chain optimization (no indent for single-child chains)
2025-12-30 22:42:22 +01:00
Mario Zechner 1f4594598b feat(coding-agent): add search to /tree selector
- Type to filter nodes by matching tokens in content
- Search field always visible above tree
- Backspace removes chars, Escape clears search
- Restructured layout: title, border, help+search, border, tree, border
2025-12-30 22:42:22 +01:00
Mario Zechner 4958271dd3 feat(coding-agent): implement /tree command for session tree navigation
- Add TreeSelectorComponent with ASCII tree visualization
- Add AgentSession.navigateTree() for switching branches
- Add session_before_tree/session_tree hook events
- Add SessionManager.resetLeaf() for navigating to root
- Change leafId from string to string|null for consistency with parentId
- Support optional branch summarization when switching
- Update buildSessionContext() to handle null leafId
- Add /tree to slash commands in interactive mode
2025-12-30 22:42:22 +01:00