MCPcopy Index your code
hub / github.com/MrgSub/opencode-debug / generateFetchSnippet

Function generateFetchSnippet

src/index.ts:29–35  ·  view source on GitHub ↗
(
  url: string,
  label: string,
  dataExpr: string = "{}"
)

Source from the content-addressed store, hash-verified

27let activeDebugUrl: string | null = null;
28
29function generateFetchSnippet(
30 url: string,
31 label: string,
32 dataExpr: string = "{}"
33): string {
34 return `fetch("${url}", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ label: "${label}", data: ${dataExpr} }) }).catch(() => {});`;
35}
36
37function getDebugInstructions(debugUrl: string): string {
38 return `

Callers 2

getDebugInstructionsFunction · 0.85
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected