return [new Line("No bisect in progress", { icon: "search", description: "start one to find a regression", command: cmd("Start", "oxygen.bisectStart") })];
66
}
67
switch (status.state) {
68
case "need-marks":
69
return [
70
new Line(`Marked ${status.good} good, ${status.bad} bad`, { icon: "search" }),
71
new Line(status.good === 0 ? "Mark a known-good change or bookmark…" : "Mark a known-bad change or bookmark…", { icon: status.good === 0 ? "pass" : "error", command: cmd("Mark", status.good === 0 ? "oxygen.bisectGood" : "oxygen.bisectBad") }),
72
new Line("Reset", { icon: "discard", command: cmd("Reset", "oxygen.bisectReset") }),
73
];
74
case "testing":
75
return [
76
new Line(`Testing: ${status.remaining} candidates left`, { icon: "beaker", description: `about ${status.steps_left} more steps` }),
77
new Line("This state is good", { icon: "pass", command: cmd("Good", "oxygen.bisectGood", [[]]) }),
78
new Line("This state is bad", { icon: "error", command: cmd("Bad", "oxygen.bisectBad", [[]]) }),
79
new Line("Skip: cannot test this state", { icon: "debug-step-over", command: cmd("Skip", "oxygen.bisectSkip") }),
80
new Line("Run a command for every step…", { icon: "run-all", command: cmd("Run", "oxygen.bisectRun") }),
81
new Line("Reset", { icon: "discard", command: cmd("Reset", "oxygen.bisectReset") }),
82
];
83
case "found":
84
return [
85
new Line(`Found: ${status.culprit.slice(0, 12)}`, { icon: "bug", description: "the first change that makes the state bad", command: { title: "Show", command: "oxygen.showChange", arguments: [repo.root, status.culprit] } }),
86
new Line("Reset: back to where you were", { icon: "discard", command: cmd("Reset", "oxygen.bisectReset") }),
87
];
88
case "inconclusive":
89
return [
90
new Line(`Inconclusive: ${status.candidates.length} candidates could not be told apart`, { icon: "question" }),
items.push(new Line("No trust policy: this repository is unverified", { icon: "unlock", description: "oxy policy init creates one", tooltip: "Without a policy every change and reference update is accepted." }));
110
} else {
111
const expires = new Date(policy.expires_ms).toLocaleDateString();