MCPcopy Create free account
hub / github.com/ByBrawe/opencode-loop / ensureBranch

Function ensureBranch

src/index.js:687–698  ·  view source on GitHub ↗
(directory, job, client, sessionID)

Source from the content-addressed store, hash-verified

685 return "unknown SDK error";
686 if (error instanceof Error)
687 return error.message;
688 if (typeof error === "string")
689 return error;
690 if (typeof error === "object") {
691 if (typeof error.message === "string")
692 return error.message;
693 if (typeof error.name === "string")
694 return error.name;
695 try {
696 return JSON.stringify(error).slice(0, 400);
697 } catch {}
698 }
699 return String(error);
700}
701async function sdkCall(method, ...argsList) {

Callers 1

maybeRunDueJobsFunction · 0.85

Calls 4

safeIDFunction · 0.85
runProcessFunction · 0.85
toastFunction · 0.85
appendLoopLogFunction · 0.85

Tested by

no test coverage detected