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

Function decodeVfsSegmentSafe

apps/sim/lib/copilot/tools/client/store-utils.ts:90–96  ·  view source on GitHub ↗

* VFS paths store each segment percent-encoded (see encodeVfsSegment), so * a read on "My Report.txt" arrives as "files/My%20Report.txt". Decode for * display so the user sees the real file name. Falls back to the raw segment when * it is not valid encoding (e.g. a literal "%" that was ne

(segment: string)

Source from the content-addressed store, hash-verified

88 * it is not valid encoding (e.g. a literal "%" that was never encoded).
89 */
90function decodeVfsSegmentSafe(segment: string): string {
91 try {
92 return decodeVfsSegment(segment)
93 } catch {
94 return segment
95 }
96}
97
98function describeReadTarget(path: string | undefined): string | undefined {
99 if (!path) return undefined

Callers

nothing calls this directly

Calls 1

decodeVfsSegmentFunction · 0.90

Tested by

no test coverage detected