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:
Alfredo Arenas 2026-05-10 20:14:46 -06:00 committed by Xubin Ren
parent 86693f5422
commit 271b674bf1

View File

@ -1061,7 +1061,11 @@ def agent(
if message:
# Single message mode — direct call, no bus needed
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(
message, session_id,
on_progress=_cli_progress,
@ -1175,7 +1179,11 @@ def agent(
turn_done.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(
channel=cli_channel,