mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-02 13:40:35 +00:00
Plugin UX Consolidation (pre-upstream-merge snapshot)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
420f70d7de
commit
f788490657
12 changed files with 586 additions and 434 deletions
|
|
@ -52,6 +52,14 @@ const model = {
|
|||
}
|
||||
|
||||
await this.loadSettings();
|
||||
|
||||
// Mirror scope change to pluginToggle so activation state stays in sync
|
||||
const toggleStore = Alpine.store('pluginToggle');
|
||||
if (toggleStore) {
|
||||
toggleStore.projectName = nextProject;
|
||||
toggleStore.agentProfileKey = nextProfile;
|
||||
toggleStore.calculateStatus();
|
||||
}
|
||||
},
|
||||
|
||||
// where the settings were actually loaded from
|
||||
|
|
@ -166,17 +174,19 @@ const model = {
|
|||
error: null,
|
||||
|
||||
// Called by the subsection button before openModal()
|
||||
async open(pluginName) {
|
||||
// Optional scope: { projectName, agentProfileKey } — skips redundant global loadSettings()
|
||||
// when the caller already knows which scope to open at.
|
||||
async open(pluginName, { projectName = "", agentProfileKey = "" } = {}) {
|
||||
this.pluginName = pluginName;
|
||||
this.pluginMeta = null;
|
||||
this.settings = {};
|
||||
this.settingsSnapshotJson = "";
|
||||
this.error = null;
|
||||
this.saveMode = 'plugin';
|
||||
this.projectName = "";
|
||||
this.agentProfileKey = "";
|
||||
this.previousProjectName = "";
|
||||
this.previousAgentProfileKey = "";
|
||||
this.projectName = projectName;
|
||||
this.agentProfileKey = agentProfileKey;
|
||||
this.previousProjectName = projectName;
|
||||
this.previousAgentProfileKey = agentProfileKey;
|
||||
this.loadedPath = "";
|
||||
this.loadedProjectName = "";
|
||||
this.loadedAgentProfile = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue