feat(cli): one-line startup banner showing model name (#400)

Display a concise startup banner with model name when running in interactive TTY mode.
This commit is contained in:
Shen Hao authored and GitHub committed 2026-05-16 20:30:49 +08:00
1 parent a40ac3d90a
commit 7298758b18
1 file changed
+8
+8
View File
@@ -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