mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-30 21:41:24 +00:00
fix: reduce CLI streaming flicker and show model in welcome line
This commit is contained in:
parent
cbc1161f75
commit
89bf5d29d1
@ -1007,7 +1007,7 @@ def agent(
|
|||||||
# Interactive mode — route through bus like other channels
|
# Interactive mode — route through bus like other channels
|
||||||
from nanobot.bus.events import InboundMessage
|
from nanobot.bus.events import InboundMessage
|
||||||
_init_prompt_session()
|
_init_prompt_session()
|
||||||
console.print(f"{__logo__} Interactive mode (type [bold]exit[/bold] or [bold]Ctrl+C[/bold] to quit)\n")
|
console.print(f"{__logo__} Interactive mode [bold blue]({config.agents.defaults.model})[/bold blue] — type [bold]exit[/bold] or [bold]Ctrl+C[/bold] to quit\n")
|
||||||
|
|
||||||
if ":" in session_id:
|
if ":" in session_id:
|
||||||
cli_channel, cli_chat_id = session_id.split(":", 1)
|
cli_channel, cli_chat_id = session_id.split(":", 1)
|
||||||
|
|||||||
@ -102,7 +102,7 @@ class StreamRenderer:
|
|||||||
self._live = Live(self._render(), console=c, auto_refresh=False)
|
self._live = Live(self._render(), console=c, auto_refresh=False)
|
||||||
self._live.start()
|
self._live.start()
|
||||||
now = time.monotonic()
|
now = time.monotonic()
|
||||||
if "\n" in delta or (now - self._t) > 0.05:
|
if (now - self._t) > 0.15:
|
||||||
self._live.update(self._render())
|
self._live.update(self._render())
|
||||||
self._live.refresh()
|
self._live.refresh()
|
||||||
self._t = now
|
self._t = now
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user