Support attaching jupyter/ipython notebooks from the web app to chat

This commit is contained in:
Debanjum
2025-04-26 13:29:06 +02:00
parent dab6977fed
commit 559b323475
2 changed files with 6 additions and 2 deletions

View File

@@ -288,7 +288,11 @@ export async function packageFilesForUpload(files: FileList): Promise<FormData>
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";

View File

@@ -643,7 +643,7 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
>
<input
type="file"
accept=".pdf,.doc,.docx,.txt,.md,.org,.jpg,.jpeg,.png,.webp,.py,.tsx,.js,.json,.html,.css"
accept=".pdf,.doc,.docx,.txt,.md,.org,.jpg,.jpeg,.png,.webp,.py,.tsx,.js,.json,.html,.css,.ipynb"
multiple={true}
ref={fileInputRef}
onChange={handleFileChange}