auq-mcp-server 2.2.1 → 2.2.2

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.1",
3
+ "version": "2.2.2",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "auq": "dist/bin/auq.js"
@@ -67,6 +67,10 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
67
67
  sessionRequest.questions.length,
68
68
  onProgress,
69
69
  ]);
70
+ // Reset focused option to first when switching between questions
71
+ useEffect(() => {
72
+ setFocusedOptionIndex(0);
73
+ }, [currentQuestionIndex]);
70
74
  // Handle option selection (single-select mode)
71
75
  const handleSelectOption = (label) => {
72
76
  setAnswers((prev) => {
@@ -343,6 +347,11 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
343
347
  // Don't handle navigation when showing review, submitting, or confirming rejection
344
348
  if (showReview || submitting || showRejectionConfirm)
345
349
  return;
350
+ // Derive text-input state from both focusContext and focusedOptionIndex
351
+ // focusContext may lag by one render cycle (set via useEffect in OptionsList)
352
+ // focusedOptionIndex is set directly and always up-to-date
353
+ const isInTextInput = focusContext !== "option" ||
354
+ focusedOptionIndex >= currentQuestion.options.length;
346
355
  // Esc key - show rejection confirmation
347
356
  if (key.escape) {
348
357
  setShowRejectionConfirm(true);
@@ -352,7 +361,7 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
352
361
  if (input.toLowerCase() === "r" &&
353
362
  key.ctrl &&
354
363
  hasAnyRecommendedInSession &&
355
- focusContext === "option") {
364
+ !isInTextInput) {
356
365
  // Auto-fill all unanswered questions with recommended options
357
366
  const newAnswers = new Map(answers);
358
367
  for (let i = 0; i < sessionRequest.questions.length; i++) {
@@ -388,7 +397,7 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
388
397
  // R key: Select recommended options for current question
389
398
  if (input.toLowerCase() === "r" &&
390
399
  !key.ctrl &&
391
- focusContext === "option" &&
400
+ !isInTextInput &&
392
401
  hasRecommendedOptions) {
393
402
  const question = currentQuestion;
394
403
  const recommendedOptions = question.options.filter((opt) => isRecommendedOption(opt.label));
@@ -411,11 +420,6 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
411
420
  }
412
421
  return;
413
422
  }
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;
419
423
  // Tab/Shift+Tab: Global question navigation
420
424
  if (key.tab && !isInTextInput) {
421
425
  if (key.shift) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auq-mcp-server",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "auq": "dist/bin/auq.js"