mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-08-04 05:29:52 +00:00
Introduce a WebUI extension manifest and rewrite the asset bundler/server to support caller-supplied entry sets, extension-injected entries, and negotiated gzip. Key changes: add get_webui_extension_manifest() to helpers/extension, refactor Stop logic into stop_context() and reuse it from the connector `/stop` command, and add a new `/rename` slash command for chat naming. ui_bundler now accepts entry_urls, includes enabled extension entry files, raises the embedded text file size limit to 512 KiB, computes per-entry-set cache keys, and returns a bundle version based on the bundle signature. ui_server applies Starlette GZip middleware, adds routes (/, /index.html, /ui/index, /safe), serves splash/safe documents, injects the serialized webui_extension_manifest into the rendered index, and streamlines the /ui/asset-bundle endpoint with ETag and gzip handling. Also add multiple WebUI assets and fonts, new/updated plugin command YAML and Python command handlers, and corresponding tests covering bundling, commands, chat naming, and WebUI behaviors. Documentation (.dox.md) updated to reflect the new runtime contracts and guidance.
1.8 KiB
1.8 KiB
Chat Naming Plugin DOX
Purpose
- Own manual and Utility Model-assisted naming for chats and scheduled-task rows.
Ownership
helpers/naming.pyowns user-message selection, name generation, and persistence.extensions/python/monologue_start/owns configured automatic naming.api/chat_name.pyowns modal reads, generation, and manual saves.webui/andextensions/webui/sidebar-row-actions-menu/own the standard rename modal and row-menu action.prompts/owns the Utility Model naming instructions.commands/owns the plugin-contributed/rename <new name|auto>slash command.
Local Contracts
- Automatic naming reads scoped plugin config through the active chat agent.
- Utility Model input contains the current name and user messages only; assistant work and tool results are excluded.
- The complete naming prompt must remain within 70% of the effective Utility Model context window, preserving the newest user context when trimming is required.
oncenames only unnamed user chats from their first user message;alwaysconsiders the latest user message plus recent user context.- Generated names are concise and normalized before persistence.
- Renaming a parallel child updates both its context name and sidebar label.
- Manual task renames update both scheduler metadata and the task context name.
/rename autouses the same generation and persistence helpers as the rename modal; any other non-empty argument is saved as the custom chat name.
Work Guidance
- Keep this behavior plugin-local; do not restore naming prompts or naming hooks to core extensions.
- Use the shared modal stack and sidebar row-menu extension point.
Verification
- Run
pytest plugins/_chat_naming/tests tests/test_sidebar_row_actions.py.
Child DOX Index
No child DOX files.