(directory, client, sessionID, args)
| 1450 | |
| 1451 | async 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 | } |
no test coverage detected