feat: add system message for flowchart assistance and improve message handling in chat API

This commit is contained in:
dayuan.jiang
2025-03-19 08:40:08 +00:00
parent 585c3bac1f
commit 51ce74400d
3 changed files with 23 additions and 4 deletions

View File

@@ -16,6 +16,7 @@ export default function Home() {
format: "xmlsvg",
});
}
console.log("chartXML from page", chartXML);
};
const loadDiagram = (chart: string) => {
@@ -40,11 +41,15 @@ export default function Home() {
}}
/>
</div>
<Button
onClick={handleExport}
>export </Button>
<div className="w-1/3 p-1 border-gray-300">
<ChatPanel
onDisplayChart={(xml) => loadDiagram(xml)}
onFetchChart={() => {
handleExport();
console.log("chartXML from page", chartXML);
return chartXML;
}}
/>