mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-07-09 17:08:29 +00:00
Add Files to the universal canvas rail and sidebar flow, with a reusable floating surface modal chrome that matches Browser/Desktop behavior. Make the File Browser modal draggable/resizable with Focus mode, keep Editor on the same draggable modal helper, and preserve dock/undock handoff state. Harden File Browser startup so empty paths resolve to the default workdir, restyle the Up control, compact New file/New folder actions, and hide Modified before Name/Size in narrow containers. Update DOX contracts and focused regression coverage for the new Files surface, modal chrome, default-path fallback, and compact layout behavior.
2.5 KiB
2.5 KiB
WebUI Extensions DOX
Purpose
- Own built-in frontend extension contributions under
extensions/webui/. - Keep WebUI extension points compatible with the core loader and plugin extension model.
Ownership
- Each direct subdirectory is one frontend extension point.
.htmlfiles are injected as component references through<x-extension>..jsand.mjsfiles export default functions called bycallJsExtensions.
Local Contracts
- HTML contributions must be valid component fragments and include Alpine state only where needed.
- JavaScript extension modules must export a default function.
- Extension code must not assume a plugin is installed unless it guards that dependency.
- Keep extension point names synchronized with
x-extensionIDs andcallJsExtensions()callers.
Work Guidance
- Prefer small extension modules that delegate to existing WebUI stores or helpers.
- Use the notification store for user-facing success, warning, or error feedback.
- Avoid global DOM queries when an extension hook provides scoped nodes or context.
Verification
- Manually load the WebUI or run targeted frontend/WebUI tests after changing visible extension behavior.
- Verify extension cache clearing paths when adding new extension points.
Child DOX Index
Direct child DOX files:
| Child | Scope |
|---|---|
| fetch_api_call_after/AGENTS.md | Frontend hooks after raw fetchApi() calls. |
| fetch_api_call_before/AGENTS.md | Frontend hooks before raw fetchApi() calls. |
| get_message_handler/AGENTS.md | Message rendering handler extensions. |
| initFw_end/AGENTS.md | Post-WebUI-framework-initialization extensions. |
| json_api_call_after/AGENTS.md | Frontend hooks after callJsonApi() calls. |
| json_api_call_before/AGENTS.md | Frontend hooks before callJsonApi() calls. |
| right-canvas-panels/AGENTS.md | Built-in right-canvas panel HTML contributions. |
| right_canvas_register_surfaces/AGENTS.md | Built-in right-canvas surface registrations. |
| set_messages_after_loop/AGENTS.md | Frontend hooks after message DOM updates. |
| set_messages_before_loop/AGENTS.md | Frontend hooks before message DOM updates. |
| webui_ws_push/AGENTS.md | WebUI WebSocket push-event behavior. |