* Encode a chat-upload display name as a single canonical VFS path segment so * `uploads/` paths follow the same percent-encoded convention as `files/`. * Falls back to the raw name if the segment cannot be encoded (so a listing * never fails wholesale over one odd name).
(name: string)
| 17 | * never fails wholesale over one odd name). |
| 18 | */ |
| 19 | function encodeUploadSegment(name: string): string { |
| 20 | try { |
| 21 | return encodeVfsSegment(name) |
| 22 | } catch { |
| 23 | return name |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * True when a grep `path` targets the workspace files tree (`files/` or |
no test coverage detected