MCPcopy Index your code
hub / github.com/ByBrawe/opencode-loop / blockGoalCommand

Function blockGoalCommand

src/index.js:1494–1497  ·  view source on GitHub ↗
(directory, client, sessionID, args)

Source from the content-addressed store, hash-verified

1492async function clearGoal(directory, client, sessionID, args) {
1493 const target = String(args || "").trim()
1494 const state = await readState(directory, sessionID)
1495 const before = state.jobs.length
1496 state.jobs = (state.jobs || []).filter((job, index) => !isGoalJob(job) || (target && !matchJob(job, target, index)))
1497 await writeState(directory, sessionID, state)
1498 await scheduleDueWork(directory, client, sessionID)
1499 await toast(client, `Cleared ${before - state.jobs.length} experimental goal(s).`, before !== state.jobs.length ? "success" : "warning")
1500}

Callers 2

addGoalFunction · 0.85
handleCommandFunction · 0.85

Calls 2

setGoalBlockedFunction · 0.85
toastFunction · 0.85

Tested by

no test coverage detected