fix(gui): Restore _render_selectable_label with proper push_id

This commit is contained in:
2026-03-13 22:17:43 -04:00
parent 71269ceb97
commit 017a52a90a
2 changed files with 3 additions and 10 deletions

View File

@@ -322,24 +322,21 @@ class App:
def _render_thinking_trace(self, segments: list[dict], entry_index: int) -> None: def _render_thinking_trace(self, segments: list[dict], entry_index: int) -> None:
if not segments: if not segments:
return return
imgui.push_style_color(imgui.Col_.child_bg, vec4(40, 35, 25, 180))
imgui.push_style_color(imgui.Col_.text, vec4(200, 200, 150))
imgui.indent() imgui.indent()
header_id = f"thinking_header_{entry_index}" header_id = f"thinking_header_{entry_index}"
if imgui.collapsing_header(f"Monologue ({len(segments)} traces)", header_id): if imgui.collapsing_header(f"Thinking ({len(segments)} traces)", header_id):
imgui.begin_child(f"thinking_content_{entry_index}", imgui.ImVec2(0, 80), True) imgui.begin_child(f"thinking_content_{entry_index}", imgui.ImVec2(0, 80), True)
for idx, seg in enumerate(segments): for idx, seg in enumerate(segments):
content = seg.get("content", "") content = seg.get("content", "")
marker = seg.get("marker", "thinking") marker = seg.get("marker", "thinking")
imgui.push_id(f"think_{entry_index}_{idx}") imgui.push_id(f"think_{entry_index}_{idx}")
imgui.text_colored(vec4(180, 150, 80), f"[{marker}]") imgui.text_colored(vec4(180, 180, 100), f"[{marker}]")
imgui.same_line() imgui.same_line()
imgui.text_colored(vec4(200, 200, 150), content) imgui.textWrapped(content)
imgui.pop_id() imgui.pop_id()
imgui.separator() imgui.separator()
imgui.end_child() imgui.end_child()
imgui.unindent() imgui.unindent()
imgui.pop_style_color(2)
def _render_selectable_label(self, label: str, value: str, width: float = 0.0, multiline: bool = False, height: float = 0.0, color: Optional[imgui.ImVec4] = None) -> None: def _render_selectable_label(self, label: str, value: str, width: float = 0.0, multiline: bool = False, height: float = 0.0, color: Optional[imgui.ImVec4] = None) -> None:
pops = 4 pops = 4
imgui.push_style_color(imgui.Col_.frame_bg, vec4(0, 0, 0, 0)) imgui.push_style_color(imgui.Col_.frame_bg, vec4(0, 0, 0, 0))
@@ -361,10 +358,6 @@ class App:
imgui.pop_id() imgui.pop_id()
def _show_menus(self) -> None: 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"): if imgui.begin_menu("Windows"):
for w in self.show_windows.keys(): for w in self.show_windows.keys():
_, self.show_windows[w] = imgui.menu_item(w, "", self.show_windows[w]) _, self.show_windows[w] = imgui.menu_item(w, "", self.show_windows[w])

BIN
temp_gui.py Normal file

Binary file not shown.