Merge branch 'feature/mcp-ui' into bot_manager
This commit is contained in:
commit
cacf31abbe
@ -140,7 +140,14 @@ async def enhanced_generate_stream_response(
|
||||
elif isinstance(msg, ToolMessage) and msg.content:
|
||||
message_tag = "TOOL_RESPONSE"
|
||||
waiting_for_answer_first_char = False
|
||||
if config.tool_response:
|
||||
# Always output mcp-ui UIResource responses even when tool_response is disabled
|
||||
is_ui_resource = (
|
||||
msg.text
|
||||
and msg.text.lstrip().startswith('{"type"')
|
||||
and '"ui://' in msg.text
|
||||
and '"text/html' in msg.text
|
||||
)
|
||||
if config.tool_response or is_ui_resource:
|
||||
new_content = f"[{message_tag}] {msg.name}\n{msg.text}\n"
|
||||
|
||||
# Collect full content
|
||||
|
||||
Loading…
Reference in New Issue
Block a user