Private
Public Access
0
0

feat(gui): Implement selectable thinking monologs and fix UI regressions

- Implement [Pure]/[Read] toggle for AI thinking monologues to allow text selection/copying.
- Fix TypeError: render_thinking_trace() missing 'entry_index' argument.
- Fix [+] buttons in Discussion and Comms history by correctly updating window state registry.
- Remove ListClipper from Discussion and Comms panels to fix variable-height clipping issues.
- Increase clipping heights for large entries to improve visibility.
- Fix code block scroll snapping in Markdown helper by robustifying text synchronization.
This commit is contained in:
2026-06-01 19:20:33 -04:00
parent 4dc1eb1283
commit 9ea7d4efcc
4 changed files with 116 additions and 124 deletions
+1 -1
View File
@@ -278,5 +278,5 @@ This file tracks all major tracks for the project. Each track has its own detail
---
- [ ] **Track: Selectable Thinking Monologs**
- [~] **Track: Selectable Thinking Monologs**
*Link: [./tracks/selectable_thinking_monologs_20260601/](./tracks/selectable_thinking_monologs_20260601/)*
@@ -1,14 +1,14 @@
# Implementation Plan: Selectable Thinking Monologs
## Phase 1: UI Implementation
- [ ] Task: Update `render_thinking_trace` signature
- [ ] Modify `def render_thinking_trace(app: App, segments: list[dict], entry_index: int, is_standalone: bool = False)` to accept the parent `entry: dict`.
- [ ] Update all calls to `render_thinking_trace` in `src/gui_2.py` (e.g., in `render_discussion_entry` and `render_comms_history_panel`) to pass the appropriate `entry` object. For standalone traces where an entry dictionary might not exist, pass a dummy dict to hold the state.
- [ ] Task: Implement the UI Toggle
- [ ] Inside `render_thinking_trace`, below or next to the `imgui.collapsing_header`, add an `imgui.button` that toggles `entry.get("thinking_read_mode", True)`.
- [ ] Task: Implement Conditional Rendering
- [ ] If `thinking_read_mode` is `True` (Read mode), use `markdown_helper.render(content)` or `imgui.text_wrapped` for a clean reading view.
- [ ] If `thinking_read_mode` is `False` (Pure mode), use `render_selectable_label(app, f"think_text_...", content, multiline=True, height=-1)` to make the text selectable and copyable.
- [x] Task: Update `render_thinking_trace` signature
- [x] Modify `def render_thinking_trace(app: App, entry: dict, segments: list[dict], entry_index: int, is_standalone: bool = False)` to accept the parent `entry: dict`.
- [x] Update all calls to `render_thinking_trace` in `src/gui_2.py` (e.g., in `render_discussion_entry` and `render_comms_history_panel`) to pass the appropriate `entry` object. For standalone traces where an entry dictionary might not exist, pass a dummy dict to hold the state.
- [x] Task: Implement the UI Toggle
- [x] Inside `render_thinking_trace`, below or next to the `imgui.collapsing_header`, add an `imgui.button` that toggles `entry.get("thinking_read_mode", True)`.
- [x] Task: Implement Conditional Rendering
- [x] If `thinking_read_mode` is `True` (Read mode), use `markdown_helper.render(content)` or `imgui.text_wrapped` for a clean reading view.
- [x] If `thinking_read_mode` is `False` (Pure mode), use `render_selectable_label(app, f"think_text_...", content, multiline=True, height=-1)` to make the text selectable and copyable.
## Phase 2: Verification
- [ ] Task: Verification