MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / buildLocalhostCleanupPrefix

Function buildLocalhostCleanupPrefix

background/tab-runtime.js:126–132  ·  view source on GitHub ↗
(rawUrl)

Source from the content-addressed store, hash-verified

124 }
125
126 function buildLocalhostCleanupPrefix(rawUrl) {
127 if (!isLocalhostOAuthCallbackUrl(rawUrl)) return '';
128 const parsed = new URL(rawUrl);
129 const segments = parsed.pathname.split('/').filter(Boolean);
130 if (!segments.length) return parsed.origin;
131 return `${parsed.origin}/${segments[0]}`;
132 }
133
134 async function closeTabsByUrlPrefix(prefix, options = {}) {
135 if (!prefix) return 0;

Callers 1

handleStepDataFunction · 0.70

Calls 1

Tested by

no test coverage detected