feat(ui): Add React based UI for the vibes at /app

This adds a completely separate frontend based on React because I
found that code gen works better with React once the application gets
bigger. In particular it was getting very hard to move past add
connectors and actions.

The idea is to replace the standard UI with this once it has been
tested. But for now it is available at /app in addition to the
original at /

Signed-off-by: Richard Palethorpe <io@richiejp.com>
This commit is contained in:
Richard Palethorpe
2025-03-24 14:36:18 +00:00
parent 438a65caf6
commit 71e66c651c
61 changed files with 6452 additions and 2 deletions

49
webui/react-ui/src/utils/config.js vendored Normal file
View File

@@ -0,0 +1,49 @@
/**
* Application configuration
*/
// Get the base URL from Vite's environment variables or default to '/app/'
export const BASE_URL = import.meta.env.BASE_URL || '/app/';
// API endpoints configuration
export const API_CONFIG = {
// Base URL for API requests
baseUrl: '/', // API endpoints are at the root, not under /app/
// Default headers for API requests
headers: {
'Content-Type': 'application/json',
},
// Endpoints
endpoints: {
// Agent endpoints
agents: '/api/agents',
agentConfig: (name) => `/api/agent/${name}/config`,
createAgent: '/create',
deleteAgent: (name) => `/delete/${name}`,
pauseAgent: (name) => `/pause/${name}`,
startAgent: (name) => `/start/${name}`,
exportAgent: (name) => `/settings/export/${name}`,
importAgent: '/settings/import',
// Group endpoints
generateGroupProfiles: '/api/agent/group/generateProfiles',
createGroup: '/api/agent/group/create',
// Chat endpoints
chat: (name) => `/chat/${name}`,
notify: (name) => `/notify/${name}`,
responses: '/v1/responses',
// SSE endpoint
sse: (name) => `/sse/${name}`,
// Action endpoints
listActions: '/actions',
executeAction: (name) => `/action/${name}/run`,
// Status endpoint
status: (name) => `/status/${name}`,
}
};