Skip to content

Commit 6d455e7

Browse files
mxmzbclaude
andcommitted
fix(saas-demo): use CopilotKit provider + REST transport so chat renders
The migration mounted the low-level CopilotKitProvider, which omits the ThreadsProvider that holds the rendered message thread, so the agent ran but the transcript stayed empty. Use the full CopilotKit provider, and set useSingleEndpoint={false} to match the multi-endpoint Hono route (the default single-endpoint transport 404s against it). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 982f9e5 commit 6d455e7

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

examples/showcases/banking/src/app/wrapper.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22
import { LayoutComponent } from "@/components/layout";
33
import {
4-
CopilotKitProvider,
4+
CopilotKit,
55
CopilotPopup,
66
useConfigureSuggestions,
77
} from "@copilotkit/react-core/v2";
@@ -34,9 +34,13 @@ export function CopilotKitWrapper({ children }: { children: React.ReactNode }) {
3434
const { currentUser } = useAuthContext();
3535

3636
return (
37-
<CopilotKitProvider
37+
<CopilotKit
3838
runtimeUrl="/api/copilotkit"
39-
showDevConsole={false}
39+
// The runtime route is the multi-endpoint REST handler
40+
// (createCopilotHonoHandler at api/copilotkit/[[...slug]]: /info,
41+
// /agent/{id}/run, ...). The default single-endpoint transport POSTs to
42+
// /api/copilotkit and 404s against this handler, so opt into REST mode.
43+
useSingleEndpoint={false}
4044
properties={{ userRole: currentUser?.role }}
4145
>
4246
<BankingSuggestions />
@@ -50,6 +54,6 @@ export function CopilotKitWrapper({ children }: { children: React.ReactNode }) {
5054
welcomeMessageText: IDENTITY.greeting,
5155
}}
5256
/>
53-
</CopilotKitProvider>
57+
</CopilotKit>
5458
);
5559
}

0 commit comments

Comments
 (0)