@rely-ai/caliber 1.5.1 → 1.5.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 +22 -10
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -5176,23 +5176,30 @@ async function interactiveSelect2(recs) {
|
|
|
5176
5176
|
const hasScores = recs.some((r) => r.score > 0);
|
|
5177
5177
|
function render() {
|
|
5178
5178
|
const lines = [];
|
|
5179
|
+
const cols = process.stdout.columns || 80;
|
|
5180
|
+
const nameWidth = Math.max(...recs.map((r) => r.name.length), 4) + 2;
|
|
5181
|
+
const prefixWidth = 8;
|
|
5182
|
+
const scoreWidth = 6;
|
|
5179
5183
|
lines.push(chalk6.bold(" Skills"));
|
|
5180
5184
|
lines.push("");
|
|
5181
5185
|
if (hasScores) {
|
|
5182
|
-
|
|
5186
|
+
const header = " ".repeat(prefixWidth) + chalk6.dim("Score".padEnd(scoreWidth)) + chalk6.dim("Name".padEnd(nameWidth)) + chalk6.dim("Why");
|
|
5187
|
+
lines.push(header);
|
|
5183
5188
|
} else {
|
|
5184
|
-
|
|
5189
|
+
const header = " ".repeat(prefixWidth) + chalk6.dim("Name".padEnd(nameWidth)) + chalk6.dim("Technology".padEnd(18)) + chalk6.dim("Source");
|
|
5190
|
+
lines.push(header);
|
|
5185
5191
|
}
|
|
5186
|
-
lines.push(chalk6.dim(" " + "\u2500".repeat(
|
|
5192
|
+
lines.push(chalk6.dim(" " + "\u2500".repeat(Math.min(cols - 4, 90))));
|
|
5187
5193
|
for (let i = 0; i < recs.length; i++) {
|
|
5188
5194
|
const rec = recs[i];
|
|
5189
5195
|
const check = selected.has(i) ? chalk6.green("[x]") : "[ ]";
|
|
5190
5196
|
const ptr = i === cursor ? chalk6.cyan(">") : " ";
|
|
5191
5197
|
if (hasScores) {
|
|
5192
5198
|
const scoreColor = rec.score >= 90 ? chalk6.green : rec.score >= 70 ? chalk6.yellow : chalk6.dim;
|
|
5193
|
-
|
|
5199
|
+
const reasonMax = Math.max(cols - prefixWidth - scoreWidth - nameWidth - 2, 20);
|
|
5200
|
+
lines.push(` ${ptr} ${check} ${scoreColor(String(rec.score).padStart(3))} ${rec.name.padEnd(nameWidth)}${chalk6.dim(rec.reason.slice(0, reasonMax))}`);
|
|
5194
5201
|
} else {
|
|
5195
|
-
lines.push(` ${ptr} ${check} ${rec.name.padEnd(
|
|
5202
|
+
lines.push(` ${ptr} ${check} ${rec.name.padEnd(nameWidth)}${rec.detected_technology.padEnd(16)} ${chalk6.dim(rec.source_url || "")}`);
|
|
5196
5203
|
}
|
|
5197
5204
|
}
|
|
5198
5205
|
lines.push("");
|
|
@@ -5327,18 +5334,23 @@ async function installSkills(recs, platforms, contentMap) {
|
|
|
5327
5334
|
}
|
|
5328
5335
|
function printSkills(recs) {
|
|
5329
5336
|
const hasScores = recs.some((r) => r.score > 0);
|
|
5337
|
+
const cols = process.stdout.columns || 80;
|
|
5338
|
+
const nameWidth = Math.max(...recs.map((r) => r.name.length), 4) + 2;
|
|
5339
|
+
const scoreWidth = 6;
|
|
5340
|
+
const prefixWidth = 2;
|
|
5330
5341
|
console.log(chalk6.bold("\n Skills\n"));
|
|
5331
5342
|
if (hasScores) {
|
|
5332
|
-
console.log(
|
|
5343
|
+
console.log(" ".repeat(prefixWidth) + chalk6.dim("Score".padEnd(scoreWidth)) + chalk6.dim("Name".padEnd(nameWidth)) + chalk6.dim("Why"));
|
|
5333
5344
|
} else {
|
|
5334
|
-
console.log(
|
|
5345
|
+
console.log(" ".repeat(prefixWidth) + chalk6.dim("Name".padEnd(nameWidth)) + chalk6.dim("Technology".padEnd(18)) + chalk6.dim("Source"));
|
|
5335
5346
|
}
|
|
5336
|
-
console.log(chalk6.dim(" " + "\u2500".repeat(
|
|
5347
|
+
console.log(chalk6.dim(" " + "\u2500".repeat(Math.min(cols - 4, 90))));
|
|
5337
5348
|
for (const rec of recs) {
|
|
5338
5349
|
if (hasScores) {
|
|
5339
|
-
|
|
5350
|
+
const reasonMax = Math.max(cols - prefixWidth - scoreWidth - nameWidth - 2, 20);
|
|
5351
|
+
console.log(` ${String(rec.score).padStart(3)} ${rec.name.padEnd(nameWidth)}${chalk6.dim(rec.reason.slice(0, reasonMax))}`);
|
|
5340
5352
|
} else {
|
|
5341
|
-
console.log(` ${rec.name.padEnd(
|
|
5353
|
+
console.log(` ${rec.name.padEnd(nameWidth)}${rec.detected_technology.padEnd(16)} ${chalk6.dim(rec.source_url || "")}`);
|
|
5342
5354
|
}
|
|
5343
5355
|
}
|
|
5344
5356
|
console.log("");
|
package/package.json
CHANGED