INNER CODE UNIT · JavaScript
pathIsAbsolute
EdgeTypE/better-deepseek · src/background/index.js:837
function pathIsAbsolute(p) {
if (!p || typeof p !== "string") return false;
return p.startsWith("/") || p.startsWith("\\") || /^[a-zA-Z]:[/\\]/.test(p);
}
/**
* Handle execution of Harness tasks by calling 127.0.0.1:3080 ApiProxy endpoints.
*/
async function handleHarnessTaskExecution(payload = {}) {
const baseUrl = String(payload.baseUrl || "http://127.0.0.1:3080").replace(/\/+$/, "");
// If only querying workspaces
if (payload.queryWorkspacesOnly) {
try {
const wsRes = await fetch(`${baseUrl}/api/workspace.list`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({