diff --git a/.env.example b/.env.example index ca400ee..d65d729 100644 --- a/.env.example +++ b/.env.example @@ -6,10 +6,8 @@ SITE_URL=http://localhost:5173 NATIVE_APP_URL=code:// # Browser and native public endpoints +VITE_AUTH_URL=http://localhost:5173 VITE_CONVEX_URL=https://example.convex.cloud -VITE_CONVEX_SITE_URL=https://example.convex.site -# For phone testing, replace localhost with this machine's Tailscale IPv4 address. -VITE_FLUE_URL=http://localhost:3583 EXPO_PUBLIC_CONVEX_URL=https://example.convex.cloud EXPO_PUBLIC_CONVEX_SITE_URL=https://example.convex.site @@ -23,6 +21,7 @@ DAEMON_COMMAND_LEASE_MS=60000 # Flue persistence adapter FLUE_DB_TOKEN=replace-with-a-long-random-token +FLUE_URL=http://localhost:3583 # Agent model provider AGENT_MODEL_PROVIDER=xiaomi diff --git a/apps/web/package.json b/apps/web/package.json index bc779f4..67dc49e 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -15,8 +15,6 @@ "@code/env": "workspace:*", "@code/primitives": "workspace:*", "@code/ui": "workspace:*", - "@flue/react": "1.0.0-beta.9", - "@flue/sdk": "1.0.0-beta.9", "@react-router/fs-routes": "^8.1.0", "@react-router/node": "^8.1.0", "@react-router/serve": "^8.1.0", @@ -24,8 +22,8 @@ "isbot": "^5.1.44", "lucide-react": "catalog:", "next-themes": "catalog:", - "react": "^19.2.7", - "react-dom": "^19.2.7", + "react": "catalog:", + "react-dom": "catalog:", "react-router": "^8.1.0", "sonner": "catalog:", "streamdown": "2.5.0" diff --git a/apps/web/react-router.config.ts b/apps/web/react-router.config.ts index 4539207..72df924 100644 --- a/apps/web/react-router.config.ts +++ b/apps/web/react-router.config.ts @@ -1,7 +1,7 @@ import type { Config } from "@react-router/dev/config"; export default { - // Desktop addons package static web assets; SSR output cannot be bundled - ssr: false, appDirectory: "src", + + ssr: true, } satisfies Config; diff --git a/apps/web/src/components/chat/chat-attachments.tsx b/apps/web/src/components/chat/chat-attachments.tsx index df8b2a0..208e610 100644 --- a/apps/web/src/components/chat/chat-attachments.tsx +++ b/apps/web/src/components/chat/chat-attachments.tsx @@ -9,13 +9,13 @@ import { AttachmentMedia, AttachmentTitle, } from "@code/ui/components/attachment"; -import type { FlueConversationPart } from "@flue/react"; import { ImageIcon, X } from "lucide-react"; import { useEffect, useState } from "react"; import type { PendingChatImage } from "@/lib/chat/attachments"; +import type { ConversationPart } from "@/lib/chat/types"; -type FilePart = Extract; +type FilePart = Extract; const isDirectlyRenderableUrl = (url: string): boolean => url.startsWith("blob:") || url.startsWith("data:"); diff --git a/apps/web/src/components/chat/chat-message.tsx b/apps/web/src/components/chat/chat-message.tsx index e487e69..647d3c7 100644 --- a/apps/web/src/components/chat/chat-message.tsx +++ b/apps/web/src/components/chat/chat-message.tsx @@ -7,12 +7,10 @@ import { MobileChatBubble, MobileChatMessage, } from "@code/ui/components/mobile-chat"; -import type { FlueConversationMessage } from "@flue/react"; import { getMessageText, getReasoningText, - hasToolActivity, isReasoningStreaming, isMessageStreaming, } from "@/lib/chat/transforms"; @@ -23,7 +21,6 @@ import type { import { AssistantIdentity } from "./assistant-identity"; import { MessageAttachments } from "./chat-attachments"; -import { ChatToolCall } from "./chat-tool-call"; const ReasoningTrace = ({ isStreaming, @@ -96,27 +93,7 @@ const assistantState = ( return isStreaming ? "writing" : undefined; }; -const ToolActivity = ({ - hidden, - message, -}: { - readonly hidden: boolean; - readonly message: FlueConversationMessage; -}) => { - if (hidden) { - return null; - } - return message.parts.map((part) => - part.type === "dynamic-tool" ? ( - - ) : null - ); -}; - -export const ChatMessage = ({ - hideToolActivity = false, - message, -}: ChatMessageProps) => { +export const ChatMessage = ({ message }: ChatMessageProps) => { const isUser = message.role === "user"; const isStreaming = isMessageStreaming(message); const text = getMessageText(message); @@ -124,16 +101,6 @@ export const ChatMessage = ({ const reasoningStreaming = isReasoningStreaming(message); const fileParts = message.parts.filter((part) => part.type === "file"); - if ( - hideToolActivity && - !isUser && - hasToolActivity(message) && - !text && - !reasoning - ) { - return null; - } - if (message.parts.length === 0 && !isStreaming) { return null; } @@ -167,7 +134,6 @@ export const ChatMessage = ({ text={reasoning} /> )} -