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

Function pauseGoal

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

Source from the content-addressed store, hash-verified

1450
1451async function statusGoal(directory, client, sessionID) {
1452 const state = await readState(directory, sessionID)
1453 const goals = (state.jobs || []).filter(isGoalJob)
1454 const lines = goals.length ? goals.map((job, index) => {
1455 const status = goalStatusText(job)
1456 const checks = job.goalChecks?.length ? ` | checks=${job.goalChecks.length}` : ""
1457 const acceptance = job.goalAcceptance?.length ? ` | acceptance=${job.goalAcceptance.length}` : ""
1458 const progress = job.goalProgress?.length ? ` | progress=${job.goalProgress.length}` : ""
1459 return `${index + 1}. ${job.id}${job.name ? ` (${job.name})` : ""}: ${status} | turns=${job.runCount || 0} | objective=${String(job.action || job.goalFile || "").slice(0, 220)}${checks}${acceptance}${progress}`
1460 }) : ["No experimental goal jobs."]
1461 await toast(client, goals.length ? `${goals.length} experimental goal(s).` : "No experimental goal jobs.", goals.length ? "info" : "warning")
1462 await say(client, sessionID, "OpenCode Loop experimental goal status:\n" + lines.join("\n"))
1463}

Callers 2

addGoalFunction · 0.85
handleCommandFunction · 0.85

Calls 6

readStateFunction · 0.85
isGoalJobFunction · 0.85
matchJobFunction · 0.85
writeStateFunction · 0.85
scheduleDueWorkFunction · 0.85
toastFunction · 0.85

Tested by

no test coverage detected