Agent Zero AI framework
Align Agent Editor toast action styling
Alessandro3ce418a9d5d4
diff --git a/plugins/_agent_editor/webui/agent-editor-store.js b/plugins/_agent_editor/webui/agent-editor-store.jsindex 1bfabd8b4..9a470f58b 100644--- a/plugins/_agent_editor/webui/agent-editor-store.js+++ b/plugins/_agent_editor/webui/agent-editor-store.js@@ -1255,7 +1255,7 @@ const model = {await this.openFreshChat(profileId, creating);} else {globalThis.justToast?.(- `Agent saved. <button class="toast-link" type="button" onclick="window.testAgentProfile('${profileId}')">Test in new chat</button>`,+ `Agent saved.<div class="toast-action-row"><button class="button confirm" type="button" onclick="window.testAgentProfile('${profileId}')">Test in new chat</button></div>`,"success", 8000, "agent-editor-saved",);}diff --git a/plugins/_agent_editor/webui/main.html b/plugins/_agent_editor/webui/main.htmlindex c9cecb0e7..b23d9c920 100644--- a/plugins/_agent_editor/webui/main.html+++ b/plugins/_agent_editor/webui/main.html@@ -569,7 +569,6 @@.agent-manager-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; }.agent-profile-availability input { width:0; height:0; margin:0; border:0; }.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }- .toast-link { border:0; background:transparent; color:var(--agent-editor-action); text-decoration:underline; cursor:pointer; }.agent-editor :focus-visible { outline:2px solid var(--agent-editor-action); outline-offset:2px; }.modal-inner.agent-editor-easy { width:min(720px,calc(100vw - 2rem)); max-width:720px; }.modal-inner.agent-editor-advanced { width:92vw; max-width:none; height:min(calc(100vh - 4rem),80rem); max-height:calc(100vh - 4rem); }diff --git a/tests/test_agent_editor_webui.py b/tests/test_agent_editor_webui.pyindex 1014e0836..1a28ec0e5 100644--- a/tests/test_agent_editor_webui.py+++ b/tests/test_agent_editor_webui.py@@ -296,6 +296,9 @@ def test_agent_editor_store_has_no_conversational_or_model_builder_path() -> Nonassert "save_agent_data" not in sourceassert not re.search(r"utility.?model|call.?model|generate", source, re.IGNORECASE)assert "Advanced <span" not in modal+ assert 'class="toast-action-row"' in source+ assert 'class="button confirm"' in source+ assert "toast-link" not in source and ".toast-link" not in modal@pytest.mark.skipif(not shutil.which("node"), reason="node is required")