mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-28 19:51:11 +00:00
feat: Preset reset on Default, expanded fields & cross-modal nav
- Reset presets to system defaults when "Default" is clicked in Configure Models (resetGlobalPresets() + backend reset action) - Expand preset fields to full config parity: ctx_length, ctx_history/ctx_input, vision, rate limits, kwargs, browser_http_headers - Extract _normalizePresets() helper inside store to eliminate duplication - Hide "Edit Presets" link when Per-Chat Override is disabled - Add Settings + API Keys navigation buttons to Model Presets page - Add dynamic import guard for plugin-settings-store.js in cross-modal navigation buttons - Rename model switcher label from "Default" to "Default LLM"
This commit is contained in:
parent
1f6786575c
commit
da7e33549c
8 changed files with 241 additions and 23 deletions
|
|
@ -11,6 +11,14 @@
|
|||
x-init="
|
||||
await $store.modelConfig.ensureLoaded();
|
||||
$store.modelConfig.initConfigFields(config);
|
||||
const _origReset = context.resetToDefault.bind(context);
|
||||
context.resetToDefault = async () => {
|
||||
const before = context.settings;
|
||||
await _origReset();
|
||||
if (context.settings !== before) {
|
||||
await $store.modelConfig.resetGlobalPresets();
|
||||
}
|
||||
};
|
||||
">
|
||||
<template x-if="config && $store.modelConfig._loaded">
|
||||
<div class="model-config-sections">
|
||||
|
|
@ -32,6 +40,13 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="override-presets-link" x-show="config.chat_model.allow_chat_override">
|
||||
<button class="text-button" @click="openModal('/plugins/_model_config/webui/main.html')">
|
||||
<span class="material-symbols-outlined" style="font-size:15px;">tune</span>
|
||||
<span>Edit Presets</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Model Sections (Main, Utility, Embedding) -->
|
||||
|
|
@ -280,6 +295,13 @@
|
|||
.model-section .section-title {
|
||||
margin-top: 0;
|
||||
}
|
||||
.override-presets-link {
|
||||
margin-top: 4px;
|
||||
}
|
||||
.override-presets-link .text-button {
|
||||
font-size: 0.78rem;
|
||||
gap: 4px;
|
||||
}
|
||||
.eye-toggle {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue