wip
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user