nsarrazin HF Staff commited on
Commit
ed74852
·
unverified ·
1 Parent(s): 51f6328

fix(tools): support for video

Browse files
src/lib/components/chat/UploadedFile.svelte CHANGED
@@ -34,7 +34,8 @@
34
 
35
  const isAudio = (mime: string) =>
36
  mime.startsWith("audio/") || mime === "mp3" || mime === "wav" || mime === "x-wav";
37
- const isVideo = (mime: string) => mime.startsWith("video/");
 
38
 
39
  $: isClickable = isImage(file.mime) && !isPreview;
40
  </script>
 
34
 
35
  const isAudio = (mime: string) =>
36
  mime.startsWith("audio/") || mime === "mp3" || mime === "wav" || mime === "x-wav";
37
+ const isVideo = (mime: string) =>
38
+ mime.startsWith("video/") || mime === "mp4" || mime === "x-mpeg" || mime === "octet-stream";
39
 
40
  $: isClickable = isImage(file.mime) && !isPreview;
41
  </script>
src/lib/server/tools/outputs.ts CHANGED
@@ -33,7 +33,7 @@ export const ToolOutputPaths: Record<
33
  },
34
  video: {
35
  type: "file",
36
- path: "$.url",
37
  },
38
  file: {
39
  type: "file",
 
33
  },
34
  video: {
35
  type: "file",
36
+ path: "$.video.url",
37
  },
38
  file: {
39
  type: "file",