auq-mcp-server 2.2.0 → 2.2.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.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auq-mcp-server",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "auq": "dist/bin/auq.js"
@@ -49,6 +49,8 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
49
49
  const { stdout } = useStdout();
50
50
  const terminalRows = stdout?.rows ?? 24;
51
51
  const [isOverflowing, setIsOverflowing] = useState(false);
52
+ const isOverflowingRef = useRef(isOverflowing);
53
+ isOverflowingRef.current = isOverflowing;
52
54
  // Report progress when question index changes
53
55
  useEffect(() => {
54
56
  if (onProgress) {
@@ -205,14 +207,14 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
205
207
  // Update elapsed time since session creation
206
208
  // IMPORTANT: Pause when content overflows terminal to prevent scroll-snapping
207
209
  useEffect(() => {
208
- if (isOverflowing)
209
- return;
210
210
  const timer = setInterval(() => {
211
+ if (isOverflowingRef.current)
212
+ return;
211
213
  const elapsed = Math.floor((Date.now() - sessionCreatedAt) / 1000);
212
214
  setElapsedSeconds(elapsed >= 0 ? elapsed : 0);
213
215
  }, 1000);
214
216
  return () => clearInterval(timer);
215
- }, [sessionCreatedAt, isOverflowing]);
217
+ }, [sessionCreatedAt]);
216
218
  // Detect overflow: estimate content height vs terminal rows
217
219
  useEffect(() => {
218
220
  const currentQ = sessionRequest.questions[safeIndex];
@@ -409,11 +411,13 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
409
411
  }
410
412
  return;
411
413
  }
414
+ // Derive text-input state from both focusContext and focusedOptionIndex
415
+ // focusContext may lag by one render cycle (set via useEffect in OptionsList)
416
+ // focusedOptionIndex is set directly and always up-to-date
417
+ const isInTextInput = focusContext !== "option" ||
418
+ focusedOptionIndex >= currentQuestion.options.length;
412
419
  // Tab/Shift+Tab: Global question navigation
413
- // Skip when in custom-input or elaborate-input mode - MultiLineTextInput handles Tab via onSubmit
414
- if (key.tab &&
415
- focusContext !== "custom-input" &&
416
- focusContext !== "elaborate-input") {
420
+ if (key.tab && !isInTextInput) {
417
421
  if (key.shift) {
418
422
  setCurrentQuestionIndex((prev) => Math.max(0, prev - 1));
419
423
  }
@@ -422,11 +426,11 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
422
426
  }
423
427
  return;
424
428
  }
425
- const shouldNavigate = focusContext !== "custom-input" && focusContext !== "elaborate-input";
426
- if (shouldNavigate && key.leftArrow && currentQuestionIndex > 0) {
429
+ // Left/Right arrow: question navigation (only when NOT in text input)
430
+ if (!isInTextInput && key.leftArrow && currentQuestionIndex > 0) {
427
431
  setCurrentQuestionIndex((prev) => prev - 1);
428
432
  }
429
- if (shouldNavigate &&
433
+ if (!isInTextInput &&
430
434
  key.rightArrow &&
431
435
  currentQuestionIndex < sessionRequest.questions.length - 1) {
432
436
  setCurrentQuestionIndex((prev) => prev + 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auq-mcp-server",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "auq": "dist/bin/auq.js"