MCPcopy Index your code
hub / github.com/github/awesome-copilot / selectNextStep

Function selectNextStep

extensions/java-modernization-studio/autopilot.mjs:41–49  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

39 * @returns {object|null}
40 */
41export function selectNextStep(state) {
42 const steps = currentSteps(state);
43 if (!steps.length) return null;
44 const ord = (state && state.ordering) || { activeRank: null };
45 const inPhase = steps.find(
46 (x) => x.status !== "done" && (ord.activeRank == null || x.rank === ord.activeRank)
47 );
48 return inPhase || steps.find((x) => x.status !== "done") || null;
49}
50
51/** Whether the given step is now checked off in a freshly scanned state. */
52export function isStepDone(state, step) {

Callers 2

cockpit.test.mjsFile · 0.90
runAutopilotFunction · 0.85

Calls 1

currentStepsFunction · 0.85

Tested by

no test coverage detected