mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 12:10:57 +00:00
feat: Standalone preset storage, override permission hardening & bug fixes
- Extract presets into global presets.yaml; move editor to plugin main screen - Add project-wide override sync and three-layer permission checks - Fix embedding change detection, new-chat inheritance, and preset name leak bugs - Clean up dead imports/params and fix description text
This commit is contained in:
parent
1b0c57a3e8
commit
3b86ebb837
12 changed files with 544 additions and 351 deletions
|
|
@ -12,6 +12,13 @@ class ModelConfigSet(ApiHandler):
|
|||
if not config or not isinstance(config, dict):
|
||||
return Response(status=400, response="Missing or invalid config")
|
||||
|
||||
# Read previous config BEFORE saving so we can detect changes
|
||||
prev_config = plugins.get_plugin_config(
|
||||
"_model_config",
|
||||
project_name=project_name or None,
|
||||
agent_profile=agent_profile or None,
|
||||
) or {}
|
||||
|
||||
plugins.save_plugin_config(
|
||||
"_model_config",
|
||||
project_name=project_name,
|
||||
|
|
@ -20,7 +27,6 @@ class ModelConfigSet(ApiHandler):
|
|||
)
|
||||
|
||||
# Check if embedding model changed and notify
|
||||
prev_config = plugins.get_plugin_config("_model_config") or {}
|
||||
prev_embed = prev_config.get("embedding_model", {})
|
||||
new_embed = config.get("embedding_model", {})
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue