MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / encodePathSegment

Function encodePathSegment

src/utils/utils.ts:294–300  ·  view source on GitHub ↗
(segment: string)

Source from the content-addressed store, hash-verified

292 * decode first to avoid encoding twice.
293 */
294export const encodePathSegment = (segment: string): string => {
295 try {
296 return encodeURIComponent(decodeURIComponent(segment));
297 } catch {
298 return encodeURIComponent(segment);
299 }
300};
301
302/**
303 * Percent-encode a `owner/repo`-style repository name one path segment at a

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected