forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchat.tsx
More file actions
23 lines (19 loc) · 634 Bytes
/
Copy pathchat.tsx
File metadata and controls
23 lines (19 loc) · 634 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"use client";
import type { CopilotChatAssistantMessage } from "@copilotkit/react-core/v2";
import { CopilotChat } from "@copilotkit/react-core/v2";
import { JsonRenderAssistantMessage } from "./json-render-renderer";
import { useByocJsonRenderSuggestions } from "./suggestions";
export const AGENT_ID = "byoc_json_render";
export function Chat() {
useByocJsonRenderSuggestions();
return (
<CopilotChat
agentId={AGENT_ID}
className="h-full rounded-2xl"
messageView={{
assistantMessage:
JsonRenderAssistantMessage as unknown as typeof CopilotChatAssistantMessage,
}}
/>
);
}