@cspeach/cli 1.1.28 → 1.1.29

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/ui/app.js CHANGED
@@ -24,6 +24,7 @@ import { RewindPanel } from './rewind-panel.js';
24
24
  import { rewindEmitter } from './rewind-emitter.js';
25
25
  import { todoEmitter } from './todo-emitter.js';
26
26
  import { approvalEmitter } from './approval-emitter.js';
27
+ import { useHoldRawMode } from './widgets/hold-raw-mode.js';
27
28
  import { SapStateContext, globalStore } from './sap-state-store.js';
28
29
  import { coachingPickerEmitter } from './coaching-picker-emitter.js';
29
30
  import { CoachingPicker } from './widgets/coaching-picker.js';
@@ -66,6 +67,9 @@ export function isAskingOccupant(occupant) {
66
67
  * The terminal's native scrollback handles everything above the live area.
67
68
  */
68
69
  export function App({ chunkEmitter, onSubmit, onSlashTrigger, onHistoryTrigger, getToolCalls, getTodos, getRewindCandidates, onRewindRestore, sapRole, sapAlias, onInterrupt, onExitRequest }) {
70
+ // 1.1.29 — keep raw mode held across card hand-overs (Windows froze the
71
+ // approval card when Ink released it between cards). See hold-raw-mode.ts.
72
+ useHoldRawMode();
69
73
  const [pendingApproval, setPendingApproval] = useState(null);
70
74
  // Task 3 review I1(b): synchronous mirror + monotonic remount key — the same
71
75
  // I2 treatment ask-question already has. A second approval request arriving
@@ -0,0 +1,26 @@
1
+ import { useEffect } from 'react';
2
+ import { useStdin } from 'ink';
3
+ /**
4
+ * Hold one Ink raw-mode reference for the life of the component (1.1.29).
5
+ *
6
+ * Ink ref-counts raw mode: every active useInput takes a reference, and when
7
+ * the count falls to 0 Ink calls setRawMode(false) + unref on stdin. The main
8
+ * input boxes go inactive while a card is open, so at every card hand-over
9
+ * (plan card closes → per-change approval card opens) the count touched 0 and
10
+ * back. On Windows that release leaves a cooked console read pending and
11
+ * stdin delivers no more keys — the approval card sat frozen (live, 1.1.28;
12
+ * reproduced in a ConPTY replay, and fixed there by suppressing the release).
13
+ *
14
+ * Mounted once at the <App> root, this reference keeps the count above 0
15
+ * until the app unmounts, so hand-overs never release raw mode. It reads no
16
+ * keys itself: key routing is unchanged.
17
+ */
18
+ export function useHoldRawMode() {
19
+ const { setRawMode, isRawModeSupported } = useStdin();
20
+ useEffect(() => {
21
+ if (!isRawModeSupported)
22
+ return;
23
+ setRawMode(true);
24
+ return () => { setRawMode(false); };
25
+ }, [isRawModeSupported, setRawMode]);
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cspeach/cli",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "description": "CSPeach — AI-assisted ABAP development CLI. Direct SAP access, 34 skills, safety gates.",
5
5
  "keywords": [
6
6
  "abap",