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
4 changes: 3 additions & 1 deletion examples/nextjs-ai-chats/app/[chatId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ function ChatTitle({ chatId }: { chatId: string }) {

// Overriding the empty chat state
function Empty({ chatId }: AiChatComponentsEmptyProps) {
const sendMessage = useSendAiMessage(chatId);
const sendMessage = useSendAiMessage(chatId, {
copilotId: process.env.NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID || undefined,
});

return (
<div className="size-full mx-auto max-w-[--inner-app-width] flex items-end pb-[calc(3*var(--lb-spacing))]">
Expand Down
5 changes: 4 additions & 1 deletion examples/nextjs-ai-popup/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ function Chat({ chatId }: { chatId: string }) {
layout="compact"
components={{
Empty: ({ chatId }) => {
const sendMessage = useSendAiMessage(chatId);
const sendMessage = useSendAiMessage(chatId, {
copilotId:
process.env.NEXT_PUBLIC_LIVEBLOCKS_COPILOT_ID || undefined,
});

return (
<div className="p-[--spacing] h-full flex flex-col gap-5 justify-end">
Expand Down
Loading