From 403d88813622c45ea270d5168e9875e582bad4d4 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 17 Nov 2026 12:03:31 +0100 Subject: assistant: chat takes videos, as a path for the video tool Co-Authored-By: Claude Opus 5.5 --- desktop/assistant/Files.js | 5 +++-- desktop/assistant/test_files.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'desktop') diff --git a/desktop/assistant/Files.js b/desktop/assistant/Files.js index bcbd9bc..bea1841 100644 --- a/desktop/assistant/Files.js +++ b/desktop/assistant/Files.js @@ -28,8 +28,9 @@ const IMAGE = [".png", ".jpg", ".jpeg", ".gif", ".webp"]; const VIDEO = [".mp4", ".mkv", ".webm", ".mov", ".avi", ".m4v"]; const ARCHIVE = [".zip", ".tar", ".gz", ".tgz", ".xz", ".txz", ".bz2", ".zst", ".7z", ".rar"]; -// Kinds chat takes; the rest only get local actions. -const CHAT = ["text", "code", "image", "pdf"]; +// Kinds chat takes; the rest only get local actions. A video goes as its +// path only, for the video tool. +const CHAT = ["text", "code", "image", "pdf", "video"]; function name(path) { return path.slice(path.lastIndexOf("/") + 1); } diff --git a/desktop/assistant/test_files.js b/desktop/assistant/test_files.js index f2a65ca..f6ed058 100644 --- a/desktop/assistant/test_files.js +++ b/desktop/assistant/test_files.js @@ -29,8 +29,8 @@ const cases = { }; for (const [p, k] of Object.entries(cases)) assert.strictEqual(F.kind(p), k, p); -assert.ok(F.chats("pdf") && F.chats("image") && F.chats("text") && F.chats("code")); -assert.ok(!F.chats("video") && !F.chats("archive") && !F.chats("other")); +assert.ok(F.chats("pdf") && F.chats("image") && F.chats("text") && F.chats("code") && F.chats("video")); +assert.ok(!F.chats("archive") && !F.chats("other")); assert.strictEqual(F.fromUrl("file:///home/you/My%20Docs/caf%C3%A9.pdf"), "/home/you/My Docs/café.pdf"); assert.strictEqual(F.fromUrl("file:///tmp/a.txt"), "/tmp/a.txt"); -- cgit v1.2.3