Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/white-label-minimal/components/Chat.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { useEffect, useState } from "react";
import { useBase44Chat, type Base44Chat, type Base44ChatBackend, type ChatItem, type ChatStep } from "@base44/platform/react";
import { useChat, type UseChatResult, type ChatBackend, type ChatItem, type ChatStep } from "@base44/platform/react";
import { Button } from "@/components/ui/button";
import { Textarea } from "@/components/ui/textarea";
import Markdown from "react-markdown";
Expand All @@ -9,14 +9,14 @@ import { createApp, openLiveSession, sendMessage, submitToolCallInput, type App
import ToolQuestion from "./ToolQuestion";

// The four Base44 calls, run on the server. The hook calls them, so the browser never holds a key.
const backend: Base44ChatBackend = { createApp, openLiveSession, sendMessage, submitToolCallInput };
const backend: ChatBackend = { createApp, openLiveSession, sendMessage, submitToolCallInput };

export default function Chat({ app, onAppCreated, onBuildingChange }: {
app: App | null;
onAppCreated: (app: App) => void;
onBuildingChange: (building: boolean) => void;
}) {
const chat = useBase44Chat({ appId: app?.id ?? null, backend, onAppCreated });
const chat = useChat({ appId: app?.id ?? null, backend, onAppCreated });
const [prompt, setPrompt] = useState("");
const building = chat.status === "building";
// Send only when the AI can take a prompt now. After a failed build, a prompt can ask for the fix.
Expand Down Expand Up @@ -99,7 +99,7 @@ function stepIcon(step: ChatStep) {
}

// Tiny's wording for what the hook reports.
function StatusLine({ chat, hasApp }: { chat: Base44Chat; hasApp: boolean }) {
function StatusLine({ chat, hasApp }: { chat: UseChatResult; hasApp: boolean }) {
let text = "";
if (chat.error) text = chat.error.message;
else if (chat.status === "submitted") text = hasApp ? "Sending…" : "Creating app…";
Expand Down
2 changes: 1 addition & 1 deletion examples/white-label-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"typecheck": "next typegen && tsc --noEmit"
},
"dependencies": {
"@base44/platform": "^0.4.0",
"@base44/platform": "^0.5.0",
"class-variance-authority": "^0.7.1",
"cn": "^0.4.0",
"lucide-react": "^0.475.0",
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"minimal:typecheck": "npm run typecheck --workspace @base44/white-label-minimal"
},
"dependencies": {
"@base44/platform": "^0.4.0",
"@base44/platform": "^0.5.0",
"@hello-pangea/dnd": "^18.0.1",
"@prisma/client": "^6.19.3",
"@radix-ui/react-checkbox": "^1.1.4",
Expand Down