@vibeframe/cli 0.91.2 → 0.91.3
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 +16 -8
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -31896,12 +31896,14 @@ async function promptConfirm(question, defaultYes = true) {
|
|
|
31896
31896
|
return answer.toLowerCase().startsWith("y");
|
|
31897
31897
|
}
|
|
31898
31898
|
async function promptMultiSelect(_question, options, defaultSelected = [], opts = {}) {
|
|
31899
|
+
const pickFocused = opts.pickFocusedOnEnter ?? opts.enterSelectsFocusedWhenEmpty ?? false;
|
|
31899
31900
|
const input = getTTYInputStream();
|
|
31900
31901
|
const selected = options.map((_, i) => Boolean(defaultSelected[i]));
|
|
31901
31902
|
if (typeof input.setRawMode === "function") {
|
|
31902
31903
|
return new Promise((resolve64) => {
|
|
31903
31904
|
let cursor = 0;
|
|
31904
31905
|
let renderCount = 0;
|
|
31906
|
+
let userToggled = false;
|
|
31905
31907
|
const render = () => {
|
|
31906
31908
|
if (renderCount > 0) {
|
|
31907
31909
|
process.stdout.write(`\x1B[${options.length}A`);
|
|
@@ -31931,8 +31933,10 @@ async function promptMultiSelect(_question, options, defaultSelected = [], opts
|
|
|
31931
31933
|
};
|
|
31932
31934
|
const onData = (char) => {
|
|
31933
31935
|
if (char === "\r" || char === "\n") {
|
|
31934
|
-
if (
|
|
31936
|
+
if (pickFocused && !userToggled) {
|
|
31937
|
+
for (let i = 0; i < selected.length; i++) selected[i] = false;
|
|
31935
31938
|
selected[cursor] = true;
|
|
31939
|
+
render();
|
|
31936
31940
|
}
|
|
31937
31941
|
finish();
|
|
31938
31942
|
} else if (char === "") {
|
|
@@ -31941,6 +31945,7 @@ async function promptMultiSelect(_question, options, defaultSelected = [], opts
|
|
|
31941
31945
|
process.exit(1);
|
|
31942
31946
|
} else if (char === " ") {
|
|
31943
31947
|
selected[cursor] = !selected[cursor];
|
|
31948
|
+
userToggled = true;
|
|
31944
31949
|
render();
|
|
31945
31950
|
} else if (char === "\x1B[A" || char === "k") {
|
|
31946
31951
|
cursor = (cursor - 1 + options.length) % options.length;
|
|
@@ -31951,10 +31956,12 @@ async function promptMultiSelect(_question, options, defaultSelected = [], opts
|
|
|
31951
31956
|
} else if (char === "a") {
|
|
31952
31957
|
const allOn = selected.every(Boolean);
|
|
31953
31958
|
for (let i = 0; i < selected.length; i++) selected[i] = !allOn;
|
|
31959
|
+
userToggled = true;
|
|
31954
31960
|
render();
|
|
31955
31961
|
} else if (char >= "1" && char <= String(Math.min(options.length, 9))) {
|
|
31956
31962
|
const i = parseInt(char, 10) - 1;
|
|
31957
31963
|
selected[i] = !selected[i];
|
|
31964
|
+
userToggled = true;
|
|
31958
31965
|
render();
|
|
31959
31966
|
}
|
|
31960
31967
|
};
|
|
@@ -62913,7 +62920,7 @@ init_source();
|
|
|
62913
62920
|
// package.json
|
|
62914
62921
|
var package_default = {
|
|
62915
62922
|
name: "@vibeframe/cli",
|
|
62916
|
-
version: "0.91.
|
|
62923
|
+
version: "0.91.3",
|
|
62917
62924
|
description: "VibeFrame CLI - natural language video editing from the terminal",
|
|
62918
62925
|
private: false,
|
|
62919
62926
|
license: "MIT",
|
|
@@ -70254,8 +70261,8 @@ async function runSetupWizard(fullSetup = false, scope = "user") {
|
|
|
70254
70261
|
}
|
|
70255
70262
|
console.log(source_default.dim("2. Features"));
|
|
70256
70263
|
console.log(source_default.bold("Which AI features do you need?"));
|
|
70257
|
-
console.log(source_default.dim("
|
|
70258
|
-
console.log(source_default.dim("
|
|
70264
|
+
console.log(source_default.dim(` ${source_default.bold("Most users pick more than one.")} Press ${source_default.bold("space")} on each feature you want, then ${source_default.bold("enter")} to confirm.`));
|
|
70265
|
+
console.log(source_default.dim(" Shortcut: enter alone picks only the highlighted feature."));
|
|
70259
70266
|
console.log();
|
|
70260
70267
|
const featureLabels = AI_FEATURES.map((f) => {
|
|
70261
70268
|
const keyCount = f.keys.length;
|
|
@@ -70266,7 +70273,7 @@ async function runSetupWizard(fullSetup = false, scope = "user") {
|
|
|
70266
70273
|
source_default.cyan(" Pick (e.g. 1,3 or 'all'): "),
|
|
70267
70274
|
featureLabels,
|
|
70268
70275
|
[],
|
|
70269
|
-
{
|
|
70276
|
+
{ pickFocusedOnEnter: true }
|
|
70270
70277
|
);
|
|
70271
70278
|
const selectedFeatures = picked.map((i) => AI_FEATURES[i]);
|
|
70272
70279
|
console.log();
|
|
@@ -70280,7 +70287,7 @@ async function runSetupWizard(fullSetup = false, scope = "user") {
|
|
|
70280
70287
|
const plannedKeys = /* @__PURE__ */ new Map();
|
|
70281
70288
|
console.log(source_default.dim("3. Providers"));
|
|
70282
70289
|
console.log(source_default.bold("Choose providers for each selected feature"));
|
|
70283
|
-
console.log(source_default.dim(
|
|
70290
|
+
console.log(source_default.dim(` Recommended default is highlighted. Press ${source_default.bold("enter")} to pick it, or use ${source_default.bold("space")} to add multiple.`));
|
|
70284
70291
|
console.log();
|
|
70285
70292
|
for (const feature of selectedFeatures) {
|
|
70286
70293
|
const keysForFeature = [];
|
|
@@ -70297,9 +70304,10 @@ async function runSetupWizard(fullSetup = false, scope = "user") {
|
|
|
70297
70304
|
return `${choice.label} ${source_default.dim(`- ${choice.desc}`)} ${keyHint}`;
|
|
70298
70305
|
});
|
|
70299
70306
|
const pickedProviders = await promptMultiSelect(
|
|
70300
|
-
source_default.cyan(" Providers (
|
|
70307
|
+
source_default.cyan(" Providers (arrow + enter picks one, space adds more): "),
|
|
70301
70308
|
providerLabels,
|
|
70302
|
-
defaultSelected
|
|
70309
|
+
defaultSelected,
|
|
70310
|
+
{ pickFocusedOnEnter: true }
|
|
70303
70311
|
);
|
|
70304
70312
|
const selectedChoices = pickedProviders.map((i) => feature.providerChoices[i]);
|
|
70305
70313
|
const defaultChoice = selectedChoices.find((choice) => choice.defaultFor);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeframe/cli",
|
|
3
|
-
"version": "0.91.
|
|
3
|
+
"version": "0.91.3",
|
|
4
4
|
"description": "VibeFrame CLI - natural language video editing from the terminal",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -183,8 +183,8 @@
|
|
|
183
183
|
"tsx": "^4.21.0",
|
|
184
184
|
"typescript": "^5.3.3",
|
|
185
185
|
"vitest": "^1.2.2",
|
|
186
|
-
"@vibeframe/ai-providers": "0.91.
|
|
187
|
-
"@vibeframe/core": "0.91.
|
|
186
|
+
"@vibeframe/ai-providers": "0.91.3",
|
|
187
|
+
"@vibeframe/core": "0.91.3"
|
|
188
188
|
},
|
|
189
189
|
"engines": {
|
|
190
190
|
"node": ">=20"
|