@vibeframe/cli 0.103.0 → 0.103.1

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -5
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -32811,6 +32811,19 @@ var init_open_url = __esm({
32811
32811
  // src/utils/tty.ts
32812
32812
  import { createInterface as createInterface2 } from "node:readline";
32813
32813
  import { ReadStream } from "node:tty";
32814
+ function stripAnsi2(value) {
32815
+ return value.replace(ANSI_RE, "");
32816
+ }
32817
+ function terminalColumns() {
32818
+ return process.stdout.columns && process.stdout.columns > 0 ? process.stdout.columns : 80;
32819
+ }
32820
+ function fitOptionToLine(value, prefixColumns) {
32821
+ const maxColumns = Math.max(8, terminalColumns() - prefixColumns - 1);
32822
+ const visible = stripAnsi2(value);
32823
+ if (visible.length <= maxColumns) return value;
32824
+ if (maxColumns <= ELLIPSIS.length) return ELLIPSIS.slice(0, maxColumns);
32825
+ return `${visible.slice(0, maxColumns - ELLIPSIS.length)}${ELLIPSIS}`;
32826
+ }
32814
32827
  function splitTTYInput(chunk) {
32815
32828
  const tokens = [];
32816
32829
  for (let i = 0; i < chunk.length; i++) {
@@ -32931,7 +32944,8 @@ async function promptSelect(_question, options, defaultIndex = 0, opts = {}) {
32931
32944
  }
32932
32945
  for (let i = 0; i < options.length; i++) {
32933
32946
  const marker = i === selected ? "\x1B[36m\u276F\x1B[0m" : " ";
32934
- const text = i === selected ? `\x1B[1m${options[i]}\x1B[0m` : options[i];
32947
+ const optionText = fitOptionToLine(options[i], 5);
32948
+ const text = i === selected ? `\x1B[1m${optionText}\x1B[0m` : optionText;
32935
32949
  process.stdout.write(`\x1B[2K ${marker} ${text}
32936
32950
  `);
32937
32951
  }
@@ -33010,7 +33024,8 @@ async function promptConfirm(question, defaultYes = true) {
33010
33024
  }
33011
33025
  for (let i = 0; i < options.length; i++) {
33012
33026
  const marker = i === selected ? "\x1B[36m\u276F\x1B[0m" : " ";
33013
- const text = i === selected ? `\x1B[1m${options[i]}\x1B[0m` : options[i];
33027
+ const optionText = fitOptionToLine(options[i], 5);
33028
+ const text = i === selected ? `\x1B[1m${optionText}\x1B[0m` : optionText;
33014
33029
  process.stdout.write(`\x1B[2K ${marker} ${text}
33015
33030
  `);
33016
33031
  }
@@ -33078,7 +33093,8 @@ async function promptMultiSelect(_question, options, defaultSelected = [], opts
33078
33093
  for (let i = 0; i < options.length; i++) {
33079
33094
  const pointer = i === cursor ? "\x1B[36m\u276F\x1B[0m" : " ";
33080
33095
  const box = selected[i] ? "\x1B[36m[x]\x1B[0m" : "[ ]";
33081
- const text = i === cursor ? `\x1B[1m${options[i]}\x1B[0m` : options[i];
33096
+ const optionText = fitOptionToLine(options[i], 9);
33097
+ const text = i === cursor ? `\x1B[1m${optionText}\x1B[0m` : optionText;
33082
33098
  process.stdout.write(`\x1B[2K ${pointer} ${box} ${text}
33083
33099
  `);
33084
33100
  }
@@ -33170,12 +33186,14 @@ async function promptMultiSelect(_question, options, defaultSelected = [], opts
33170
33186
  }
33171
33187
  return [...picked].sort((a, b) => a - b);
33172
33188
  }
33173
- var ttyStream;
33189
+ var ttyStream, ANSI_RE, ELLIPSIS;
33174
33190
  var init_tty = __esm({
33175
33191
  "src/utils/tty.ts"() {
33176
33192
  "use strict";
33177
33193
  init_open_url();
33178
33194
  ttyStream = null;
33195
+ ANSI_RE = new RegExp(`${String.fromCharCode(27)}\\[[0-?]*[ -/]*[@-~]`, "g");
33196
+ ELLIPSIS = "...";
33179
33197
  }
33180
33198
  });
33181
33199
 
@@ -71307,7 +71325,7 @@ init_source();
71307
71325
  // package.json
71308
71326
  var package_default = {
71309
71327
  name: "@vibeframe/cli",
71310
- version: "0.103.0",
71328
+ version: "0.103.1",
71311
71329
  description: "VibeFrame CLI - natural language video editing from the terminal",
71312
71330
  private: false,
71313
71331
  license: "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeframe/cli",
3
- "version": "0.103.0",
3
+ "version": "0.103.1",
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.103.0",
187
- "@vibeframe/core": "0.103.0"
186
+ "@vibeframe/ai-providers": "0.103.1",
187
+ "@vibeframe/core": "0.103.1"
188
188
  },
189
189
  "engines": {
190
190
  "node": ">=20"