(directory, client, sessionID)
| 1510 | |
| 1511 | --- |
| 1512 | |
| 1513 | `)}`; |
| 1514 | } |
| 1515 | |
| 1516 | // src/source/runtime/goal-runtime.js |
| 1517 | function 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 | } |
no test coverage detected