diff --git a/packages/webui/components/chatbot-sidebar.tsx b/packages/webui/components/chatbot-sidebar.tsx
index f48b18b7..8b000c9f 100644
--- a/packages/webui/components/chatbot-sidebar.tsx
+++ b/packages/webui/components/chatbot-sidebar.tsx
@@ -176,23 +176,29 @@ export function ChatbotSidebar({ projectId, contextAssetId }: ChatbotSidebarProp
const toolName = String(b.name || b.toolName || m.unknown())
const toolArgs = b.arguments || b.args
renderedBlocks.push(
-
-
+
{m.calling_tool()}
{toolName}
-
+
+
{!!toolArgs && (
-
- {JSON.stringify(toolArgs, null, 2)}
-
+
+
+ {m.tool_arguments() || 'Arguments'}
+
+
+ {JSON.stringify(toolArgs, null, 2)}
+
+
)}
-
,
+ ,
)
break
}
@@ -233,12 +239,27 @@ export function ChatbotSidebar({ projectId, contextAssetId }: ChatbotSidebarProp
if (renderedBlocks.length === 0) return null
+ let shouldShowFooter = false
+ if (content.length > 0) {
+ const lastBlock = content[content.length - 1]
+ if (typeof lastBlock === 'string' && lastBlock.trim().length > 0) {
+ shouldShowFooter = true
+ } else if (lastBlock && typeof lastBlock === 'object') {
+ const lb = lastBlock as Record
+ if (lb.type === 'text' && typeof lb.text === 'string' && lb.text.trim().length > 0) {
+ shouldShowFooter = true
+ }
+ }
+ }
+
return (
{renderedBlocks}
-
- {m.created_by_agent()}
-
+ {shouldShowFooter && (
+
+ {m.created_by_agent()}
+
+ )}
)
}