@elizaos/client 1.5.5-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +350 -0
  3. package/dist/assets/empty-module-CLMscLYw.js +1 -0
  4. package/dist/assets/main-BBZ_3lkn.css +5999 -0
  5. package/dist/assets/main-C5zNUkXH.js +7 -0
  6. package/dist/assets/main-Dz64ENQg.js +614 -0
  7. package/dist/assets/react-vendor-DM5m98rr.js +545 -0
  8. package/dist/assets/ui-vendor-BQCqNqg0.js +1 -0
  9. package/dist/elizaos-avatar.png +0 -0
  10. package/dist/elizaos-icon.png +0 -0
  11. package/dist/elizaos-logo-light.png +0 -0
  12. package/dist/elizaos.webp +0 -0
  13. package/dist/favicon.ico +0 -0
  14. package/dist/images/agents/agent1.png +0 -0
  15. package/dist/images/agents/agent2.png +0 -0
  16. package/dist/images/agents/agent3.png +0 -0
  17. package/dist/images/agents/agent4.png +0 -0
  18. package/dist/images/agents/agent5.png +0 -0
  19. package/dist/index.html +14 -0
  20. package/index.html +24 -0
  21. package/package.json +159 -0
  22. package/postcss.config.js +3 -0
  23. package/public/elizaos-avatar.png +0 -0
  24. package/public/elizaos-icon.png +0 -0
  25. package/public/elizaos-logo-light.png +0 -0
  26. package/public/elizaos.webp +0 -0
  27. package/public/favicon.ico +0 -0
  28. package/public/images/agents/agent1.png +0 -0
  29. package/public/images/agents/agent2.png +0 -0
  30. package/public/images/agents/agent3.png +0 -0
  31. package/public/images/agents/agent4.png +0 -0
  32. package/public/images/agents/agent5.png +0 -0
  33. package/src/App.tsx +222 -0
  34. package/src/components/AgentDetailsPanel.tsx +147 -0
  35. package/src/components/ChatInputArea.tsx +196 -0
  36. package/src/components/ChatMessageListComponent.tsx +139 -0
  37. package/src/components/actionTool.tsx +186 -0
  38. package/src/components/add-agent-card.tsx +77 -0
  39. package/src/components/agent-action-viewer.tsx +816 -0
  40. package/src/components/agent-avatar-stack.tsx +121 -0
  41. package/src/components/agent-card.cy.tsx +259 -0
  42. package/src/components/agent-card.tsx +177 -0
  43. package/src/components/agent-creator.tsx +142 -0
  44. package/src/components/agent-log-viewer.tsx +645 -0
  45. package/src/components/agent-memory-edit-overlay.tsx +461 -0
  46. package/src/components/agent-memory-viewer.tsx +504 -0
  47. package/src/components/agent-settings.tsx +270 -0
  48. package/src/components/agent-sidebar.tsx +178 -0
  49. package/src/components/api-key-dialog.tsx +113 -0
  50. package/src/components/app-sidebar.tsx +685 -0
  51. package/src/components/array-input.tsx +116 -0
  52. package/src/components/audio-recorder.tsx +292 -0
  53. package/src/components/avatar-panel.tsx +141 -0
  54. package/src/components/character-form.tsx +1138 -0
  55. package/src/components/chat.tsx +1813 -0
  56. package/src/components/combobox.tsx +187 -0
  57. package/src/components/confirmation-dialog.tsx +59 -0
  58. package/src/components/connection-error-banner.tsx +101 -0
  59. package/src/components/connection-status.cy.tsx +73 -0
  60. package/src/components/connection-status.tsx +155 -0
  61. package/src/components/copy-button.tsx +35 -0
  62. package/src/components/delete-button.tsx +24 -0
  63. package/src/components/env-settings.tsx +261 -0
  64. package/src/components/group-card.tsx +160 -0
  65. package/src/components/group-panel.tsx +543 -0
  66. package/src/components/input-copy.tsx +21 -0
  67. package/src/components/logs-page.tsx +41 -0
  68. package/src/components/media-content.tsx +385 -0
  69. package/src/components/memory-graph.tsx +170 -0
  70. package/src/components/missing-secrets-dialog.tsx +72 -0
  71. package/src/components/onboarding-tour.tsx +247 -0
  72. package/src/components/page-title.tsx +8 -0
  73. package/src/components/plugins-panel.tsx +383 -0
  74. package/src/components/profile-card.tsx +66 -0
  75. package/src/components/profile-overlay.tsx +283 -0
  76. package/src/components/retry-button.tsx +28 -0
  77. package/src/components/secret-panel.tsx +1505 -0
  78. package/src/components/server-management.tsx +264 -0
  79. package/src/components/split-button.tsx +148 -0
  80. package/src/components/stop-agent-button.tsx +99 -0
  81. package/src/components/ui/alert-dialog.cy.tsx +333 -0
  82. package/src/components/ui/alert-dialog.tsx +115 -0
  83. package/src/components/ui/alert.tsx +49 -0
  84. package/src/components/ui/avatar.cy.tsx +180 -0
  85. package/src/components/ui/avatar.tsx +57 -0
  86. package/src/components/ui/badge.cy.tsx +146 -0
  87. package/src/components/ui/badge.tsx +43 -0
  88. package/src/components/ui/button.cy.tsx +177 -0
  89. package/src/components/ui/button.tsx +56 -0
  90. package/src/components/ui/card.cy.tsx +160 -0
  91. package/src/components/ui/card.tsx +73 -0
  92. package/src/components/ui/chat/animated-markdown.tsx +59 -0
  93. package/src/components/ui/chat/chat-bubble.tsx +178 -0
  94. package/src/components/ui/chat/chat-container.tsx +51 -0
  95. package/src/components/ui/chat/chat-input.cy.tsx +169 -0
  96. package/src/components/ui/chat/chat-input.tsx +47 -0
  97. package/src/components/ui/chat/chat-message-list.tsx +61 -0
  98. package/src/components/ui/chat/chat-tts-button.tsx +199 -0
  99. package/src/components/ui/chat/code-block.tsx +79 -0
  100. package/src/components/ui/chat/expandable-chat.tsx +131 -0
  101. package/src/components/ui/chat/hooks/useAutoScroll.ts +86 -0
  102. package/src/components/ui/chat/markdown.tsx +209 -0
  103. package/src/components/ui/chat/message-loading.tsx +48 -0
  104. package/src/components/ui/checkbox.cy.tsx +170 -0
  105. package/src/components/ui/checkbox.tsx +30 -0
  106. package/src/components/ui/collapsible.cy.tsx +283 -0
  107. package/src/components/ui/collapsible.tsx +9 -0
  108. package/src/components/ui/command.cy.tsx +313 -0
  109. package/src/components/ui/command.tsx +143 -0
  110. package/src/components/ui/dialog.cy.tsx +279 -0
  111. package/src/components/ui/dialog.tsx +104 -0
  112. package/src/components/ui/dropdown-menu.cy.tsx +273 -0
  113. package/src/components/ui/dropdown-menu.tsx +281 -0
  114. package/src/components/ui/input.cy.tsx +82 -0
  115. package/src/components/ui/input.tsx +27 -0
  116. package/src/components/ui/label.cy.tsx +157 -0
  117. package/src/components/ui/label.tsx +19 -0
  118. package/src/components/ui/resizable.tsx +42 -0
  119. package/src/components/ui/scroll-area.cy.tsx +242 -0
  120. package/src/components/ui/scroll-area.tsx +46 -0
  121. package/src/components/ui/select.cy.tsx +277 -0
  122. package/src/components/ui/select.tsx +155 -0
  123. package/src/components/ui/separator.cy.tsx +145 -0
  124. package/src/components/ui/separator.tsx +29 -0
  125. package/src/components/ui/sheet.cy.tsx +324 -0
  126. package/src/components/ui/sheet.tsx +119 -0
  127. package/src/components/ui/sidebar.tsx +734 -0
  128. package/src/components/ui/skeleton.cy.tsx +149 -0
  129. package/src/components/ui/skeleton.tsx +17 -0
  130. package/src/components/ui/split-button.cy.tsx +274 -0
  131. package/src/components/ui/split-button.tsx +112 -0
  132. package/src/components/ui/switch.tsx +28 -0
  133. package/src/components/ui/tabs.cy.tsx +271 -0
  134. package/src/components/ui/tabs.tsx +53 -0
  135. package/src/components/ui/textarea.cy.tsx +136 -0
  136. package/src/components/ui/textarea.tsx +26 -0
  137. package/src/components/ui/toast.cy.tsx +209 -0
  138. package/src/components/ui/toast.tsx +126 -0
  139. package/src/components/ui/toaster.tsx +29 -0
  140. package/src/components/ui/tooltip.cy.tsx +244 -0
  141. package/src/components/ui/tooltip.tsx +30 -0
  142. package/src/config/agent-templates.ts +349 -0
  143. package/src/config/voice-models.ts +181 -0
  144. package/src/constants.ts +23 -0
  145. package/src/context/AuthContext.tsx +44 -0
  146. package/src/context/ConnectionContext.tsx +194 -0
  147. package/src/entry.tsx +9 -0
  148. package/src/hooks/__tests__/use-agent-tab-state.test.ts +137 -0
  149. package/src/hooks/__tests__/use-agent-update.test.tsx +250 -0
  150. package/src/hooks/__tests__/use-character-convert.test.ts +102 -0
  151. package/src/hooks/__tests__/use-panel-width-state.test.ts +243 -0
  152. package/src/hooks/__tests__/use-sidebar-state.test.ts +117 -0
  153. package/src/hooks/use-agent-management.ts +130 -0
  154. package/src/hooks/use-agent-tab-state.ts +74 -0
  155. package/src/hooks/use-agent-update.ts +469 -0
  156. package/src/hooks/use-character-convert.ts +138 -0
  157. package/src/hooks/use-confirmation.ts +55 -0
  158. package/src/hooks/use-delete-agent.ts +123 -0
  159. package/src/hooks/use-dm-channels.ts +198 -0
  160. package/src/hooks/use-elevenlabs-voices.ts +83 -0
  161. package/src/hooks/use-file-upload.ts +224 -0
  162. package/src/hooks/use-mobile.tsx +19 -0
  163. package/src/hooks/use-onboarding.tsx +49 -0
  164. package/src/hooks/use-panel-width-state.ts +147 -0
  165. package/src/hooks/use-partial-update.ts +288 -0
  166. package/src/hooks/use-plugin-details.ts +462 -0
  167. package/src/hooks/use-plugins.ts +119 -0
  168. package/src/hooks/use-query-hooks.ts +1263 -0
  169. package/src/hooks/use-server-agents.ts +62 -0
  170. package/src/hooks/use-server-version.tsx +47 -0
  171. package/src/hooks/use-sidebar-state.ts +50 -0
  172. package/src/hooks/use-socket-chat.ts +264 -0
  173. package/src/hooks/use-toast.ts +260 -0
  174. package/src/hooks/use-version.tsx +64 -0
  175. package/src/index.css +146 -0
  176. package/src/lib/api-client-config.ts +53 -0
  177. package/src/lib/api-type-mappers.ts +196 -0
  178. package/src/lib/export-utils.ts +123 -0
  179. package/src/lib/logger.ts +19 -0
  180. package/src/lib/media-utils.ts +170 -0
  181. package/src/lib/pca.test.ts +17 -0
  182. package/src/lib/pca.ts +52 -0
  183. package/src/lib/socketio-manager.ts +664 -0
  184. package/src/lib/utils.ts +168 -0
  185. package/src/main.tsx +16 -0
  186. package/src/mocks/empty-module.ts +12 -0
  187. package/src/mocks/node-module.ts +57 -0
  188. package/src/polyfills.ts +37 -0
  189. package/src/routes/agent-detail.tsx +30 -0
  190. package/src/routes/agent-list.tsx +27 -0
  191. package/src/routes/agent-settings.tsx +48 -0
  192. package/src/routes/character-detail.tsx +52 -0
  193. package/src/routes/character-form.tsx +79 -0
  194. package/src/routes/character-list.tsx +38 -0
  195. package/src/routes/chat.tsx +128 -0
  196. package/src/routes/createAgent.tsx +13 -0
  197. package/src/routes/group-new.tsx +50 -0
  198. package/src/routes/group.tsx +29 -0
  199. package/src/routes/home.tsx +218 -0
  200. package/src/routes/not-found.tsx +71 -0
  201. package/src/test/setup.ts +154 -0
  202. package/src/types/crypto-browserify.d.ts +4 -0
  203. package/src/types/index.ts +13 -0
  204. package/src/types/rooms.ts +8 -0
  205. package/src/types.ts +84 -0
  206. package/src/vite-env.d.ts +40 -0
  207. package/tailwind.config.ts +90 -0
  208. package/tsconfig.json +10 -0
  209. package/vite.config.ts +102 -0
@@ -0,0 +1,8 @@
1
+ import { ChannelType, type UUID } from '@elizaos/core';
2
+
3
+ export interface Room {
4
+ id: string;
5
+ name: string;
6
+ type: ChannelType;
7
+ entities: { id: string; agentId?: string }[];
8
+ }
package/src/types.ts ADDED
@@ -0,0 +1,84 @@
1
+ // Update the IAttachment interface
2
+
3
+ import { Agent, UUID } from '@elizaos/core';
4
+ import type {
5
+ Agent as CoreAgent,
6
+ Character as CoreCharacter,
7
+ Room as CoreRoom,
8
+ AgentStatus as CoreAgentStatus,
9
+ ChannelType as CoreChannelType,
10
+ } from '@elizaos/core';
11
+ import type { ServerMetadata, ChannelMetadata, MessageMetadata } from '@elizaos/api-client';
12
+
13
+ /**
14
+ * Interface representing an attachment.
15
+ * @interface
16
+ * @property {string} url - The URL of the attachment.
17
+ * @property {string} [contentType] - The content type of the attachment, optional.
18
+ * @property {string} title - The title of the attachment.
19
+ */
20
+ export interface IAttachment {
21
+ url: string;
22
+ contentType?: string; // Make contentType optional
23
+ title: string;
24
+ }
25
+
26
+ // Agent type for client-side display, extending core Agent with a string status for UI flexibility if needed,
27
+ // but ideally aligns with CoreAgentStatus enum.
28
+ export interface AgentWithStatus extends Partial<CoreAgent> {
29
+ id: UUID;
30
+ name: string;
31
+ characterName?: string; // From core Agent, which extends Character
32
+ bio?: string | string[];
33
+ status: CoreAgentStatus; // Use the enum from @elizaos/core
34
+ settings?: CoreCharacter['settings']; // From core Character
35
+ // any other client-specific properties
36
+ }
37
+
38
+ // Interface for agent panels (public routes)
39
+ export interface AgentPanel {
40
+ name: string;
41
+ path: string;
42
+ }
43
+
44
+ // Represents a server/guild in the central messaging system for the client
45
+ export interface MessageServer {
46
+ id: UUID; // Global serverId
47
+ name: string;
48
+ sourceType: string;
49
+ sourceId?: string;
50
+ metadata?: ServerMetadata;
51
+ createdAt: string; // ISO Date string from server, or Date object
52
+ updatedAt: string; // ISO Date string from server, or Date object
53
+ }
54
+
55
+ // Represents a channel within a MessageServer for the client
56
+ export interface MessageChannel {
57
+ id: UUID; // Global channelId
58
+ messageServerId: UUID;
59
+ name: string;
60
+ type: CoreChannelType; // Using the enum from @elizaos/core
61
+ sourceType?: string;
62
+ sourceId?: string;
63
+ topic?: string;
64
+ metadata?: ChannelMetadata;
65
+ createdAt: string; // ISO Date string from server, or Date object
66
+ updatedAt: string; // ISO Date string from server, or Date object
67
+ }
68
+
69
+ // Represents a message from the central system for client display
70
+ // This should align with what apiClient.getChannelMessages returns for each message
71
+ export interface ServerMessage {
72
+ id: UUID;
73
+ channelId: UUID;
74
+ serverId?: UUID; // Optional: May be added during client-side processing or be in metadata
75
+ authorId: UUID;
76
+ authorDisplayName?: string; // Optional: May be in metadata or fetched separately
77
+ content: string;
78
+ createdAt: number; // Expecting timestamp MS for UI sorting/display
79
+ rawMessage?: unknown;
80
+ inReplyToRootMessageId?: UUID;
81
+ sourceType?: string;
82
+ sourceId?: string;
83
+ metadata?: MessageMetadata;
84
+ }
@@ -0,0 +1,40 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module '*.svg' {
4
+ import React = require('react');
5
+ export const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
6
+ const src: string;
7
+ export default src;
8
+ }
9
+
10
+ declare module '*.jpg' {
11
+ const content: string;
12
+ export default content;
13
+ }
14
+
15
+ declare module '*.png' {
16
+ const content: string;
17
+ export default content;
18
+ }
19
+
20
+ declare module '*.json' {
21
+ const content: string;
22
+ export default content;
23
+ }
24
+
25
+ interface ImportMetaEnv {
26
+ readonly VITE_SERVER_PORT: string;
27
+ // Add other env variables as needed
28
+ }
29
+
30
+ interface ImportMeta {
31
+ readonly env: ImportMetaEnv;
32
+ }
33
+
34
+ // Ensure global types
35
+ declare global {
36
+ interface Window {
37
+ global: typeof globalThis;
38
+ Buffer: typeof Buffer;
39
+ }
40
+ }
@@ -0,0 +1,90 @@
1
+ import type { Config } from 'tailwindcss';
2
+ import tailwindAnimate from 'tailwindcss-animate';
3
+
4
+ export default {
5
+ darkMode: ['class'],
6
+ content: ['src/**/*.{ts,tsx}', 'components/**/*.{ts,tsx}'],
7
+ theme: {
8
+ extend: {
9
+ fontFamily: {
10
+ sans: [
11
+ 'Inter',
12
+ 'ui-sans-serif',
13
+ 'system-ui',
14
+ 'sans-serif',
15
+ 'Apple Color Emoji',
16
+ 'Segoe UI Emoji',
17
+ 'Segoe UI Symbol',
18
+ 'Noto Color Emoji',
19
+ ],
20
+ },
21
+ keyframes: {
22
+ 'bounce-sm': {
23
+ '0%, 100%': { transform: 'translateY(0)' },
24
+ '50%': { transform: 'translateY(-4px)' },
25
+ },
26
+ },
27
+ animation: {
28
+ 'bounce-sm': 'bounce-sm 0.6s ease-in-out 2',
29
+ },
30
+ borderRadius: {
31
+ lg: 'var(--radius)',
32
+ md: 'calc(var(--radius) - 2px)',
33
+ sm: 'calc(var(--radius) - 4px)',
34
+ },
35
+ colors: {
36
+ background: 'hsl(var(--background))',
37
+ foreground: 'hsl(var(--foreground))',
38
+ card: {
39
+ DEFAULT: 'hsl(var(--card))',
40
+ foreground: 'hsl(var(--card-foreground))',
41
+ },
42
+ popover: {
43
+ DEFAULT: 'hsl(var(--popover))',
44
+ foreground: 'hsl(var(--popover-foreground))',
45
+ },
46
+ primary: {
47
+ DEFAULT: 'hsl(var(--primary))',
48
+ foreground: 'hsl(var(--primary-foreground))',
49
+ },
50
+ secondary: {
51
+ DEFAULT: 'hsl(var(--secondary))',
52
+ foreground: 'hsl(var(--secondary-foreground))',
53
+ },
54
+ muted: {
55
+ DEFAULT: 'hsl(var(--muted))',
56
+ foreground: 'hsl(var(--muted-foreground))',
57
+ },
58
+ accent: {
59
+ DEFAULT: 'hsl(var(--accent))',
60
+ foreground: 'hsl(var(--accent-foreground))',
61
+ },
62
+ destructive: {
63
+ DEFAULT: 'hsl(var(--destructive))',
64
+ foreground: 'hsl(var(--destructive-foreground))',
65
+ },
66
+ border: 'hsl(var(--border))',
67
+ input: 'hsl(var(--input))',
68
+ ring: 'hsl(var(--ring))',
69
+ chart: {
70
+ '1': 'hsl(var(--chart-1))',
71
+ '2': 'hsl(var(--chart-2))',
72
+ '3': 'hsl(var(--chart-3))',
73
+ '4': 'hsl(var(--chart-4))',
74
+ '5': 'hsl(var(--chart-5))',
75
+ },
76
+ sidebar: {
77
+ DEFAULT: 'hsl(var(--sidebar-background))',
78
+ foreground: 'hsl(var(--sidebar-foreground))',
79
+ primary: 'hsl(var(--sidebar-primary))',
80
+ 'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
81
+ accent: 'hsl(var(--sidebar-accent))',
82
+ 'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
83
+ border: 'hsl(var(--sidebar-border))',
84
+ ring: 'hsl(var(--sidebar-ring))',
85
+ },
86
+ },
87
+ },
88
+ },
89
+ plugins: [tailwindAnimate],
90
+ } satisfies Config;
package/tsconfig.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "paths": {
5
+ "@/*": ["./src/*"]
6
+ }
7
+ },
8
+ "files": [],
9
+ "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }]
10
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,102 @@
1
+ import { defineConfig, type PluginOption } from 'vite';
2
+ import react from '@vitejs/plugin-react-swc';
3
+ import path from 'node:path';
4
+ // @ts-ignore
5
+ import tailwindcss from '@tailwindcss/vite';
6
+
7
+ // https://vite.dev/config/
8
+ export default defineConfig(({ mode, command }) => {
9
+ const isDev = mode === 'development';
10
+ const isBuild = command === 'build';
11
+
12
+ return {
13
+ plugins: [tailwindcss() as unknown as PluginOption, react() as unknown as PluginOption],
14
+ server: {
15
+ port: 5173,
16
+ strictPort: true,
17
+ host: true,
18
+ // Reduce watcher pressure to avoid EMFILE on large workspaces
19
+ watch: {
20
+ ignored: [
21
+ '**/node_modules/**',
22
+ '**/.git/**',
23
+ '**/.turbo/**',
24
+ '**/dist/**',
25
+ '**/coverage/**',
26
+ 'cypress/screenshots/**',
27
+ 'cypress/videos/**',
28
+ ],
29
+ usePolling: true,
30
+ interval: 150,
31
+ },
32
+ proxy: {
33
+ '/api': 'http://localhost:3000',
34
+ '/socket.io': {
35
+ target: 'http://localhost:3000',
36
+ ws: true,
37
+ },
38
+ },
39
+ },
40
+ resolve: {
41
+ alias: {
42
+ '@': path.resolve(__dirname, './src'),
43
+ // In dev mode, use source. In build/production, let Node resolution handle it
44
+ ...(isDev
45
+ ? {
46
+ '@elizaos/core': path.resolve(__dirname, '../core/src/index.ts'),
47
+ }
48
+ : {}),
49
+ // Prevent node Sentry code from entering the browser bundle
50
+ '@sentry/node': path.resolve(__dirname, './src/mocks/empty-module.ts'),
51
+ '@sentry/node-core': path.resolve(__dirname, './src/mocks/empty-module.ts'),
52
+ },
53
+ },
54
+ optimizeDeps: {
55
+ esbuildOptions: {
56
+ define: {
57
+ global: 'globalThis',
58
+ },
59
+ },
60
+ entries: ['./src/entry.tsx'],
61
+ include: ['buffer', 'process', '@elizaos/core', '@elizaos/api-client'],
62
+ },
63
+ build: {
64
+ target: 'esnext',
65
+ sourcemap: false,
66
+ reportCompressedSize: false,
67
+ minify: 'esbuild',
68
+ chunkSizeWarningLimit: 2200, // Increase chunk size warning limit to accommodate large chunks
69
+ cssMinify: false, // Disable CSS minification to avoid :is() syntax errors in webkit scrollbar styles
70
+ rollupOptions: {
71
+ input: {
72
+ main: path.resolve(__dirname, 'index.html'),
73
+ },
74
+ output: {
75
+ manualChunks: (id) => {
76
+ if (id.includes('node_modules')) {
77
+ if (id.includes('react') || id.includes('react-dom') || id.includes('react-router')) {
78
+ return 'react-vendor';
79
+ }
80
+ if (id.includes('@radix-ui')) {
81
+ return 'ui-vendor';
82
+ }
83
+ if (id.includes('@elizaos')) {
84
+ return 'elizaos-vendor';
85
+ }
86
+ }
87
+ },
88
+ },
89
+ },
90
+ commonjsOptions: {
91
+ transformMixedEsModules: true,
92
+ ignoreTryCatch: false,
93
+ },
94
+ },
95
+ define: {
96
+ // Define globals for browser compatibility
97
+ 'process.env': JSON.stringify({}),
98
+ 'process.browser': true,
99
+ global: 'globalThis',
100
+ },
101
+ };
102
+ });