From 7298758b189c868cfdedb169d4765930138f83aa Mon Sep 17 00:00:00 2001 From: Shen Hao <65658684+shenhao-stu@users.noreply.github.com> Date: Sat, 16 May 2026 20:30:49 +0800 Subject: [PATCH] feat(cli): one-line startup banner showing model name (#400) Display a concise startup banner with model name when running in interactive TTY mode. --- agentmain.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/agentmain.py b/agentmain.py index 2aa1d76a..1403f4b8 100644 --- a/agentmain.py +++ b/agentmain.py @@ -265,6 +265,14 @@ if __name__ == '__main__': try: import readline except Exception: pass agent.inc_out = True + if sys.stdout.isatty(): + try: model = agent.get_llm_name(model=True) or '?' + except Exception: model = '?' + try: + sys.stdout.write(f'\x1b[92m✦\x1b[0m \x1b[1mGenericAgent\x1b[0m ' + f'\x1b[90m· cli · model:\x1b[0m {model}\n') + sys.stdout.flush() + except Exception: pass while True: q = input('> ').strip() if not q: continue