From b4c02b59cbbbe9ebc1d42c3642c394e1650496db Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 12 May 2026 09:50:11 -0700 Subject: [PATCH] fix a few examples (#3407) --- examples/nextjs-ai-chats/app/[chatId]/page.tsx | 4 +++- examples/nextjs-ai-popup/app/page.tsx | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/nextjs-ai-chats/app/[chatId]/page.tsx b/examples/nextjs-ai-chats/app/[chatId]/page.tsx index 7e36e7ab3d4..c2aa76e2e89 100644 --- a/examples/nextjs-ai-chats/app/[chatId]/page.tsx +++ b/examples/nextjs-ai-chats/app/[chatId]/page.tsx @@ -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 (
diff --git a/examples/nextjs-ai-popup/app/page.tsx b/examples/nextjs-ai-popup/app/page.tsx index 6964ae9f30e..19c63b848a1 100644 --- a/examples/nextjs-ai-popup/app/page.tsx +++ b/examples/nextjs-ai-popup/app/page.tsx @@ -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 (