56 lines
2.6 KiB
TOML
56 lines
2.6 KiB
TOML
role = "tier3-worker"
|
|
docs = ["conductor/workflow.md"]
|
|
prompt = """
|
|
Implement Task 1.1 in @gui_2.py: replace the single "Strategy (Tier 1)" text box in _render_mma_dashboard with four collapsible tier stream sections.
|
|
|
|
CURRENT CODE to replace (around lines 2728-2732 in gui_2.py):
|
|
imgui.separator()
|
|
imgui.separator()
|
|
imgui.text("Strategy (Tier 1)")
|
|
strategy_text = self.mma_streams.get("Tier 1", "")
|
|
imgui.input_text_multiline("##mma_strategy", strategy_text, imgui.ImVec2(-1, 150), imgui.InputTextFlags_.read_only)
|
|
|
|
REPLACE with these four collapsible sections (insert after the token usage table separator, before "# 4. Task DAG Visualizer"):
|
|
|
|
TIER DEFINITIONS:
|
|
- Tier 1: label="Strategy", stream key="Tier 1"
|
|
- Tier 2: label="Tech Lead", stream key="Tier 2 (Tech Lead)"
|
|
- Tier 3: label="Workers", aggregates all mma_streams keys containing "Tier 3"
|
|
- Tier 4: label="QA", stream key="Tier 4 (QA)"
|
|
|
|
IMPLEMENTATION REQUIREMENTS:
|
|
1. For Tier 1, 2, 4 (single stream):
|
|
if imgui.collapsing_header(f"Tier {N}: {label}"):
|
|
content = self.mma_streams.get(stream_key, "")
|
|
imgui.begin_child(f"##tier{N}_scroll", imgui.ImVec2(-1, 200), True)
|
|
imgui.text_wrapped(content)
|
|
imgui.end_child()
|
|
|
|
2. For Tier 3 (aggregated):
|
|
if imgui.collapsing_header("Tier 3: Workers"):
|
|
tier3_keys = [k for k in self.mma_streams if "Tier 3" in k]
|
|
if not tier3_keys:
|
|
imgui.text_disabled("No worker output yet.")
|
|
else:
|
|
for key in tier3_keys:
|
|
ticket_id = key.split(": ", 1)[-1] if ": " in key else key
|
|
imgui.text(ticket_id) # sub-header
|
|
imgui.begin_child(f"##tier3_{ticket_id}_scroll", imgui.ImVec2(-1, 150), True)
|
|
imgui.text_wrapped(self.mma_streams[key])
|
|
imgui.end_child()
|
|
|
|
3. Auto-scroll: after imgui.begin_child, if the stream content changed since last frame, call imgui.set_scroll_here_y(1.0). Track last-seen content length in a dict self._tier_stream_last_len: dict[str, int] = {} (init in __init__ if not present). Only scroll if user was at bottom: check imgui.get_scroll_y() >= imgui.get_scroll_max_y() - 10 before deciding to scroll.
|
|
|
|
4. REMOVE the old lines completely:
|
|
- imgui.separator() (the second duplicate separator before the old strategy box)
|
|
- imgui.text("Strategy (Tier 1)")
|
|
- strategy_text = self.mma_streams.get("Tier 1", "")
|
|
- imgui.input_text_multiline("##mma_strategy", ...)
|
|
|
|
5. Also add `self._tier_stream_last_len: dict[str, int] = {}` to __init__ (around line 280, after self.mma_streams = {} line).
|
|
|
|
TESTS that must pass after this change: @tests/test_mma_dashboard_streams.py
|
|
|
|
Use exactly 1-space indentation for Python code.
|
|
"""
|