Compare commits
14 Commits
129cc33d01
...
8ea636147e
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ea636147e | |||
| 0d081a28c5 | |||
| 35abc265e9 | |||
| 5180038090 | |||
| bd3d0e77db | |||
| 60973680a8 | |||
| 97792e7fff | |||
| 15fd7862b1 | |||
| b96405aaa3 | |||
| e6e8298025 | |||
| acd7c05977 | |||
| 340f44e4bf | |||
| cb5f328da3 | |||
| b0f5a5c8d3 |
@@ -29,16 +29,16 @@ Focus: Delete the two confirmed dead code blocks — no behavior change, pure de
|
||||
|
||||
---
|
||||
|
||||
## Phase 2: Menu Bar Consolidation
|
||||
## Phase 2: Menu Bar Consolidation [checkpoint: 15fd786]
|
||||
Focus: Remove the dead inline menubar block and add a working Quit item to `_show_menus`.
|
||||
|
||||
- [ ] Task 2.1: Delete the dead `begin_main_menu_bar()` block from `_gui_func`.
|
||||
- [x] Task 2.1: Delete the dead `begin_main_menu_bar()` block from `_gui_func`. b0f5a5c
|
||||
- **Location**: `gui_2.py` lines 1679-1705 (the comment `# ---- Menubar` through `imgui.end_main_menu_bar()`). Use `get_file_slice(1676, 1712)` to confirm exact boundaries before editing.
|
||||
- **What**: Delete the `# ---- Menubar` comment line and the entire `if imgui.begin_main_menu_bar(): ... imgui.end_main_menu_bar()` block (~27 lines total). The `# --- Hubs ---` comment and hub rendering that follows must be preserved.
|
||||
- **How**: Use `set_file_slice` to replace lines 1679-1705 with a single blank line.
|
||||
- **Verify**: `grep -n "begin_main_menu_bar" gui_2.py` returns 0 hits.
|
||||
|
||||
- [ ] Task 2.2: Add working "Quit" to `_show_menus`.
|
||||
- [x] Task 2.2: Add working "Quit" to `_show_menus`. 340f44e
|
||||
- **Location**: `gui_2.py` `_show_menus` method (lines 1620-1647 — confirm with `py_get_definition`).
|
||||
- **What**: Before the existing `if imgui.begin_menu("Windows"):` line, insert:
|
||||
```python
|
||||
@@ -51,20 +51,20 @@ Focus: Remove the dead inline menubar block and add a working Quit item to `_sho
|
||||
- **How**: Use `set_file_slice` or `Edit` to insert the block before the "Windows" menu.
|
||||
- **Verify**: Launch app, confirm "manual slop" > "Quit" appears in menubar and clicking it closes the app cleanly.
|
||||
|
||||
- [ ] Task 2.3: Write/run tests.
|
||||
- [x] Task 2.3: Write/run tests. acd7c05
|
||||
- Run `uv run pytest tests/ -x -q`.
|
||||
|
||||
- [ ] Task 2.4: Conductor — User Manual Verification
|
||||
- [x] Task 2.4: Conductor — User Manual Verification
|
||||
- Launch app. Confirm menubar has: "manual slop" (with Quit), "Windows", "Project".
|
||||
- Confirm "View" menu is gone (was dead duplicate of "Windows").
|
||||
- Confirm Quit closes the app.
|
||||
|
||||
---
|
||||
|
||||
## Phase 3: Token Budget Layout Fix
|
||||
## Phase 3: Token Budget Layout Fix [checkpoint: 0d081a2]
|
||||
Focus: Give the token budget panel its own collapsing header in AI Settings; remove the double label from the provider panel.
|
||||
|
||||
- [ ] Task 3.1: Remove the double label + embedded call from `_render_provider_panel`.
|
||||
- [x] Task 3.1: Remove the double label + embedded call from `_render_provider_panel`. 6097368
|
||||
- **Location**: `gui_2.py` `_render_provider_panel` (lines ~2687-2746 — use `py_get_definition` to confirm). The block to remove is:
|
||||
```python
|
||||
imgui.text("Token Budget:")
|
||||
@@ -77,7 +77,7 @@ Focus: Give the token budget panel its own collapsing header in AI Settings; rem
|
||||
- **How**: Use `Edit` with `old_string` set to those exact 4 lines.
|
||||
- **Verify**: `_render_provider_panel` ends with the `if self._gemini_cache_text:` block and no "Token Budget" text labels.
|
||||
|
||||
- [ ] Task 3.2: Add `collapsing_header("Token Budget")` to AI Settings in `_gui_func`.
|
||||
- [x] Task 3.2: Add `collapsing_header("Token Budget")` to AI Settings in `_gui_func`. 6097368
|
||||
- **Location**: `gui_2.py` `_gui_func`, AI Settings window block (currently lines ~1719-1723 — `get_file_slice(1715, 1730)` to confirm). Current content:
|
||||
```python
|
||||
if imgui.collapsing_header("Provider & Model"):
|
||||
@@ -93,10 +93,10 @@ Focus: Give the token budget panel its own collapsing header in AI Settings; rem
|
||||
- **How**: Use `Edit` to insert after the `_render_system_prompts_panel()` call.
|
||||
- **Verify**: AI Settings window now shows three collapsing sections: "Provider & Model", "System Prompts", "Token Budget".
|
||||
|
||||
- [ ] Task 3.3: Write/run tests.
|
||||
- [x] Task 3.3: Write/run tests. bd3d0e7
|
||||
- Run `uv run pytest tests/ -x -q`.
|
||||
|
||||
- [ ] Task 3.4: Conductor — User Manual Verification
|
||||
- [x] Task 3.4: Conductor — User Manual Verification
|
||||
- Launch app. Open "AI Settings" window.
|
||||
- Confirm "Token Budget" appears as a collapsing header (expand it — panel renders correctly).
|
||||
- Confirm "Provider & Model" section no longer shows any "Token Budget" label.
|
||||
|
||||
34
gui_2.py
34
gui_2.py
@@ -1613,6 +1613,10 @@ class App:
|
||||
# ---------------------------------------------------------------- gui
|
||||
|
||||
def _show_menus(self) -> None:
|
||||
if imgui.begin_menu("manual slop"):
|
||||
if imgui.menu_item("Quit", "Ctrl+Q", False)[0]:
|
||||
self.runner_params.app_shall_exit = True
|
||||
imgui.end_menu()
|
||||
if imgui.begin_menu("Windows"):
|
||||
for w in self.show_windows.keys():
|
||||
_, self.show_windows[w] = imgui.menu_item(w, "", self.show_windows[w])
|
||||
@@ -1671,30 +1675,6 @@ class App:
|
||||
for tc in self._pending_tool_calls:
|
||||
self._tool_log.append(tc)
|
||||
self._pending_tool_calls.clear()
|
||||
# ---- Menubar
|
||||
if imgui.begin_main_menu_bar():
|
||||
if imgui.begin_menu("manual slop"):
|
||||
if imgui.menu_item("Quit", "Ctrl+Q", False)[0]:
|
||||
self.should_quit = True
|
||||
imgui.end_menu()
|
||||
if imgui.begin_menu("View"):
|
||||
for name in self.show_windows:
|
||||
_, self.show_windows[name] = imgui.menu_item(name, "", self.show_windows[name])
|
||||
imgui.end_menu()
|
||||
if imgui.begin_menu("Project"):
|
||||
if imgui.menu_item("Save All", "Ctrl+S", False)[0]:
|
||||
self._flush_to_project()
|
||||
self._save_active_project()
|
||||
self._flush_to_config()
|
||||
save_config(self.config)
|
||||
self.ai_status = "config saved"
|
||||
if imgui.menu_item("Generate MD Only", "", False)[0]:
|
||||
self._handle_md_only()
|
||||
if imgui.menu_item("Reset Session", "", False)[0]:
|
||||
self._handle_reset_session()
|
||||
imgui.end_menu()
|
||||
imgui.end_main_menu_bar()
|
||||
# --- Hubs ---
|
||||
if self.show_windows.get("Context Hub", False):
|
||||
exp, self.show_windows["Context Hub"] = imgui.begin("Context Hub", self.show_windows["Context Hub"])
|
||||
if exp:
|
||||
@@ -1715,6 +1695,8 @@ class App:
|
||||
self._render_provider_panel()
|
||||
if imgui.collapsing_header("System Prompts"):
|
||||
self._render_system_prompts_panel()
|
||||
if imgui.collapsing_header("Token Budget"):
|
||||
self._render_token_budget_panel()
|
||||
imgui.end()
|
||||
if self.show_windows.get("MMA Dashboard", False):
|
||||
exp, self.show_windows["MMA Dashboard"] = imgui.begin("MMA Dashboard", self.show_windows["MMA Dashboard"])
|
||||
@@ -2733,10 +2715,6 @@ class App:
|
||||
imgui.text_colored(C_LBL, f" Last Latency: {usage['last_latency']:.2f}s")
|
||||
if usage["cache_read_input_tokens"]:
|
||||
imgui.text_colored(C_LBL, f" Cache Read: {usage['cache_read_input_tokens']:,} Creation: {usage['cache_creation_input_tokens']:,}")
|
||||
imgui.text("Token Budget:")
|
||||
imgui.separator()
|
||||
imgui.text("Token Budget")
|
||||
self._render_token_budget_panel()
|
||||
if self._gemini_cache_text:
|
||||
imgui.text_colored(C_SUB, self._gemini_cache_text)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user