diff --git a/webui/app.go b/webui/app.go index d85c77f..75cf677 100644 --- a/webui/app.go +++ b/webui/app.go @@ -249,7 +249,7 @@ func (a *App) ImportAgent(pool *state.AgentPool) func(c *fiber.Ctx) error { } } -func (a *App) Chat(pool *state.AgentPool) func(c *fiber.Ctx) error { +func (a *App) OldChat(pool *state.AgentPool) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { payload := struct { Message string `json:"message"` @@ -307,9 +307,9 @@ func (a *App) Chat(pool *state.AgentPool) func(c *fiber.Ctx) error { } } -// ChatAPI provides a JSON-based API for chat functionality +// Chat provides a JSON-based API for chat functionality // This is designed to work better with the React UI -func (a *App) ChatAPI(pool *state.AgentPool) func(c *fiber.Ctx) error { +func (a *App) Chat(pool *state.AgentPool) func(c *fiber.Ctx) error { return func(c *fiber.Ctx) error { // Parse the request body payload := struct { diff --git a/webui/public/css/styles.css b/webui/old/public/css/styles.css similarity index 100% rename from webui/public/css/styles.css rename to webui/old/public/css/styles.css diff --git a/webui/public/css/wizard.css b/webui/old/public/css/wizard.css similarity index 100% rename from webui/public/css/wizard.css rename to webui/old/public/css/wizard.css diff --git a/webui/public/dash.png b/webui/old/public/dash.png similarity index 100% rename from webui/public/dash.png rename to webui/old/public/dash.png diff --git a/webui/public/dash2.png b/webui/old/public/dash2.png similarity index 100% rename from webui/public/dash2.png rename to webui/old/public/dash2.png diff --git a/webui/public/js/agent-form.js b/webui/old/public/js/agent-form.js similarity index 100% rename from webui/public/js/agent-form.js rename to webui/old/public/js/agent-form.js diff --git a/webui/public/js/common.js b/webui/old/public/js/common.js similarity index 100% rename from webui/public/js/common.js rename to webui/old/public/js/common.js diff --git a/webui/public/js/connector-templates.js b/webui/old/public/js/connector-templates.js similarity index 100% rename from webui/public/js/connector-templates.js rename to webui/old/public/js/connector-templates.js diff --git a/webui/public/js/wizard.js b/webui/old/public/js/wizard.js similarity index 100% rename from webui/public/js/wizard.js rename to webui/old/public/js/wizard.js diff --git a/webui/public/logo_1.png b/webui/old/public/logo_1.png similarity index 100% rename from webui/public/logo_1.png rename to webui/old/public/logo_1.png diff --git a/webui/views/actions.html b/webui/old/views/actions.html similarity index 98% rename from webui/views/actions.html rename to webui/old/views/actions.html index f4e2c33..a87acc7 100644 --- a/webui/views/actions.html +++ b/webui/old/views/actions.html @@ -4,10 +4,10 @@ Actions Playground - {{template "views/partials/header"}} + {{template "old/views/partials/header"}} - {{template "views/partials/menu"}} + {{template "old/views/partials/menu"}}
@@ -97,7 +97,7 @@ }); function fetchActions() { - fetch('/actions') + fetch('/api/actions') .then(response => response.json()) .then(actions => { const select = document.getElementById('action-select'); @@ -173,7 +173,7 @@ `; // Execute the action - fetch(`/action/${actionId}/run`, { + fetch(`/api/action/${actionId}/run`, { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/webui/views/agents.html b/webui/old/views/agents.html similarity index 96% rename from webui/views/agents.html rename to webui/old/views/agents.html index 1781f4a..9eeb66d 100644 --- a/webui/views/agents.html +++ b/webui/old/views/agents.html @@ -4,7 +4,7 @@ Agent List - {{template "views/partials/header"}} + {{template "old/views/partials/header"}} - {{template "views/partials/menu"}} + {{template "old/views/partials/menu"}}
@@ -60,7 +60,7 @@
- + Add New Agent
- Status - Talk @@ -141,7 +141,7 @@ Start {{ end }} - @@ -244,7 +244,7 @@ button.addEventListener('click', function() { const agent = this.getAttribute('data-agent'); const isActive = this.getAttribute('data-active') === 'true'; - const endpoint = isActive ? `/pause/${agent}` : `/start/${agent}`; + const endpoint = isActive ? `/api/agent/${agent}/pause` : `/api/agent/${agent}/start`; // Add animation this.style.animation = 'pulse 0.5s'; diff --git a/webui/views/chat.html b/webui/old/views/chat.html similarity index 95% rename from webui/views/chat.html rename to webui/old/views/chat.html index 92a86f0..fc42b5f 100644 --- a/webui/views/chat.html +++ b/webui/old/views/chat.html @@ -2,7 +2,7 @@ Smart Agent Interface - {{template "views/partials/header"}} + {{template "old/views/partials/header"}} - {{template "views/partials/menu"}} + {{template "old/views/partials/menu"}}
@@ -78,7 +78,7 @@
-
diff --git a/webui/views/create.html b/webui/old/views/create.html similarity index 91% rename from webui/views/create.html rename to webui/old/views/create.html index 95413dc..887fa26 100644 --- a/webui/views/create.html +++ b/webui/old/views/create.html @@ -2,20 +2,20 @@ Create New Agent - {{template "views/partials/header"}} - - - - + {{template "old/views/partials/header"}} + + + + - {{template "views/partials/menu"}} + {{template "old/views/partials/menu"}}

Create New Agent

-
- {{template "views/partials/agent-form" . }} + + {{template "old/views/partials/agent-form" . }}
@@ -69,7 +69,7 @@