Skip to content

Commit 7788ee8

Browse files
committed
Strip chat-ui to bundled-only: no public component exports
- Remove all chat-ui/simple exports and source (from p4) - Remove chat-ui library export, build scripts (build:client-lib, build:chat-ui-simple) - Remove library build configs (vite.lib.config.ts, tsconfig.lib.json, tailwind config) - Move UI source back to client/src/ (no longer needed outside client bundle) - Remove all React/UI peer deps and library-only dependencies - Revert @/ alias and tsconfig paths to client-local ./src - Simplify tsdown.config.ts to single server-only config - Exclude src/chat-ui from main tsconfig (server-only type checking) - Keep bundled UI app in dist/chat-client/ for chat.staticAssetsPath
1 parent e95b4ac commit 7788ee8

131 files changed

Lines changed: 100 additions & 5148 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

integrations/appkit-agent/src/chat-ui/components/ChatApp.tsx renamed to integrations/appkit-agent/client/src/components/ChatApp.tsx

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { BrowserRouter, Routes, Route, useNavigate, useParams, useLocation } from 'react-router-dom';
2-
import { useState, useEffect, type ReactNode } from 'react';
2+
import { useState, useEffect } from 'react';
33
import { Toaster } from 'sonner';
4-
import { ThemeProvider, useTheme as useNextTheme } from 'next-themes';
5-
import { ThemeContextProvider } from '@/contexts/ThemeContext';
64

75
const LIGHT_THEME_COLOR = 'hsl(0 0% 100%)';
86
const DARK_THEME_COLOR = 'hsl(240deg 10% 3.92%)';
@@ -46,28 +44,15 @@ export interface ChatAppProps extends Omit<ChatProviderProps, 'children'> {
4644
* sidebar, routing, and the complete chat experience. Renders a standalone
4745
* SPA that can be mounted into any container.
4846
*/
49-
function NextThemesBridge({ children }: { children: ReactNode }) {
50-
const { theme, resolvedTheme, setTheme } = useNextTheme();
51-
return (
52-
<ThemeContextProvider value={{ theme: theme ?? 'system', resolvedTheme: resolvedTheme ?? 'light', setTheme }}>
53-
{children}
54-
</ThemeContextProvider>
55-
);
56-
}
57-
5847
export function ChatApp({
5948
basePath = '/',
6049
...providerProps
6150
}: ChatAppProps) {
6251
return (
6352
<BrowserRouter basename={basePath}>
6453
<ChatProvider basePath={basePath} {...providerProps}>
65-
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
66-
<NextThemesBridge>
67-
<Toaster position="top-center" />
68-
<ChatAppLayout />
69-
</NextThemesBridge>
70-
</ThemeProvider>
54+
<Toaster position="top-center" />
55+
<ChatAppLayout />
7156
</ChatProvider>
7257
</BrowserRouter>
7358
);

integrations/appkit-agent/src/chat-ui/components/ChatComposer.tsx renamed to integrations/appkit-agent/client/src/components/ChatComposer.tsx

File renamed without changes.

integrations/appkit-agent/src/chat-ui/components/ChatPanel.tsx renamed to integrations/appkit-agent/client/src/components/ChatPanel.tsx

File renamed without changes.

integrations/appkit-agent/src/chat-ui/components/ChatSidebar.tsx renamed to integrations/appkit-agent/client/src/components/ChatSidebar.tsx

File renamed without changes.

integrations/appkit-agent/src/chat-ui/components/ChatSidebarItem.tsx renamed to integrations/appkit-agent/client/src/components/ChatSidebarItem.tsx

File renamed without changes.

integrations/appkit-agent/src/chat-ui/components/DatabricksLogo.tsx renamed to integrations/appkit-agent/client/src/components/DatabricksLogo.tsx

File renamed without changes.

integrations/appkit-agent/src/chat-ui/components/animation-assistant-icon.tsx renamed to integrations/appkit-agent/client/src/components/animation-assistant-icon.tsx

File renamed without changes.

integrations/appkit-agent/src/chat-ui/components/app-sidebar.tsx renamed to integrations/appkit-agent/client/src/components/app-sidebar.tsx

File renamed without changes.

integrations/appkit-agent/src/chat-ui/components/chat-header.tsx renamed to integrations/appkit-agent/client/src/components/chat-header.tsx

File renamed without changes.

integrations/appkit-agent/src/chat-ui/components/chat.tsx renamed to integrations/appkit-agent/client/src/components/chat.tsx

File renamed without changes.

0 commit comments

Comments
 (0)