kiro-kit 0.3.4 → 0.3.5
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/index.js +10 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12277,20 +12277,17 @@ async function createPrompt(capability, theme) {
|
|
|
12277
12277
|
return new Promise((resolve2, reject) => {
|
|
12278
12278
|
const selected = /* @__PURE__ */ new Set();
|
|
12279
12279
|
let cursor = 0;
|
|
12280
|
-
let
|
|
12280
|
+
let lineCount = 0;
|
|
12281
12281
|
const cols = process.stdout.columns ?? 80;
|
|
12282
12282
|
const maxDescWidth = Math.max(0, cols - 23);
|
|
12283
12283
|
const render = () => {
|
|
12284
|
-
if (
|
|
12285
|
-
process.stdout.write(
|
|
12286
|
-
} else {
|
|
12287
|
-
process.stdout.write("\x1B[s");
|
|
12284
|
+
if (lineCount > 0) {
|
|
12285
|
+
process.stdout.write(`\x1B[${lineCount}A\x1B[0J`);
|
|
12288
12286
|
}
|
|
12289
|
-
|
|
12290
|
-
process.stdout.write("\x1B[J");
|
|
12287
|
+
const lines = [];
|
|
12291
12288
|
const heading = capability.color ? theme.heading("? Select presets to install:") : "? Select presets to install:";
|
|
12292
12289
|
const hint = capability.color ? theme.muted(" (Space to select, <a> toggle all, Enter to confirm)") : " (Space to select, <a> toggle all, Enter to confirm)";
|
|
12293
|
-
|
|
12290
|
+
lines.push(heading + hint);
|
|
12294
12291
|
for (let i = 0; i < items.length; i++) {
|
|
12295
12292
|
const marker = cursor === i ? capability.color ? theme.command(">") : ">" : " ";
|
|
12296
12293
|
const check = selected.has(i) ? capability.color ? "\x1B[32m[x]\x1B[0m" : "[x]" : "[ ]";
|
|
@@ -12299,9 +12296,10 @@ async function createPrompt(capability, theme) {
|
|
|
12299
12296
|
const desc = rawDesc.length > maxDescWidth ? rawDesc.slice(0, Math.max(0, maxDescWidth - 1)) + "\u2026" : rawDesc;
|
|
12300
12297
|
const styledName = capability.color ? theme.command(name) : name;
|
|
12301
12298
|
const styledDesc = capability.color ? theme.muted(desc) : desc;
|
|
12302
|
-
|
|
12303
|
-
`);
|
|
12299
|
+
lines.push(` ${marker} ${check} ${styledName} - ${styledDesc}`);
|
|
12304
12300
|
}
|
|
12301
|
+
process.stdout.write(lines.join("\n") + "\n");
|
|
12302
|
+
lineCount = lines.length;
|
|
12305
12303
|
};
|
|
12306
12304
|
render();
|
|
12307
12305
|
let rawModeActive = false;
|
|
@@ -12362,8 +12360,9 @@ async function createPrompt(capability, theme) {
|
|
|
12362
12360
|
reject(new Error("SIGINT"));
|
|
12363
12361
|
return;
|
|
12364
12362
|
}
|
|
12365
|
-
if (key === "\r" || key === "\n") {
|
|
12363
|
+
if (key === "\r" || key === "\n" || key === "\r\n") {
|
|
12366
12364
|
cleanup();
|
|
12365
|
+
process.stdout.write("\n");
|
|
12367
12366
|
resolve2([...selected].map((i) => items[i].name));
|
|
12368
12367
|
return;
|
|
12369
12368
|
}
|