From 12d6830424d24f5a2ed8056b53a12cc4b978ece2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 16:20:01 +0200 Subject: feat(assistant): tell a nameless file's kind from its content A script with no suffix staged as 'other' and was refused. A staged file the name says nothing about is now handed to file(1) once, and its mime type gives the kind, so a shell script is code and gets Explain and Review. The daemon makes its own call on the content. Co-Authored-By: Claude Opus 5.5 --- desktop/assistant/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'desktop/assistant/README.md') diff --git a/desktop/assistant/README.md b/desktop/assistant/README.md index 4715b12..8c74343 100644 --- a/desktop/assistant/README.md +++ b/desktop/assistant/README.md @@ -61,8 +61,10 @@ Notes: markers literally. - **File kinds are decided twice.** `Files.js` decides what the card - offers; the daemon decides what chat accepts. The lists match, but the - daemon also takes any `text/*` file, which the card may show as "other". + offers; the daemon decides what chat accepts. Both go by the name first + and by the content when the name says nothing: the card runs + `file -b --mime-type` on staged "other" files, the daemon reads the first + 4 KB. A script with no suffix is therefore code here and text there. - **`socketPath`** is a property so a check can point the canvas at a scratch daemon; the desktop uses the default. -- cgit v1.2.3