mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
change model to claud 3.5
This commit is contained in:
@@ -14,12 +14,14 @@ import { useChat } from "@ai-sdk/react";
|
||||
import { ChatInput } from "@/components/chat-input";
|
||||
import { ChatMessageDisplay } from "./chat-message-display";
|
||||
import { useDiagram } from "@/contexts/diagram-context";
|
||||
import { replaceNodes } from "@/lib/utils";
|
||||
|
||||
export default function ChatPanel() {
|
||||
const {
|
||||
loadDiagram: onDisplayChart,
|
||||
handleExport: onExport,
|
||||
resolverRef,
|
||||
chartXML,
|
||||
clearDiagram,
|
||||
} = useDiagram();
|
||||
|
||||
@@ -61,7 +63,7 @@ export default function ChatPanel() {
|
||||
if (toolCall.toolName === "display_diagram") {
|
||||
const { xml } = toolCall.args as { xml: string };
|
||||
// do nothing because we will handle this streamingly in the ChatMessageDisplay component
|
||||
// onDisplayChart(xml);
|
||||
onDisplayChart(replaceNodes(chartXML, xml));
|
||||
return "Successfully displayed the flowchart.";
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user