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

Function statusLoop

src/index.js:1512–1522  ·  view source on GitHub ↗
(directory, client, sessionID)

Source from the content-addressed store, hash-verified

1510
1511---
1512
1513`)}`;
1514}
1515
1516// src/source/runtime/goal-runtime.js
1517function pickGoalJob(state, target = "") {
1518 const goals = (state.jobs || []).filter(isGoalJob);
1519 if (!goals.length)
1520 return;
1521 const text = String(target || "").trim();
1522 if (!text || ["active", "current", "goal"].includes(text.toLowerCase()))
1523 return goals.find((job) => job.goalStatus === "active" && job.enabled !== false) || goals[0];
1524 return goals.find((job, index) => matchJob(job, text, index));
1525}

Callers 1

handleCommandFunction · 0.85

Calls 8

readStateFunction · 0.85
nowFunction · 0.85
isGoalJobFunction · 0.85
goalStatusTextFunction · 0.85
jobLabelFunction · 0.85
durationToTextFunction · 0.85
toastFunction · 0.85
sayFunction · 0.85

Tested by

no test coverage detected