From d714c4f80b54f52e21cf1ad24c05abe5419a562d Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Mon, 3 Mar 2025 23:08:58 +0100 Subject: [PATCH] Page restyling --- core/agent/knowledgebase.go | 2 + webui/views/agents.html | 396 +++++-------- webui/views/partials/header.html | 981 ++++++++++++++++++++++++------- webui/views/partials/menu.html | 87 ++- webui/views/settings.html | 211 ++----- 5 files changed, 1029 insertions(+), 648 deletions(-) diff --git a/core/agent/knowledgebase.go b/core/agent/knowledgebase.go index 3c9fd94..cc6a3bd 100644 --- a/core/agent/knowledgebase.go +++ b/core/agent/knowledgebase.go @@ -61,6 +61,8 @@ func (a *Agent) knowledgeBaseLookup() { } func (a *Agent) saveCurrentConversationInMemory() { + + if !a.options.enableLongTermMemory && !a.options.enableSummaryMemory { xlog.Debug("Long term memory is disabled", "agent", a.Character.Name) return diff --git a/webui/views/agents.html b/webui/views/agents.html index f2dec40..19a234f 100644 --- a/webui/views/agents.html +++ b/webui/views/agents.html @@ -5,79 +5,6 @@ Agent List {{template "views/partials/header"}} - {{template "views/partials/menu"}} @@ -88,217 +15,172 @@
-

Smart Agent List

+

Smart Agent List

-
+
Add New Agent +
-
-
-
-
- - - - - - - - - - - - - - {{ $status := .Status }} - {{ range .Agents }} - - - - - - - - - {{ end }} - - -
- Name - - Status - - Talk - - Start - - Stop - - Settings -
{{.}} - Online: {{ index $status . }} - - Status - - - - Talk - - - - - - - - Settings - -
+ -
- - -
-

Import Agent

- - -
- -
- Agent imported successfully! The page will refresh in a moment. -
- - -
- Error importing agent. -
+
+
+ +
- - -
- - -
-
- - -
-
+
+ + +
+ +
+
+
+ {{ $status := .Status }} + {{ range .Agents }} +
+ {{.}} +

{{.}}

+

Online: {{ index $status . }}

+
+ + Status + + + Talk + + + + + Settings +
- - -
+
+ {{ end }} + +
+

© 2025 Smart Agent List. All rights reserved.

+
+
- - + // Function to update agent status in the UI + function updateAgentStatus(agentName, isOnline) { + // Find the card for this agent + const cards = document.querySelectorAll('.card'); + cards.forEach(card => { + const agentTitle = card.querySelector('h2').textContent; + if (agentTitle === agentName) { + // Update the "Online:" text + const statusText = card.querySelector('p'); + statusText.textContent = `Online: ${isOnline}`; + } + }); + } + + \ No newline at end of file diff --git a/webui/views/partials/header.html b/webui/views/partials/header.html index 95f6d4d..ec3ce23 100644 --- a/webui/views/partials/header.html +++ b/webui/views/partials/header.html @@ -1,8 +1,8 @@ - + @@ -10,239 +10,764 @@ - - diff --git a/webui/views/partials/menu.html b/webui/views/partials/menu.html index 23adb21..cfbf5d6 100644 --- a/webui/views/partials/menu.html +++ b/webui/views/partials/menu.html @@ -1,22 +1,81 @@ -