MCPcopy Index your code
hub / github.com/simstudioai/sim / encodeUploadSegment

Function encodeUploadSegment

apps/sim/lib/copilot/tools/handlers/vfs.ts:19–25  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

17 * never fails wholesale over one odd name).
18 */
19function 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

Callers 1

executeVfsGlobFunction · 0.85

Calls 1

encodeVfsSegmentFunction · 0.90

Tested by

no test coverage detected