From f54deb287a617dcde52ce014caae9c303730058e Mon Sep 17 00:00:00 2001 From: Nils Kruthoff Date: Tue, 4 Aug 2026 14:45:54 +0200 Subject: [PATCH] added a definition DTO for ai studio chat block diagrams --- .../Chat/ChartDefinition.cs | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 app/MindWork AI Studio/Chat/ChartDefinition.cs diff --git a/app/MindWork AI Studio/Chat/ChartDefinition.cs b/app/MindWork AI Studio/Chat/ChartDefinition.cs new file mode 100644 index 00000000..8598f9fa --- /dev/null +++ b/app/MindWork AI Studio/Chat/ChartDefinition.cs @@ -0,0 +1,29 @@ +namespace AIStudio.Chat; + +/// +/// A renderer-independent, validated chart definition produced by an AI response. +/// +public sealed record ChartDefinition( + int SchemaVersion, + ChartDefinitionType Type, + string Title, + string? Caption, + IReadOnlyList Categories, + IReadOnlyList Series); + +/// +/// A named series in a chart definition. +/// +public sealed record ChartDefinitionSeries(string Name, IReadOnlyList Values); + +/// +/// Chart types supported by version 1 of the AI Studio chart contract. +/// +public enum ChartDefinitionType +{ + BAR, + STACKED_BAR, + LINE, + PIE, + DONUT, +}