diff --git a/static/js/chat.js b/static/js/chat.js
index 60149d005..7ecefdb7d 100644
--- a/static/js/chat.js
+++ b/static/js/chat.js
@@ -1082,7 +1082,7 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
let _lastToolName = '';
const _searchIcon = '';
const _toolLabels = {
- 'web_search': _searchIcon + 'Searching',
+ 'web_search': 'Searching',
'bash': 'Running',
'python': 'Running',
'create_document': 'Writing',
@@ -1102,6 +1102,9 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
'list_models': 'Browsing',
'ui_control': 'Adjusting',
};
+ const _toolIcons = {
+ 'web_search': _searchIcon,
+ };
function _thinkingLabel() {
if (!_lastToolName) {
return 'Thinking';
@@ -2049,10 +2052,11 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
}
threadWrap.classList.add('streaming');
const toolLabel = _toolLabels[json.tool.toLowerCase()] || json.tool;
+ const toolIcon = _toolIcons[json.tool.toLowerCase()] || '\u25B6';
const node = document.createElement('div')
node.className = 'agent-thread-node running';
const cmdHtml = cmd ? `
${esc(cmd)}` : '';
- node.innerHTML = `${cmdHtml}
`;
+ node.innerHTML = `${cmdHtml}
`;
// Expand/collapse via delegated click handler (init at module bottom).
threadWrap.appendChild(node);
currentToolBubble = node;
diff --git a/tests/test_web_search_tool_icon_js.py b/tests/test_web_search_tool_icon_js.py
new file mode 100644
index 000000000..6e855df40
--- /dev/null
+++ b/tests/test_web_search_tool_icon_js.py
@@ -0,0 +1,119 @@
+"""Pin the web_search tool-icon rendering in the agent thread (PR #??).
+
+Verifies:
+- web_search renders an