Fixing false separator
This commit is contained in:
parent
34527d5438
commit
19b128618d
@ -80,7 +80,11 @@ class HendrikTUI:
|
||||
if mi:
|
||||
self.log[-1]["model_info"] = (mi.get("provider"), mi.get("model"))
|
||||
elif msg["role"] == "assistant":
|
||||
log(self, "ai", msg["content"])
|
||||
next_role = session.messages[i + 1]["role"] if i + 1 < len(session.messages) else None
|
||||
if next_role in ("user", None):
|
||||
log(self, "ai", msg["content"])
|
||||
if session.messages and session.messages[-1]["role"] == "assistant":
|
||||
log(self, "sep", "")
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
|
||||
10
tui/input.py
10
tui/input.py
@ -323,10 +323,11 @@ def session_browser_popup(app, stdscr):
|
||||
|
||||
pw = min(60, app.w - 4)
|
||||
ph = min(len(items) + 4, app.h - 4)
|
||||
if ph < 5:
|
||||
curses.flash()
|
||||
return
|
||||
px = (app.w - pw) // 2
|
||||
py = (app.h - ph) // 2
|
||||
if ph < 6:
|
||||
return
|
||||
|
||||
win = curses.newwin(ph, pw, py, px)
|
||||
win.keypad(True)
|
||||
@ -431,10 +432,11 @@ def session_search_popup(app, stdscr):
|
||||
|
||||
pw = min(60, app.w - 4)
|
||||
ph = min(len(items) + 4, app.h - 4)
|
||||
if ph < 5:
|
||||
curses.flash()
|
||||
return
|
||||
px = (app.w - pw) // 2
|
||||
py = (app.h - ph) // 2
|
||||
if ph < 6:
|
||||
return
|
||||
|
||||
win = curses.newwin(ph, pw, py, px)
|
||||
win.keypad(True)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user