Agent Zero AI framework
refactor memory to standalone config and unify plugin UI
Alessandro803248168ce5
diff --git a/plugins/example_agent/webui/config.html b/plugins/example_agent/webui/config.htmldeleted file mode 100644index 6d34ae1dc..000000000--- a/plugins/example_agent/webui/config.html+++ /dev/null@@ -1,14 +0,0 @@-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Example Agent Configuration</title>-</head>-<body>- <div class="container">- <h1>Example Agent Plugin Configuration</h1>- <p>This is a dummy configuration page for the example agent plugin.</p>- </div>-</body>-</html>diff --git a/plugins/memory/config.json b/plugins/memory/config.jsonnew file mode 100644index 000000000..71c2025cc--- /dev/null+++ b/plugins/memory/config.json@@ -0,0 +1,17 @@+{+ "memory_recall_enabled": true,+ "memory_recall_delayed": false,+ "memory_recall_interval": 3,+ "memory_recall_history_len": 10000,+ "memory_recall_memories_max_search": 12,+ "memory_recall_solutions_max_search": 8,+ "memory_recall_memories_max_result": 5,+ "memory_recall_solutions_max_result": 3,+ "memory_recall_similarity_threshold": 0.7,+ "memory_recall_query_prep": false,+ "memory_recall_post_filter": false,+ "memory_memorize_enabled": true,+ "memory_memorize_consolidation": true,+ "memory_memorize_replace_threshold": 0.9,+ "agent_memory_subdir": "default"+}diff --git a/plugins/memory/extensions/python/message_loop_prompts_after/_50_recall_memories.py b/plugins/memory/extensions/python/message_loop_prompts_after/_50_recall_memories.pyindex e36254383..e52cf1c70 100644--- a/plugins/memory/extensions/python/message_loop_prompts_after/_50_recall_memories.py+++ b/plugins/memory/extensions/python/message_loop_prompts_after/_50_recall_memories.py@@ -1,7 +1,7 @@import asynciofrom python.helpers.extension import Extensionfrom agent import LoopData-from python.helpers import dirty_json, errors, settings, log+from python.helpers import dirty_json, errors, log, plugins# Direct import - this extension lives inside the memory pluginfrom plugins.memory.helpers.memory import Memory@@ -25,7 +25,7 @@ class RecallMemories(Extension):async def execute(self, loop_data: LoopData = LoopData(), **kwargs):- set = settings.get_settings()+ set = plugins.get_plugin_config("memory")# turned off in settings?if not set["memory_recall_enabled"]:@@ -63,7 +63,7 @@ class RecallMemories(Extension):del extras["solutions"]- set = settings.get_settings()+ set = plugins.get_plugin_config("memory")# try:# get system message and chat history for util llmdiff --git a/plugins/memory/extensions/python/message_loop_prompts_after/_91_recall_wait.py b/plugins/memory/extensions/python/message_loop_prompts_after/_91_recall_wait.pyindex 4f17d7732..9039fefd0 100644--- a/plugins/memory/extensions/python/message_loop_prompts_after/_91_recall_wait.py+++ b/plugins/memory/extensions/python/message_loop_prompts_after/_91_recall_wait.py@@ -1,12 +1,12 @@from python.helpers.extension import Extensionfrom agent import LoopDatafrom plugins.memory.extensions.python.message_loop_prompts_after._50_recall_memories import DATA_NAME_TASK as DATA_NAME_TASK_MEMORIES, DATA_NAME_ITER as DATA_NAME_ITER_MEMORIES-from python.helpers import settings+from python.helpers import pluginsclass RecallWait(Extension):async def execute(self, loop_data: LoopData = LoopData(), **kwargs):- set = settings.get_settings()+ set = plugins.get_plugin_config("memory")task = self.agent.get_data(DATA_NAME_TASK_MEMORIES)iter = self.agent.get_data(DATA_NAME_ITER_MEMORIES) or 0diff --git a/plugins/memory/extensions/python/monologue_end/_50_memorize_fragments.py b/plugins/memory/extensions/python/monologue_end/_50_memorize_fragments.pyindex 77dc0d204..5fcf3227e 100644--- a/plugins/memory/extensions/python/monologue_end/_50_memorize_fragments.py+++ b/plugins/memory/extensions/python/monologue_end/_50_memorize_fragments.py@@ -1,5 +1,5 @@import asyncio-from python.helpers import settings, errors+from python.helpers import errors, pluginsfrom python.helpers.extension import Extensionfrom python.helpers.dirty_json import DirtyJsonfrom agent import LoopData@@ -16,7 +16,7 @@ class MemorizeMemories(Extension):async def execute(self, loop_data: LoopData = LoopData(), **kwargs):# try:- set = settings.get_settings()+ set = plugins.get_plugin_config("memory")if not set["memory_memorize_enabled"]:return@@ -36,7 +36,7 @@ class MemorizeMemories(Extension):async def memorize(self, loop_data: LoopData, log_item: LogItem, **kwargs):try:- set = settings.get_settings()+ set = plugins.get_plugin_config("memory")db = await Memory.get(self.agent)diff --git a/plugins/memory/extensions/python/monologue_end/_51_memorize_solutions.py b/plugins/memory/extensions/python/monologue_end/_51_memorize_solutions.pyindex 24c90bab0..82877d3c9 100644--- a/plugins/memory/extensions/python/monologue_end/_51_memorize_solutions.py+++ b/plugins/memory/extensions/python/monologue_end/_51_memorize_solutions.py@@ -1,5 +1,5 @@import asyncio-from python.helpers import settings, errors+from python.helpers import errors, pluginsfrom python.helpers.extension import Extensionfrom python.helpers.dirty_json import DirtyJsonfrom agent import LoopData@@ -15,7 +15,7 @@ class MemorizeSolutions(Extension):async def execute(self, loop_data: LoopData = LoopData(), **kwargs):# try:- set = settings.get_settings()+ set = plugins.get_plugin_config("memory")if not set["memory_memorize_enabled"]:return@@ -34,7 +34,7 @@ class MemorizeSolutions(Extension):async def memorize(self, loop_data: LoopData, log_item: LogItem, **kwargs):try:- set = settings.get_settings()+ set = plugins.get_plugin_config("memory")db = await Memory.get(self.agent)diff --git a/plugins/memory/helpers/memory.py b/plugins/memory/helpers/memory.pyindex c283b4b1a..c73ec538c 100644--- a/plugins/memory/helpers/memory.py+++ b/plugins/memory/helpers/memory.py@@ -23,7 +23,7 @@ import os, jsonimport numpy as npfrom python.helpers.print_style import PrintStyle-from python.helpers import files+from python.helpers import files, pluginsfrom langchain_core.documents import Documentfrom . import knowledge_importfrom python.helpers.log import Log, LogItem@@ -530,7 +530,7 @@ def get_context_memory_subdir(context: AgentContext) -> str:return memory_subdir# no project, regular memory subdir- return context.config.memory_subdir or "default"+ return plugins.get_plugin_config("memory").get("agent_memory_subdir", "default")def get_existing_memory_subdirs() -> list[str]:diff --git a/plugins/memory/webui/config.html b/plugins/memory/webui/config.htmlindex 379a8817c..af05f3cce 100644--- a/plugins/memory/webui/config.html+++ b/plugins/memory/webui/config.html@@ -1,35 +1,258 @@<html><head>- <title>Memory Settings</title>- <script type="module">- import { store } from "/components/settings/settings-store.js";- </script>+ <title>Memory</title></head>+<body>- <!--- This file surfaces the existing core memory settings inside the plugin settings modal.- It sets saveMode='core' so the modal's Save button delegates to $store.settings.saveSettings().- -->- <div x-data- x-init="- $store.pluginSettings.saveMode = 'core';- if ($store.settings && !$store.settings.settings) $store.settings.onOpen();- ">- <x-component path="settings/agent/memory.html"></x-component>- </div>-</body>-</html>-<!DOCTYPE html>-<html lang="en">-<head>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>Memory Configuration</title>-</head>-<body>- <div class="container">- <h1>Memory Plugin Configuration</h1>- <p>This is a dummy configuration page for the memory plugin.</p>+ <div x-data>+ <template x-if="$store.pluginSettings.settings">+ <div>+ <div class="section-title">Memory</div>+ <div class="section-description">+ Configuration of A0's memory system. A0 memorizes and recalls memories automatically to help its+ context awareness.+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory Subdirectory</div>+ <div class="field-description">+ Subdirectory of /memory folder to use for agent memory storage. Used to separate memory+ storage between different instances.+ </div>+ </div>+ <div class="field-control">+ <input type="text" x-model="$store.pluginSettings.settings.agent_memory_subdir" />+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory Dashboard</div>+ <div class="field-description">+ View and explore all stored memories in a table format with filtering and search+ capabilities.+ </div>+ </div>+ <div class="field-control">+ <button class="btn btn-field"+ @click="openModal('/plugins/memory/webui/memory-dashboard.html');">+ Open Dashboard+ </button>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall enabled</div>+ <div class="field-description">Agent Zero will automatically recall memories based on+ convesation context.</div>+ </div>+ <div class="field-control">+ <label class="toggle">+ <input type="checkbox" x-model="$store.pluginSettings.settings.memory_recall_enabled" />+ <span class="toggler"></span>+ </label>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall delayed</div>+ <div class="field-description">+ The agent will not wait for auto memory recall. Memories will be delivered one message+ later. This speeds up agent's response time but may result in less relevant first step.+ </div>+ </div>+ <div class="field-control">+ <label class="toggle">+ <input type="checkbox" x-model="$store.pluginSettings.settings.memory_recall_delayed" />+ <span class="toggler"></span>+ </label>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Auto-recall AI query preparation</div>+ <div class="field-description">+ Enables vector DB query preparation from conversation context by utility LLM for+ auto-recall. Improves search quality, adds 1 utility LLM call per auto-recall.+ </div>+ </div>+ <div class="field-control">+ <label class="toggle">+ <input type="checkbox" x-model="$store.pluginSettings.settings.memory_recall_query_prep" />+ <span class="toggler"></span>+ </label>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Auto-recall AI post-filtering</div>+ <div class="field-description">+ Enables memory relevance filtering by utility LLM for auto-recall. Improves search quality,+ adds 1 utility LLM call per auto-recall.+ </div>+ </div>+ <div class="field-control">+ <label class="toggle">+ <input type="checkbox"+ x-model="$store.pluginSettings.settings.memory_recall_post_filter" />+ <span class="toggler"></span>+ </label>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall interval</div>+ <div class="field-description">+ Memories are recalled after every user or superior agent message. During agent's monologue,+ memories are recalled every X turns based on this parameter.+ </div>+ </div>+ <div class="field-control">+ <input type="range" min="1" max="10" step="1"+ x-model.number="$store.pluginSettings.settings.memory_recall_interval" />+ <span class="range-value"+ x-text="$store.pluginSettings.settings.memory_recall_interval"></span>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall history length</div>+ <div class="field-description">+ The length of conversation history passed to memory recall LLM for context (in characters).+ </div>+ </div>+ <div class="field-control">+ <input type="number"+ x-model.number="$store.pluginSettings.settings.memory_recall_history_len" />+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall similarity threshold</div>+ <div class="field-description">+ The threshold for similarity search in memory recall (0 = no similarity, 1 = exact match).+ </div>+ </div>+ <div class="field-control">+ <input type="range" min="0" max="1" step="0.01"+ x-model.number="$store.pluginSettings.settings.memory_recall_similarity_threshold" />+ <span class="range-value"+ x-text="$store.pluginSettings.settings.memory_recall_similarity_threshold"></span>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall max memories to search</div>+ <div class="field-description">+ The maximum number of memories returned by vector DB for further processing.+ </div>+ </div>+ <div class="field-control">+ <input type="number"+ x-model.number="$store.pluginSettings.settings.memory_recall_memories_max_search" />+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall max memories to use</div>+ <div class="field-description">+ The maximum number of memories to inject into A0's context window.+ </div>+ </div>+ <div class="field-control">+ <input type="number"+ x-model.number="$store.pluginSettings.settings.memory_recall_memories_max_result" />+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall max solutions to search</div>+ <div class="field-description">+ The maximum number of solutions returned by vector DB for further processing.+ </div>+ </div>+ <div class="field-control">+ <input type="number"+ x-model.number="$store.pluginSettings.settings.memory_recall_solutions_max_search" />+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Memory auto-recall max solutions to use</div>+ <div class="field-description">+ The maximum number of solutions to inject into A0's context window.+ </div>+ </div>+ <div class="field-control">+ <input type="number"+ x-model.number="$store.pluginSettings.settings.memory_recall_solutions_max_result" />+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Auto-memorize enabled</div>+ <div class="field-description">+ A0 will automatically memorize facts and solutions from conversation history.+ </div>+ </div>+ <div class="field-control">+ <label class="toggle">+ <input type="checkbox"+ x-model="$store.pluginSettings.settings.memory_memorize_enabled" />+ <span class="toggler"></span>+ </label>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Auto-memorize AI consolidation</div>+ <div class="field-description">+ A0 will automatically consolidate similar memories using utility LLM. Improves memory quality+ over time, adds 2 utility LLM calls per memory.+ </div>+ </div>+ <div class="field-control">+ <label class="toggle">+ <input type="checkbox"+ x-model="$store.pluginSettings.settings.memory_memorize_consolidation" />+ <span class="toggler"></span>+ </label>+ </div>+ </div>++ <div class="field">+ <div class="field-label">+ <div class="field-title">Auto-memorize replacement threshold</div>+ <div class="field-description">+ Only applies when AI consolidation is disabled. Replaces previous similar memories with new+ ones based on this threshold. 0 = replace even if not similar at all, 1 = replace only if+ exact match.+ </div>+ </div>+ <div class="field-control">+ <input type="range" min="0" max="1" step="0.01"+ x-model.number="$store.pluginSettings.settings.memory_memorize_replace_threshold" />+ <span class="range-value"+ x-text="$store.pluginSettings.settings.memory_memorize_replace_threshold"></span>+ </div>+ </div>+ </div>+ </template></div></body>+</html>diff --git a/webui/components/plugins/list/plugin-list.html b/webui/components/plugins/list/plugin-list.htmlindex f949c8f29..dbf58406e 100644--- a/webui/components/plugins/list/plugin-list.html+++ b/webui/components/plugins/list/plugin-list.html@@ -113,6 +113,7 @@}.nav-link {+ font-family: "Rubik", Arial, Helvetica, sans-serif;border: 1px solid transparent;border-top-left-radius: 4px;border-top-right-radius: 4px;@@ -183,9 +184,9 @@align-items: center;gap: 0.5rem;padding-bottom: var(--spacing-sm);- flex-wrap: wrap;+ flex-wrap: nowrap;min-width: 0;- flex: 0 1 11.5rem;+ flex: 0 0 auto;max-width: 100%;justify-content: flex-end;}diff --git a/webui/components/plugins/plugin-info.html b/webui/components/plugins/plugin-info.htmlindex eade01797..083a0d8e4 100644--- a/webui/components/plugins/plugin-info.html+++ b/webui/components/plugins/plugin-info.html@@ -63,6 +63,10 @@</div><style>+ .plugin-info-view {+ padding: 1rem;+ }+.plugin-info-header {display: flex;flex-wrap: wrap;diff --git a/webui/components/plugins/plugin-settings.html b/webui/components/plugins/plugin-settings.htmlindex 88b669779..93e5394cf 100644--- a/webui/components/plugins/plugin-settings.html+++ b/webui/components/plugins/plugin-settings.html@@ -76,8 +76,8 @@</div><style>- .plugin-settings-toolbar {- margin-bottom: 1rem;+ .plugin-settings-toolbar, .plugin-settings-body {+ padding: 1rem;}.plugin-settings-toolbar-row {diff --git a/webui/components/settings/agent/memory.html b/webui/components/settings/agent/memory.htmldeleted file mode 100644index 9efa1f068..000000000--- a/webui/components/settings/agent/memory.html+++ /dev/null@@ -1,234 +0,0 @@-<html>- <head>- <title>Memory</title>- </head>-- <body>- <div x-data>- <template x-if="$store.settings.settings">- <div>- <div class="section-title">Memory</div>- <div class="section-description">- Configuration of A0's memory system. A0 memorizes and recalls memories automatically to help its context awareness.- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory Subdirectory</div>- <div class="field-description">- Subdirectory of /memory folder to use for agent memory storage. Used to separate memory storage between different instances.- </div>- </div>- <div class="field-control">- <input type="text" x-model="$store.settings.settings.agent_memory_subdir" />- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory Dashboard</div>- <div class="field-description">- View and explore all stored memories in a table format with filtering and search capabilities.- </div>- </div>- <div class="field-control">- <button- class="btn btn-field"- @click="openModal('../plugins/memory/webui/memory-dashboard.html');"- >- Open Dashboard- </button>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall enabled</div>- <div class="field-description">Agent Zero will automatically recall memories based on convesation context.</div>- </div>- <div class="field-control">- <label class="toggle">- <input type="checkbox" x-model="$store.settings.settings.memory_recall_enabled" />- <span class="toggler"></span>- </label>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall delayed</div>- <div class="field-description">- The agent will not wait for auto memory recall. Memories will be delivered one message later. This speeds up agent's response time but may result in less relevant first step.- </div>- </div>- <div class="field-control">- <label class="toggle">- <input type="checkbox" x-model="$store.settings.settings.memory_recall_delayed" />- <span class="toggler"></span>- </label>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Auto-recall AI query preparation</div>- <div class="field-description">- Enables vector DB query preparation from conversation context by utility LLM for auto-recall. Improves search quality, adds 1 utility LLM call per auto-recall.- </div>- </div>- <div class="field-control">- <label class="toggle">- <input type="checkbox" x-model="$store.settings.settings.memory_recall_query_prep" />- <span class="toggler"></span>- </label>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Auto-recall AI post-filtering</div>- <div class="field-description">- Enables memory relevance filtering by utility LLM for auto-recall. Improves search quality, adds 1 utility LLM call per auto-recall.- </div>- </div>- <div class="field-control">- <label class="toggle">- <input type="checkbox" x-model="$store.settings.settings.memory_recall_post_filter" />- <span class="toggler"></span>- </label>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall interval</div>- <div class="field-description">- Memories are recalled after every user or superior agent message. During agent's monologue, memories are recalled every X turns based on this parameter.- </div>- </div>- <div class="field-control">- <input type="range" min="1" max="10" step="1" x-model.number="$store.settings.settings.memory_recall_interval" />- <span class="range-value" x-text="$store.settings.settings.memory_recall_interval"></span>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall history length</div>- <div class="field-description">- The length of conversation history passed to memory recall LLM for context (in characters).- </div>- </div>- <div class="field-control">- <input type="number" x-model.number="$store.settings.settings.memory_recall_history_len" />- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall similarity threshold</div>- <div class="field-description">- The threshold for similarity search in memory recall (0 = no similarity, 1 = exact match).- </div>- </div>- <div class="field-control">- <input type="range" min="0" max="1" step="0.01" x-model.number="$store.settings.settings.memory_recall_similarity_threshold" />- <span class="range-value" x-text="$store.settings.settings.memory_recall_similarity_threshold"></span>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall max memories to search</div>- <div class="field-description">- The maximum number of memories returned by vector DB for further processing.- </div>- </div>- <div class="field-control">- <input type="number" x-model.number="$store.settings.settings.memory_recall_memories_max_search" />- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall max memories to use</div>- <div class="field-description">- The maximum number of memories to inject into A0's context window.- </div>- </div>- <div class="field-control">- <input type="number" x-model.number="$store.settings.settings.memory_recall_memories_max_result" />- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall max solutions to search</div>- <div class="field-description">- The maximum number of solutions returned by vector DB for further processing.- </div>- </div>- <div class="field-control">- <input type="number" x-model.number="$store.settings.settings.memory_recall_solutions_max_search" />- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Memory auto-recall max solutions to use</div>- <div class="field-description">- The maximum number of solutions to inject into A0's context window.- </div>- </div>- <div class="field-control">- <input type="number" x-model.number="$store.settings.settings.memory_recall_solutions_max_result" />- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Auto-memorize enabled</div>- <div class="field-description">- A0 will automatically memorize facts and solutions from conversation history.- </div>- </div>- <div class="field-control">- <label class="toggle">- <input type="checkbox" x-model="$store.settings.settings.memory_memorize_enabled" />- <span class="toggler"></span>- </label>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Auto-memorize AI consolidation</div>- <div class="field-description">- A0 will automatically consolidate similar memories using utility LLM. Improves memory quality over time, adds 2 utility LLM calls per memory.- </div>- </div>- <div class="field-control">- <label class="toggle">- <input type="checkbox" x-model="$store.settings.settings.memory_memorize_consolidation" />- <span class="toggler"></span>- </label>- </div>- </div>-- <div class="field">- <div class="field-label">- <div class="field-title">Auto-memorize replacement threshold</div>- <div class="field-description">- Only applies when AI consolidation is disabled. Replaces previous similar memories with new ones based on this threshold. 0 = replace even if not similar at all, 1 = replace only if exact match.- </div>- </div>- <div class="field-control">- <input type="range" min="0" max="1" step="0.01" x-model.number="$store.settings.settings.memory_memorize_replace_threshold" />- <span class="range-value" x-text="$store.settings.settings.memory_memorize_replace_threshold"></span>- </div>- </div>- </div>- </template>- </div>- </body>-</html>diff --git a/webui/components/settings/plugins/plugins-subsection.html b/webui/components/settings/plugins/plugins-subsection.htmlindex d654a4271..1dd62ab0b 100644--- a/webui/components/settings/plugins/plugins-subsection.html+++ b/webui/components/settings/plugins/plugins-subsection.html@@ -46,7 +46,7 @@this.loading = false;}},- async openSettings(plugin) {+ async openPluginConfig(plugin) {if (!plugin?.name) return;await Alpine.store('pluginSettings')?.open(plugin.name);window.openModal?.('components/plugins/plugin-settings.html');@@ -54,73 +54,137 @@}" x-init="init()"><template x-if="loading || plugins.length > 0">- <div class="plugin-subsection-wrapper">+ <div><div class="section-title">Plugins</div><div class="section-description">Plugin-specific settings for this tab.</div>- <div x-show="loading" class="plugin-subsection-loading">- <span>Loading...</span>+ <div x-show="loading" class="loading">+ <span>Loading plugins...</span></div>- <template x-for="plugin in plugins" :key="plugin.path || plugin.name">- <div class="plugin-subsection-row">- <div class="plugin-subsection-info">- <span class="plugin-subsection-name" x-text="plugin.display_name || plugin.name"></span>- <span class="plugin-subsection-desc" x-text="plugin.description"></span>+ <div class="plugins-list">+ <template x-for="plugin in plugins" :key="plugin.path || plugin.name">+ <div class="plugin-card">+ <div class="plugin-header">+ <div class="plugin-heading">+ <div class="plugin-title" x-text="plugin.display_name || plugin.name || '(unnamed plugin)'"></div>+ <code class="plugin-path" x-text="plugin.path"></code>+ </div>+ <div class="plugin-actions">+ <button type="button"+ class="button"+ title="Config"+ @click="openPluginConfig(plugin)">+ <span class="icon material-symbols-outlined">settings</span> Config+ </button>+ </div>+ </div>+ <div class="plugin-description" x-text="plugin.description || 'No description provided.'"></div></div>- <button class="button" @click="openSettings(plugin)">- <span class="icon material-symbols-outlined">settings</span>- Settings- </button>- </div>- </template>+ </template>+ </div></div></template></div><style>- .plugin-subsection-wrapper {- margin-top: 0.5rem;+ /* Reused styles from plugin-list.html for uniformity */+ .plugins-list {+ margin-top: 0.25rem;}- .plugin-subsection-loading {- color: var(--color-text-secondary);- font-size: var(--font-size-small);- margin-top: 0.5rem;+ .plugin-card {+ border: 1px solid var(--color-border);+ border-radius: 4px;+ padding: 0.75rem;+ margin-top: 0.75rem;+ background: var(--color-bg-primary);}- .plugin-subsection-row {+ .plugin-header {display: flex;- align-items: center;+ align-items: flex-start;justify-content: space-between;gap: 1rem;- padding: 0.6rem 0.75rem;- border: 1px solid var(--color-border);- border-radius: 4px;- margin-top: 0.5rem;- background: var(--color-bg-primary);+ flex-wrap: nowrap;+ min-width: 0;}- .plugin-subsection-info {+ .plugin-heading {display: flex;flex-direction: column;- gap: 0.2rem;min-width: 0;+ flex: 1 1 auto;}- .plugin-subsection-name {+ .plugin-title {font-weight: 600;- font-size: var(--font-size-normal);+ font-size: 1rem;+ min-width: 0;+ flex: 1 1 auto;}- .plugin-subsection-desc {- font-size: var(--font-size-small);+ .plugin-actions {+ display: flex;+ align-items: center;+ gap: 0.5rem;+ padding-bottom: var(--spacing-sm);+ flex-wrap: nowrap;+ min-width: 0;+ flex: 0 0 auto;+ max-width: 100%;+ justify-content: flex-end;+ }++ .plugin-description {+ margin-top: 0.35rem;color: var(--color-text-secondary);- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;+ font-size: var(--font-size-small);+ }++ .plugin-path {+ margin-top: 0.35rem;+ font-size: 0.85rem;+ color: var(--color-text-muted);+ min-width: 0;+ max-width: 100%;+ white-space: pre-wrap;+ word-break: break-word;+ overflow-wrap: anywhere;+ }++ .loading {+ width: 100%;+ text-align: center;+ margin-top: 0.75rem;+ margin-bottom: 0.75rem;+ color: var(--color-secondary);+ }++ @media (max-width: 640px) {+ .plugin-header {+ flex-direction: column;+ align-items: stretch;+ }++ .plugin-heading {+ width: 100%;+ flex: 0 0 auto;+ }++ .plugin-actions {+ width: 100%;+ justify-content: flex-start;+ padding-bottom: 0;+ flex-wrap: wrap;+ }++ .plugin-path {+ white-space: normal;+ word-break: break-word;+ }}</style></body>