agent-zero/webui/js
Alessandro 338c86a058 upgrade tool extension hook to generic get_tool_message_handler
Replace the restrictive `get_tool_message_badge` extension hook with a generic `get_tool_message_handler` hook. This allows plugins to provide a full handler function for their specific `type === "tool"` rows.

Plugins can now completely take over rendering of their tool rows, or they can import and delegate to `drawMessageToolSimple` if they simply want the standard UI with a custom badge. Updated the `_browser_agent` plugin to use the new hook and documented the change in `AGENTS.plugins.md`.

feat: add get_tool_message_badge plugin hook

Add a WebUI extension point `get_tool_message_badge` so plugins can set short tool-row badge codes (`code`) and optional `displayKvps` after core handling for built-in tools (skills, vision, search, memory). Core `drawMessageTool` is now async and calls `callJsExtensions("get_tool_message_badge", …)` on the fallback path.

Remove the hardcoded `browser_agent` → `WWW` branch from `messages.js`. The `_browser_agent` plugin registers `WWW` via `extensions/webui/get_tool_message_badge/browser-tool-badge.js`.

Document the hook in `docs/agents/AGENTS.plugins.md`. With the plugin disabled, `browser_agent` tool rows no longer get a `WWW` badge from core (generic tool row).
2026-03-23 17:56:38 +01:00
..
AlpineStore.js parse LLM chunk fix, alpine store state save/load 2025-12-02 12:36:42 +01:00
api.js Fix WebSocket CSRF validation failure on Chromium browsers over HTTPS 2026-03-11 00:00:33 +01:00
cache.js feat(plugins): Add extensibility and hooks system to plugin API 2026-03-12 13:21:33 +01:00
components.js fix: defer DOM insertion until module imports resolve in component loader 2026-03-17 16:33:44 +01:00
confirmClick.js Refactor extensions to async/sync API 2026-03-06 11:32:08 +01:00
confirmDialog.js marketplace polish; add confirm-dialog extension hook and plugin_scan marketplace note 2026-03-09 11:41:10 +01:00
css.js merge prep 2025-06-30 16:16:51 +02:00
device.js cleanups and fixes 2025-07-12 20:55:53 +02:00
extensions.js scan x-extension on DOMContentLoaded; extension-friendly CSS 2026-03-13 16:16:42 +01:00
initFw.js Use prototype-based context for plugin settings 2026-03-09 21:19:55 +01:00
initializer.js cleanups and fixes 2025-07-12 20:55:53 +02:00
manifest.json v0.9.5-pre cleanup, polishing, bugfixing 2025-08-25 09:59:44 +02:00
messages.js upgrade tool extension hook to generic get_tool_message_handler 2026-03-23 17:56:38 +01:00
modals.js add modal scroll stabilizer in modals.js 2026-03-16 04:04:38 +01:00
scroller.js code exec reset polish, history and scroller fix 2026-02-05 16:47:38 +01:00
shortcuts.js project finalizing, openrouter embeddings 2025-11-13 08:52:45 +01:00
sleep.js secrets polishing 2025-08-15 09:35:30 +02:00
speech_browser.js finalize the notification system 2025-07-12 16:36:20 +02:00
sw.js Implement Progressive Web App (PWA) installation support (#688) 2025-08-20 08:27:08 +02:00
time-utils.js timestamp log fix 2026-01-06 19:02:47 +01:00
timeout.js x-components + mcp wip 2025-06-02 09:48:25 +02:00
transformers@3.0.2.js Squashed commit of the following: 2024-12-08 00:27:02 +01:00
websocket.js refactor: add websocket wildcard event support and improve cache clearing 2026-03-20 14:04:43 +01:00