Skip to content

Agent Zero AI framework

show active plugin name in settings modal; clean browser_agent actions

Alessandro8b8fecdef1dc
diff --git a/plugins/_browser_agent/webui/browser-agent-store.js b/plugins/_browser_agent/webui/browser-agent-store.js
index d6e3529cb..1f24ba448 100644
--- a/plugins/_browser_agent/webui/browser-agent-store.js
+++ b/plugins/_browser_agent/webui/browser-agent-store.js
@@ -10,11 +10,6 @@ const model = {
error: "",
status: null,
- async openModelSettings() {
- await import("/components/plugins/plugin-settings-store.js");
- await $store.pluginSettingsPrototype.openConfig("_model_config");
- },
-
async refreshStatus() {
this.status = await callJsonApi(STATUS_API, {});
},
diff --git a/plugins/_browser_agent/webui/main.html b/plugins/_browser_agent/webui/main.html
index a7fc26702..c67edd8d6 100644
--- a/plugins/_browser_agent/webui/main.html
+++ b/plugins/_browser_agent/webui/main.html
@@ -13,7 +13,6 @@
x-destroy="$store.browserAgentPage.cleanup()"
class="browser-agent-page"
>
- <div class="section-title">Browser Agent</div>
<div class="section-description">
Built-in browser automation plugin backed by `browser-use` and Playwright.
Model selection stays in `_model_config`; the browser agent can follow the effective Main Model or use one saved preset just for browser tasks.
@@ -111,12 +110,6 @@
</template>
<div class="browser-agent-actions">
- <button
- class="btn btn-field"
- @click="$store.browserAgentPage.openModelSettings()"
- >
- Open Model Settings
- </button>
<button class="btn btn-field" @click="openModal('/plugins/_model_config/webui/main.html')">
Open Presets
</button>
diff --git a/webui/components/plugins/plugin-settings-store.js b/webui/components/plugins/plugin-settings-store.js
index 87c5ac6b6..93c7866c2 100644
--- a/webui/components/plugins/plugin-settings-store.js
+++ b/webui/components/plugins/plugin-settings-store.js
@@ -37,6 +37,19 @@ const model = {
return this._toComparableJson(this.settings) !== (this.settingsSnapshotJson || "");
},
+ get pluginTitle() {
+ return (
+ this.pluginMeta?.display_name ||
+ this.pluginMeta?.name ||
+ this.pluginName ||
+ "Plugin"
+ );
+ },
+
+ get modalTitle() {
+ return `${this.pluginTitle} Settings`;
+ },
+
confirmDiscardUnsavedChanges() {
if (!this.hasUnsavedChanges) return true;
return window.confirm("You have unsaved changes that will be lost. Continue?");
diff --git a/webui/components/plugins/plugin-settings.html b/webui/components/plugins/plugin-settings.html
index 067208210..d80c9c10f 100644
--- a/webui/components/plugins/plugin-settings.html
+++ b/webui/components/plugins/plugin-settings.html
@@ -6,7 +6,7 @@
</script>
</head>
<body>
- <div x-data="(() => {
+ <div x-data="(() => {
const context = $instantiate($store.pluginSettingsPrototype);
return {
context,
@@ -17,7 +17,14 @@
})()">
<template x-if="context">
<div>
- <div x-create="(() => { const modal = $el.closest('.modal'); if (modal) modal.__pluginSettingsContext = context; })()"
+ <div x-create="(() => {
+ const modal = $el.closest('.modal');
+ if (modal) {
+ modal.__pluginSettingsContext = context;
+ const modalTitle = modal.querySelector('.modal-title');
+ if (modalTitle) modalTitle.textContent = context.modalTitle || 'Plugin Settings';
+ }
+ })()"
x-destroy="context.cleanup()">
<!-- Context toolbar: Project + Agent profile (only when at least one scope is configurable) -->