show active plugin name in settings modal; clean browser_agent actions
- Populate plugin settings modal title from selected plugin metadata instead of static `"Plugin Settings"`. - Keep the modal title aligned with the currently opened plugin (`display_name`/`name` fallback). - Remove the non-functional **Open Model Settings** action from `_browser_agent` UI. - Remove the now-unused `openModelSettings()` handler from `browser-agent-store`. - Preserve and retain only **Open Presets** and **Open API Keys** in Browser Agent actions.
Alessandro committed
Apr 21, 2026 at 06:22 UTC
8b8fecdef1dc087f626d461822ecd065976aa053
4 files changed
+22
-14
plugins/_browser_agent/webui/browser-agent-store.js
-5
@@ -10,11 +10,6 @@ const model = {
10
error: "",
11
status: null,
12
13
- async openModelSettings() {
14
- await import("/components/plugins/plugin-settings-store.js");
15
- await $store.pluginSettingsPrototype.openConfig("_model_config");
16
- },
17
-
13
async refreshStatus() {
14
this.status = await callJsonApi(STATUS_API, {});
15
},
plugins/_browser_agent/webui/main.html
-7
@@ -13,7 +13,6 @@
13
x-destroy="$store.browserAgentPage.cleanup()"
14
class="browser-agent-page"
15
>
16
- <div class="section-title">Browser Agent</div>
16
<div class="section-description">
17
Built-in browser automation plugin backed by `browser-use` and Playwright.
18
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 @@
110
</template>
111
112
<div class="browser-agent-actions">
114
- <button
115
- class="btn btn-field"
116
- @click="$store.browserAgentPage.openModelSettings()"
117
- >
118
- Open Model Settings
119
- </button>
113
<button class="btn btn-field" @click="openModal('/plugins/_model_config/webui/main.html')">
114
Open Presets
115
</button>
webui/components/plugins/plugin-settings-store.js
+13
@@ -37,6 +37,19 @@ const model = {
37
return this._toComparableJson(this.settings) !== (this.settingsSnapshotJson || "");
38
},
39
40
+ get pluginTitle() {
41
+ return (
42
+ this.pluginMeta?.display_name ||
43
+ this.pluginMeta?.name ||
44
+ this.pluginName ||
45
+ "Plugin"
46
+ );
47
+ },
48
+
49
+ get modalTitle() {
50
+ return `${this.pluginTitle} Settings`;
51
+ },
52
+
53
confirmDiscardUnsavedChanges() {
54
if (!this.hasUnsavedChanges) return true;
55
return window.confirm("You have unsaved changes that will be lost. Continue?");
webui/components/plugins/plugin-settings.html
+9
-2
@@ -6,7 +6,7 @@
6
</script>
7
</head>
8
<body>
9
- <div x-data="(() => {
9
+ <div x-data="(() => {
10
const context = $instantiate($store.pluginSettingsPrototype);
11
return {
12
context,
@@ -17,7 +17,14 @@
17
})()">
18
<template x-if="context">
19
<div>
20
- <div x-create="(() => { const modal = $el.closest('.modal'); if (modal) modal.__pluginSettingsContext = context; })()"
20
+ <div x-create="(() => {
21
+ const modal = $el.closest('.modal');
22
+ if (modal) {
23
+ modal.__pluginSettingsContext = context;
24
+ const modalTitle = modal.querySelector('.modal-title');
25
+ if (modalTitle) modalTitle.textContent = context.modalTitle || 'Plugin Settings';
26
+ }
27
+ })()"
28
x-destroy="context.cleanup()">
29
30
<!-- Context toolbar: Project + Agent profile (only when at least one scope is configurable) -->