From 559b3234753a1318c03695142cee0af1afec9661 Mon Sep 17 00:00:00 2001 From: Debanjum Date: Sat, 26 Apr 2025 13:29:06 +0200 Subject: [PATCH] Support attaching jupyter/ipython notebooks from the web app to chat --- src/interface/web/app/common/chatFunctions.ts | 6 +++++- .../web/app/components/chatInputArea/chatInputArea.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/interface/web/app/common/chatFunctions.ts b/src/interface/web/app/common/chatFunctions.ts index 3bf365e4..9ccd1316 100644 --- a/src/interface/web/app/common/chatFunctions.ts +++ b/src/interface/web/app/common/chatFunctions.ts @@ -288,7 +288,11 @@ export async function packageFilesForUpload(files: FileList): Promise fileType = "text/org"; } else if (fileExtension === "md") { fileType = "text/markdown"; - } else if (fileExtension === "txt" || fileExtension === "tsx") { + } else if ( + fileExtension === "txt" || + fileExtension === "tsx" || + fileExtension === "ipynb" + ) { fileType = "text/plain"; } else if (fileExtension === "html") { fileType = "text/html"; diff --git a/src/interface/web/app/components/chatInputArea/chatInputArea.tsx b/src/interface/web/app/components/chatInputArea/chatInputArea.tsx index 8c247912..5448d8ce 100644 --- a/src/interface/web/app/components/chatInputArea/chatInputArea.tsx +++ b/src/interface/web/app/components/chatInputArea/chatInputArea.tsx @@ -643,7 +643,7 @@ export const ChatInputArea = forwardRef((pr >