latest changes
This commit is contained in:
14
src/gui_2.py
14
src/gui_2.py
@@ -307,11 +307,11 @@ class App:
|
||||
|
||||
if len(content) > COMMS_CLAMP_CHARS:
|
||||
if is_md:
|
||||
imgui.begin_child(f"heavy_text_child_{label}_{id_suffix}", imgui.ImVec2(0, 150), True)
|
||||
imgui.begin_child(f"heavy_text_child_{label}_{id_suffix}", imgui.ImVec2(0, 180), True, imgui.WindowFlags_.always_vertical_scrollbar)
|
||||
markdown_helper.render(content, context_id=ctx_id)
|
||||
imgui.end_child()
|
||||
else:
|
||||
imgui.input_text_multiline(f"##heavy_text_input_{label}_{id_suffix}", content, imgui.ImVec2(-1, 150), imgui.InputTextFlags_.read_only)
|
||||
imgui.input_text_multiline(f"##heavy_text_input_{label}_{id_suffix}", content, imgui.ImVec2(-1, 180), imgui.InputTextFlags_.read_only)
|
||||
else:
|
||||
if is_md:
|
||||
markdown_helper.render(content, context_id=ctx_id)
|
||||
@@ -2895,6 +2895,12 @@ def hello():
|
||||
imgui.text_colored(C_LBL, f"#{i_display}")
|
||||
imgui.same_line()
|
||||
imgui.text_colored(vec4(160, 160, 160), ts)
|
||||
|
||||
latency = entry.get("latency") or entry.get("metadata", {}).get("latency")
|
||||
if latency:
|
||||
imgui.same_line()
|
||||
imgui.text_colored(C_SUB, f" ({latency:.2f}s)")
|
||||
|
||||
ticket_id = entry.get("mma_ticket_id")
|
||||
if ticket_id:
|
||||
imgui.same_line()
|
||||
@@ -2913,6 +2919,10 @@ def hello():
|
||||
# Optimized content rendering using _render_heavy_text logic
|
||||
idx_str = str(i)
|
||||
if kind == "request":
|
||||
usage = payload.get("usage", {})
|
||||
if usage:
|
||||
inp = usage.get("input_tokens", 0)
|
||||
imgui.text_colored(C_LBL, f" tokens in:{inp}")
|
||||
self._render_heavy_text("message", payload.get("message", ""), idx_str)
|
||||
if payload.get("system"):
|
||||
self._render_heavy_text("system", payload.get("system", ""), idx_str)
|
||||
|
||||
Reference in New Issue
Block a user