mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 05:39:11 +00:00
Support attaching jupyter/ipython notebooks from the web app to chat
This commit is contained in:
@@ -288,7 +288,11 @@ export async function packageFilesForUpload(files: FileList): Promise<FormData>
|
|||||||
fileType = "text/org";
|
fileType = "text/org";
|
||||||
} else if (fileExtension === "md") {
|
} else if (fileExtension === "md") {
|
||||||
fileType = "text/markdown";
|
fileType = "text/markdown";
|
||||||
} else if (fileExtension === "txt" || fileExtension === "tsx") {
|
} else if (
|
||||||
|
fileExtension === "txt" ||
|
||||||
|
fileExtension === "tsx" ||
|
||||||
|
fileExtension === "ipynb"
|
||||||
|
) {
|
||||||
fileType = "text/plain";
|
fileType = "text/plain";
|
||||||
} else if (fileExtension === "html") {
|
} else if (fileExtension === "html") {
|
||||||
fileType = "text/html";
|
fileType = "text/html";
|
||||||
|
|||||||
@@ -643,7 +643,7 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((pr
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="file"
|
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}
|
multiple={true}
|
||||||
ref={fileInputRef}
|
ref={fileInputRef}
|
||||||
onChange={handleFileChange}
|
onChange={handleFileChange}
|
||||||
|
|||||||
Reference in New Issue
Block a user