fix(ui): Re-add Chat

This commit is contained in:
Richard Palethorpe
2025-03-27 21:23:17 +00:00
parent c96c8d8009
commit 45078e1fa7
7 changed files with 393 additions and 104 deletions

View File

@@ -177,9 +177,9 @@ export const agentApi = {
// Chat-related API calls
export const chatApi = {
// Send a chat message to an agent
// Send a message to an agent using the JSON-based API
sendMessage: async (name, message) => {
const response = await fetch(buildUrl(API_CONFIG.endpoints.chat(name)), {
const response = await fetch(buildUrl(API_CONFIG.endpoints.chatApi(name)), {
method: 'POST',
headers: API_CONFIG.headers,
body: JSON.stringify({ message }),

View File

@@ -34,6 +34,7 @@ export const API_CONFIG = {
// Chat endpoints
chat: (name) => `/chat/${name}`,
chatApi: (name) => `/api/chat/${name}`,
notify: (name) => `/notify/${name}`,
responses: '/v1/responses',