@caliber-ai/cli 0.20.1 → 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +10 -5
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -2055,9 +2055,8 @@ async function initCommand(options) {
|
|
|
2055
2055
|
console.log(chalk3.bold.green("\nSetup complete! Your coding agent is now configured."));
|
|
2056
2056
|
console.log(chalk3.dim("Run `caliber undo` to revert changes.\n"));
|
|
2057
2057
|
console.log(chalk3.bold(" Next steps:\n"));
|
|
2058
|
-
console.log(` ${chalk3.hex("#6366f1")("caliber health")} Check your config quality and fix issues`);
|
|
2059
2058
|
console.log(` ${chalk3.hex("#6366f1")("caliber recommend")} Discover additional skills for your stack`);
|
|
2060
|
-
console.log(` ${chalk3.hex("#6366f1")("caliber
|
|
2059
|
+
console.log(` ${chalk3.hex("#6366f1")("caliber undo")} Revert all changes from this run`);
|
|
2061
2060
|
console.log("");
|
|
2062
2061
|
}
|
|
2063
2062
|
async function refineLoop(currentSetup, _targetAgent) {
|
|
@@ -2074,6 +2073,7 @@ async function refineLoop(currentSetup, _targetAgent) {
|
|
|
2074
2073
|
refinementRound++;
|
|
2075
2074
|
trackEvent("refinement_message_sent", { refinement_round: refinementRound });
|
|
2076
2075
|
let refined = null;
|
|
2076
|
+
let streamError = null;
|
|
2077
2077
|
const refineSpinner = ora2("Refining setup...").start();
|
|
2078
2078
|
const refineMessages = new SpinnerMessages(refineSpinner, REFINE_MESSAGES);
|
|
2079
2079
|
refineMessages.start();
|
|
@@ -2086,21 +2086,26 @@ async function refineLoop(currentSetup, _targetAgent) {
|
|
|
2086
2086
|
refined = payload.setup;
|
|
2087
2087
|
},
|
|
2088
2088
|
(error) => {
|
|
2089
|
-
|
|
2090
|
-
refineSpinner.fail(`Refinement error: ${error}`);
|
|
2089
|
+
streamError = error;
|
|
2091
2090
|
},
|
|
2092
2091
|
(status) => {
|
|
2093
2092
|
refineMessages.handleServerStatus(status);
|
|
2094
2093
|
}
|
|
2095
2094
|
);
|
|
2096
2095
|
refineMessages.stop();
|
|
2097
|
-
if (
|
|
2096
|
+
if (streamError) {
|
|
2097
|
+
refineSpinner.fail(`Refinement failed: ${streamError}`);
|
|
2098
|
+
console.log(chalk3.dim('Try rephrasing your request, or type "done" to keep the current setup.'));
|
|
2099
|
+
} else if (refined) {
|
|
2098
2100
|
currentSetup = refined;
|
|
2099
2101
|
history.push({ role: "user", content: message });
|
|
2100
2102
|
history.push({ role: "assistant", content: JSON.stringify(refined) });
|
|
2101
2103
|
refineSpinner.succeed("Setup updated");
|
|
2102
2104
|
printSetupSummary(refined);
|
|
2103
2105
|
console.log(chalk3.dim('Type "done" to accept, or describe more changes.'));
|
|
2106
|
+
} else {
|
|
2107
|
+
refineSpinner.fail("Refinement failed \u2014 could not parse AI response.");
|
|
2108
|
+
console.log(chalk3.dim('Try rephrasing your request, or type "done" to keep the current setup.'));
|
|
2104
2109
|
}
|
|
2105
2110
|
}
|
|
2106
2111
|
}
|