This commit is contained in:
2026-03-07 14:13:25 -05:00
parent aaed011d9e
commit 91d7e2055f
3 changed files with 13 additions and 23 deletions

View File

@@ -202,9 +202,9 @@ class App:
return
if len(content) > COMMS_CLAMP_CHARS:
# Use a fixed-height multi-line input box for large text to avoid expensive frame-by-frame wrapping
# Use a fixed-height child window with unformatted text for large text to avoid expensive frame-by-frame wrapping or input_text_multiline overhead
imgui.begin_child(f"heavy_text_child_{label}_{hash(content)}", imgui.ImVec2(0, 80), True)
imgui.input_text_multiline(f"##{label}_input", content, imgui.ImVec2(-1, -1), imgui.InputTextFlags_.read_only)
imgui.text_unformatted(content)
imgui.end_child()
else:
if self.ui_word_wrap:
@@ -1817,6 +1817,8 @@ class App:
# Optimized content rendering using _render_heavy_text logic
if kind == "request":
self._render_heavy_text("message", payload.get("message", ""))
if payload.get("system"):
self._render_heavy_text("system", payload.get("system", ""))
elif kind == "response":
r = payload.get("round", 0)
sr = payload.get("stop_reason", "STOP")