Align AI text indent with user and add bold to colored chat text

This commit is contained in:
Dita Aji Pratama 2026-05-19 14:50:53 +07:00
parent 475e900e18
commit 7777dea0cc

View File

@ -115,7 +115,7 @@ def draw_chat(app, stdscr):
elif role == "ai":
label = f" Hendrik ({item['time']}) "
rendered.append((C_AI, label))
_wrap_render(text, indent=3, color=C_INPUT)
_wrap_render(text, indent=1, color=C_INPUT)
elif role == "system":
lines = text.split("\n")
rendered.append((C_SYSTEM, lines[0]))
@ -146,7 +146,7 @@ def draw_chat(app, stdscr):
y = chat_top
for i in range(app.scroll, min(app.scroll + chat_h, total)):
color, text = rendered[i]
attr = curses.color_pair(color) if color else curses.A_NORMAL
attr = curses.color_pair(color) | curses.A_BOLD if color else curses.A_NORMAL
if len(text) >= w:
text = text[: w - 1]
try: