Private
Public Access
0
0

docs(spec): footnote 8 remaining UX adaptations (2-9) deferred to follow-up

After the end of Phase 5, only adaptation 1 of 9 from spec §6 was
applied (Screenshot button iff vision, render_files_and_media:3030).
The pattern is established; the remaining 8 are mechanical
applications of the same pattern at their respective render sites.
The follow-up track applies the wrapping at:
- tools toggle (tool_calling)
- cache panel (caching)
- stream progress (streaming)
- fetch models button (model_discovery)
- token budget max (context_window)
- cost panel (3 cost_tracking states: estimate / 'Free (local)' / '-')

The _get_active_capabilities() helper (t5.1) is already in place.
This commit is contained in:
2026-06-11 09:13:55 -04:00
parent 40cf36edef
commit b75ae57ef2
@@ -514,6 +514,16 @@ Each phase has its own checkpoint commit and git note.
**Footnote (added 2026-06-11, in case context expires):** As of the end of Phase 4, only `_send_minimax` has a working tool-call loop. The Phase 3 (Grok, Llama) and Phase 2 (Qwen) entry points are single-shot — they call `send_openai_compatible` once and return, without executing tool_calls. If the user notices "tool execution doesn't work for Qwen/Grok/Llama" after Phase 5 ships, the fix is to either (a) inline the tool loop in each entry point (mirroring MiniMax's pattern) or (b) better, lift the loop into a shared `run_with_tool_loop(client, request, capabilities, *, pre_tool_callback, qa_callback, patch_callback, base_dir, vendor_name)` helper that wraps `send_openai_compatible` and is called from all 4 vendor entry points. Option (b) is the data-oriented-design win (algorithm = HTTP mechanics, policy = tool dispatch) and avoids the 4-way duplication that already exists in `_send_anthropic`/`_send_gemini`/`_send_gemini_cli`/`_send_deepseek`. Defer to a separate follow-up track; not in scope for this one.
**Footnote (added 2026-06-11, in case context expires):** As of the end of Phase 5, only **adaptation 1 of 9** from spec §6 is applied to `src/gui_2.py` (Screenshot button iff vision, at `render_files_and_media:3030`). The remaining 8 adaptations are deferred to a follow-up track:
- 2: Tools toggle iff tool_calling
- 3: Cache panel iff caching
- 4: Stream progress iff streaming
- 5: Fetch Models iff model_discovery
- 6: Token budget max = context_window
- 7-9: Cost panel (estimate / "Free (local)" for localhost / "—" for other cost_tracking=false)
The pattern is established: `caps = app._get_active_capabilities(); imgui.begin_disabled(not caps.<field>); ...UI...; imgui.end_disabled(); if not caps.<field>: imgui.same_line(); imgui.text_disabled("(reason)")`. Each remaining adaptation is a mechanical application of this pattern at its specific render site. The follow-up track will need to locate each render site (tools toggle, cache panel, stream progress, fetch models button, token budget, cost panel) and apply the wrapping. The helper `_get_active_capabilities()` is already in place (added in t5.1).
### 13.2 Project References
- `docs/guide_ai_client.md` — current `ai_client.py` architecture; will be updated in Phase 6 to document the matrix and the shared helper. Specifically: the per-provider history globals (`_anthropic_history`, `_deepseek_history`, `_minimax_history`) documented at lines 123-132 are the **state-management shape** that the new 3 vendors should follow in Phase 2/3. (Per `guide_state_lifecycle.md §4`, the per-provider lock pattern is the established convention.)