@yagni-app/code-staging 1.0.3-staging.1221.1 → 1.0.3-staging.1222.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.
@@ -309,14 +309,31 @@ class QuestionComponent {
309
309
  const indexText = `${this.otherIndex + 1}.`.padEnd(indexPad);
310
310
  if (isSelected) {
311
311
  // Inline input: show current text + inverse-video cursor at end.
312
+ // Wraps like a growing text field (the prompt input), never truncated.
312
313
  const cursor = "\x1b[7m \x1b[27m"; // space with reverse video = visible cursor
314
+ const gutter = `${marker} ${indexText}`;
315
+ const gutterWidth = visibleWidth(gutter);
316
+ // Reserve one column so the trailing cursor always fits on the last line.
317
+ const wrapWidth = Math.max(1, width - gutterWidth - 1);
313
318
  const text = this.otherValue || " ";
314
- lines.push(clampLine(`${marker} ${indexText}${text}${cursor}`, width));
319
+ const wrapped = wrapTextWithAnsi(text, wrapWidth);
320
+ wrapped.forEach((w, i) => {
321
+ const prefix = i === 0 ? gutter : " ".repeat(gutterWidth);
322
+ const body = i === wrapped.length - 1 ? `${w}${cursor}` : w;
323
+ lines.push(clampLine(prefix + body, width));
324
+ });
315
325
  }
316
326
  else {
317
327
  // Not focused: show placeholder or current text in dim.
318
328
  const display = this.otherValue || "(type a custom answer)";
319
- lines.push(clampLine(`${marker} ${indexText}${t.fg("dim", display)}`, width));
329
+ const gutter = `${marker} ${indexText}`;
330
+ const gutterWidth = visibleWidth(gutter);
331
+ const wrapWidth = Math.max(1, width - gutterWidth);
332
+ const wrapped = wrapTextWithAnsi(t.fg("dim", display), wrapWidth);
333
+ wrapped.forEach((w, i) => {
334
+ const prefix = i === 0 ? gutter : " ".repeat(gutterWidth);
335
+ lines.push(clampLine(prefix + w, width));
336
+ });
320
337
  }
321
338
  }
322
339
  handleInput(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yagni-app/code-staging",
3
- "version": "1.0.3-staging.1221.1",
3
+ "version": "1.0.3-staging.1222.1",
4
4
  "description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
@@ -41,5 +41,5 @@
41
41
  "turndown": "^7.2.4",
42
42
  "typebox": "^1.3.15"
43
43
  },
44
- "yagniSourceSha": "e70d419fe0cc56fc3c36908caaebe865357ce867"
44
+ "yagniSourceSha": "180f2fe5eda13aabc43dde056df32b5a4e4a6195"
45
45
  }