fix(ui): restrict chart types

This commit is contained in:
2026-07-14 11:01:07 +08:00
parent 6b45e7c40c
commit 909bb771f4
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -42,10 +42,7 @@ export const toUiEnvelopeFromToolCall = ({
if (xData.length === 0 || series.length === 0) {
return null;
}
const chartType =
params.chart_type === "bar" || params.chart_type === "pie"
? params.chart_type
: "line";
const chartType = params.chart_type === "bar" ? "bar" : "line";
return {
kind: "chart",
schemaVersion: "agent-ui@1",