mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-20 08:32:25 +00:00
feat(cli): pass bot_name/bot_icon from config to StreamRenderer (#3650)
Both StreamRenderer instantiations in the agent command (single-message
mode and interactive mode) now read bot_name and bot_icon from
config.agents.defaults and forward them to the renderer.
This is the wiring step that makes the schema fields actually take
effect at runtime. With safe defaults of "nanobot" and "🐈", existing
users see no change.
This commit is contained in:
parent
86693f5422
commit
271b674bf1
@ -1061,7 +1061,11 @@ def agent(
|
|||||||
if message:
|
if message:
|
||||||
# Single message mode — direct call, no bus needed
|
# Single message mode — direct call, no bus needed
|
||||||
async def run_once():
|
async def run_once():
|
||||||
renderer = StreamRenderer(render_markdown=markdown)
|
renderer = StreamRenderer(
|
||||||
|
render_markdown=markdown,
|
||||||
|
bot_name=config.agents.defaults.bot_name,
|
||||||
|
bot_icon=config.agents.defaults.bot_icon,
|
||||||
|
)
|
||||||
response = await agent_loop.process_direct(
|
response = await agent_loop.process_direct(
|
||||||
message, session_id,
|
message, session_id,
|
||||||
on_progress=_cli_progress,
|
on_progress=_cli_progress,
|
||||||
@ -1175,7 +1179,11 @@ def agent(
|
|||||||
|
|
||||||
turn_done.clear()
|
turn_done.clear()
|
||||||
turn_response.clear()
|
turn_response.clear()
|
||||||
renderer = StreamRenderer(render_markdown=markdown)
|
renderer = StreamRenderer(
|
||||||
|
render_markdown=markdown,
|
||||||
|
bot_name=config.agents.defaults.bot_name,
|
||||||
|
bot_icon=config.agents.defaults.bot_icon,
|
||||||
|
)
|
||||||
|
|
||||||
await bus.publish_inbound(InboundMessage(
|
await bus.publish_inbound(InboundMessage(
|
||||||
channel=cli_channel,
|
channel=cli_channel,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user