You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(file): let the file name offer a type no content probe can find (#814)
`FileType::markdown` was unreachable by detection: it has no signature, and a
content probe for it is a probe for "prose with occasional punctuation", so
`detect_by_content` is false and `list_file_types` never offered it. A `.md`
came back as `text_file` and the caller had to already know.
The name is at the boundary and was being thrown away — `abstract::File` already
carries `disk_path`. `file_type_by_name` reads the extension off it and offers
the type when the table says no probe can produce it, once the bytes have
decoded as text. A name only ever adds a candidate: a `.md` holding a zip is
still a zip, and `File::from_memory` has no name, so it still needs
`FileType::markdown`.
Closes#760.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments