aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx')
-rw-r--r--src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx b/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
index 57d02a408..c5ffb2c74 100644
--- a/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
+++ b/src/client/views/nodes/chatbot/chatboxcomponents/ChatBox.tsx
@@ -432,7 +432,12 @@ export class ChatBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
break;
case 'dataviz':
case 'data_viz':
- doc = Docs.Create.DataVizDocument(data || '', options);
+ const { fileUrl, id } = await Networking.PostToServer('/createCSV', {
+ filename: (options.title as string).replace(/\s+/g, '') + '.csv',
+ data: data,
+ });
+ doc = Docs.Create.DataVizDocument(fileUrl, { ...options, text: RTFCast(data) });
+ this.addCSVForAnalysis(doc, id);
break;
case 'chat':
doc = Docs.Create.ChatDocument(options);