MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / isLikelyPathOrFileUri

Function isLikelyPathOrFileUri

src/windsurf.js:1027–1033  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1025 };
1026
1027 const isLikelyPathOrFileUri = (value) => {
1028 const s = String(value || '').trim();
1029 if (!s || s.length > 1024 || /[\r\n<>]/.test(s)) return false;
1030 if (/^file:\/\/\/?(?:[A-Za-z]:[\\/]|\/|~[\\/])/.test(s)) return true;
1031 if (/^(?:[A-Za-z]:[\\/]|\/|~[\\/]|\.{1,2}[\\/])\S+/.test(s)) return true;
1032 return /^[A-Za-z0-9._-]+(?:[\\/][A-Za-z0-9._-]+)*\.[A-Za-z0-9]{1,12}$/.test(s);
1033 };
1034
1035 for (const step of steps) {
1036 // Robustness (audit #1): skip a single malformed step instead of

Callers 1

parseTrajectoryStepsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected