@cspeach/cli 1.1.9 → 1.1.10

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.
@@ -1,6 +1,6 @@
1
1
  // GENERATED FILE — bundled skills for local mode.
2
2
  // Source: https://manifest.cspeach.dev/v1.json
3
- // Generated: 2026-09-17T16:36:01.136Z
3
+ // Generated: 2026-09-17T17:10:00.533Z
4
4
  // Manifest signature verified at build time.
5
5
  export const BUNDLED_SKILLS = {
6
6
  "abap-atc-fix": {
package/dist/ui/footer.js CHANGED
@@ -27,6 +27,8 @@ function appendHistory(line, history) {
27
27
  const PEACH = '#FFCBA4';
28
28
  /** The input prompt — its width feeds the display budget below. */
29
29
  const PROMPT = 'CSPeach › ';
30
+ /** Held multi-line draft: how many of the newest lines are shown above the input. */
31
+ const HELD_LINES_SHOWN = 3;
30
32
  export function Footer({ onSubmit, onSlashTrigger, onHistoryTrigger, onValueChange, prefill, disabled, onNotice, onBufferChange }) {
31
33
  const [value, setValue] = useState('');
32
34
  // Wave1 live-fix (Bug 1, statusline duplication) — the input row must
@@ -203,5 +205,5 @@ export function Footer({ onSubmit, onSlashTrigger, onHistoryTrigger, onValueChan
203
205
  if (disabled) {
204
206
  return (_jsxs(Box, { children: [_jsx(Text, { bold: true, color: PEACH, children: PROMPT }), _jsx(Text, { dimColor: true, children: "(answer above to continue)" })] }));
205
207
  }
206
- return (_jsxs(Box, { flexDirection: "column", children: [buffer.length > 0 && (_jsxs(Text, { dimColor: true, wrap: "truncate-end", children: ["\u2026 ", buffer.length, " line", buffer.length === 1 ? '' : 's', " pending (Enter sends, \\ continues)"] })), _jsxs(Box, { children: [_jsx(Text, { bold: true, color: PEACH, children: PROMPT }), _jsx(TextInput, { value: value, onChange: setValue, onSubmit: handleSubmit, onPasteLines: handlePasteLines, maxDisplayWidth: inputBudget })] })] }));
208
+ return (_jsxs(Box, { flexDirection: "column", children: [buffer.length > 0 && (_jsxs(Box, { flexDirection: "column", children: [buffer.length > HELD_LINES_SHOWN && (_jsxs(Text, { dimColor: true, wrap: "truncate-end", children: ["\u2026 ", buffer.length - HELD_LINES_SHOWN, " earlier line", buffer.length - HELD_LINES_SHOWN === 1 ? '' : 's'] })), buffer.slice(-HELD_LINES_SHOWN).map((line, i) => (_jsxs(Text, { dimColor: true, wrap: "truncate-end", children: ['│ ', line] }, `held-${buffer.length}-${i}`))), _jsxs(Text, { dimColor: true, wrap: "truncate-end", children: [buffer.length, " line", buffer.length === 1 ? '' : 's', " pending \u2014 Enter sends all, Esc discards, \\ continues"] })] })), _jsxs(Box, { children: [_jsx(Text, { bold: true, color: PEACH, children: PROMPT }), _jsx(TextInput, { value: value, onChange: setValue, onSubmit: handleSubmit, onPasteLines: handlePasteLines, maxDisplayWidth: inputBudget })] })] }));
207
209
  }
@@ -181,11 +181,22 @@ export function PasteSafeTextInput({ value: originalValue, placeholder = '', foc
181
181
  nextCursorOffset = Math.max(0, cursorRef.current + cleanInput.length - (lastNl + 1));
182
182
  }
183
183
  else {
184
+ // 2026-09-17 — a single-line field (question form, question modal:
185
+ // no onPasteLines) receiving a multi-line paste. Windows Terminal
186
+ // delivers pasted newlines as bare \r in raw mode; left in the value
187
+ // they render as carriage returns (each line drawn over the last, so
188
+ // only the tail of the final line is visible) and reach the model as
189
+ // stray control characters. Join the lines with one space instead:
190
+ // the whole paste is visible and the answer is clean. Fields that do
191
+ // handle lines (the main prompt) never take this branch.
192
+ const insert = (input.includes('\n') || input.includes('\r'))
193
+ ? input.replace(/\r\n/g, '\n').replace(/\r/g, '\n').replace(/\n+/g, ' ')
194
+ : input;
184
195
  nextValue =
185
196
  currentValue.slice(0, cursorRef.current) +
186
- input +
197
+ insert +
187
198
  currentValue.slice(cursorRef.current, currentValue.length);
188
- nextCursorOffset += input.length;
199
+ nextCursorOffset += insert.length;
189
200
  }
190
201
  if (nextCursorOffset < 0)
191
202
  nextCursorOffset = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cspeach/cli",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "CSPeach — AI-assisted ABAP development CLI. Direct SAP access, 34 skills, safety gates.",
5
5
  "keywords": [
6
6
  "abap",