auq-mcp-server 3.2.6 → 3.2.8
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
|
@@ -149,8 +149,11 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
|
-
// Single-select: Enter selects AND advances
|
|
153
|
-
|
|
152
|
+
// Single-select: Enter selects (without toggle) AND advances
|
|
153
|
+
const label = options[focusedIndex].label;
|
|
154
|
+
if (selectedOption !== label) {
|
|
155
|
+
onSelect(label);
|
|
156
|
+
}
|
|
154
157
|
if (onAdvance) {
|
|
155
158
|
onAdvance();
|
|
156
159
|
}
|
|
@@ -369,11 +369,24 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
|
|
|
369
369
|
};
|
|
370
370
|
// Handle elaborate text change
|
|
371
371
|
const handleElaborateTextChange = (text) => {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
372
|
+
if (!text.trim()) {
|
|
373
|
+
// Auto-remove elaborate mark when text is cleared
|
|
374
|
+
setElaborateMarks((prev) => {
|
|
375
|
+
if (prev.has(currentQuestionIndex)) {
|
|
376
|
+
const newMarks = new Map(prev);
|
|
377
|
+
newMarks.delete(currentQuestionIndex);
|
|
378
|
+
return newMarks;
|
|
379
|
+
}
|
|
380
|
+
return prev;
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
setElaborateMarks((prev) => {
|
|
385
|
+
const newMarks = new Map(prev);
|
|
386
|
+
newMarks.set(currentQuestionIndex, text);
|
|
387
|
+
return newMarks;
|
|
388
|
+
});
|
|
389
|
+
}
|
|
377
390
|
};
|
|
378
391
|
// Keyboard handling for abandoned confirmation dialog
|
|
379
392
|
useInput((input, key) => {
|
|
@@ -573,5 +586,5 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
|
|
|
573
586
|
return (React.createElement(ReviewScreen, { isSubmitting: submitting, answers: answers, elapsedLabel: elapsedLabel, onConfirm: handleConfirm, onGoBack: handleGoBack, questions: sessionRequest.questions, sessionId: sessionId, elaborateMarks: elaborateMarks }));
|
|
574
587
|
}
|
|
575
588
|
// Show question display (default)
|
|
576
|
-
return (React.createElement(QuestionDisplay, { currentQuestion: currentQuestion, currentQuestionIndex: currentQuestionIndex, customAnswer: currentAnswer?.customText, elapsedLabel: elapsedLabel, onAdvanceToNext: handleAdvanceToNext, onChangeCustomAnswer: handleChangeCustomAnswer, onSelectOption: handleSelectOption, onToggleOption: handleToggleOption, multiSelect: currentQuestion.multiSelect, questions: sessionRequest.questions, selectedOption: currentAnswer?.selectedOption, answers: answers, focusContext: focusContext, onFocusContextChange: setFocusContext, focusedOptionIndex: focusedOptionIndex, onFocusedOptionIndexChange: setFocusedOptionIndex, workingDirectory: sessionRequest.workingDirectory, onRecommendedDetected: setHasRecommendedOptions, hasRecommendedOptions: hasRecommendedOptions, hasAnyRecommendedInSession: hasAnyRecommendedInSession, elaborateMarks: elaborateMarks, onElaborateSelect: handleElaborateSelect, elaborateText: elaborateMarks.get(currentQuestionIndex) || "", onElaborateTextChange: handleElaborateTextChange, showSessionSwitching:
|
|
589
|
+
return (React.createElement(QuestionDisplay, { currentQuestion: currentQuestion, currentQuestionIndex: currentQuestionIndex, customAnswer: currentAnswer?.customText, elapsedLabel: elapsedLabel, onAdvanceToNext: handleAdvanceToNext, onChangeCustomAnswer: handleChangeCustomAnswer, onSelectOption: handleSelectOption, onToggleOption: handleToggleOption, multiSelect: currentQuestion.multiSelect, questions: sessionRequest.questions, selectedOption: currentAnswer?.selectedOption, answers: answers, focusContext: focusContext, onFocusContextChange: setFocusContext, focusedOptionIndex: focusedOptionIndex, onFocusedOptionIndexChange: setFocusedOptionIndex, workingDirectory: sessionRequest.workingDirectory, onRecommendedDetected: setHasRecommendedOptions, hasRecommendedOptions: hasRecommendedOptions, hasAnyRecommendedInSession: hasAnyRecommendedInSession, elaborateMarks: elaborateMarks, onElaborateSelect: handleElaborateSelect, elaborateText: elaborateMarks.get(currentQuestionIndex) || "", onElaborateTextChange: handleElaborateTextChange, showSessionSwitching: !showReview && !showRejectionConfirm }));
|
|
577
590
|
};
|
|
@@ -82,7 +82,8 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
82
82
|
setFocusedIndex(newIndex);
|
|
83
83
|
return;
|
|
84
84
|
}
|
|
85
|
-
// When custom input is focused,
|
|
85
|
+
// When custom input is focused, only intercept navigation keys
|
|
86
|
+
// Let native <input> handle character input (IME, clipboard, etc.)
|
|
86
87
|
if (isCustomInputFocused) {
|
|
87
88
|
if (key.name === "escape") {
|
|
88
89
|
setFocusedIndex(Math.max(0, options.length - 1));
|
|
@@ -100,22 +101,10 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
100
101
|
onAdvance?.();
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
|
-
else if (key.name === "backspace" || key.name === "delete") {
|
|
104
|
-
if (customValue.length > 0) {
|
|
105
|
-
onCustomChange?.(customValue.slice(0, -1));
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
else if (key.sequence && !key.ctrl && !key.meta && key.name !== "up" && key.name !== "down") {
|
|
109
|
-
const sanitized = key.sequence
|
|
110
|
-
.replace(/\x1b?\[<[\d;]*[Mm]/g, '')
|
|
111
|
-
.replace(/\[?[OI]/g, '');
|
|
112
|
-
if (sanitized.length > 0) {
|
|
113
|
-
onCustomChange?.(customValue + sanitized);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
104
|
return;
|
|
117
105
|
}
|
|
118
|
-
// When elaborate input is focused,
|
|
106
|
+
// When elaborate input is focused, only intercept navigation keys
|
|
107
|
+
// Let native <input> handle character input (IME, clipboard, etc.)
|
|
119
108
|
if (isElaborateFocused) {
|
|
120
109
|
if (key.name === "escape") {
|
|
121
110
|
setFocusedIndex(customInputIndex);
|
|
@@ -136,19 +125,6 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
136
125
|
onAdvance?.();
|
|
137
126
|
}
|
|
138
127
|
}
|
|
139
|
-
else if (key.name === "backspace" || key.name === "delete") {
|
|
140
|
-
if (elaborateText.length > 0) {
|
|
141
|
-
onElaborateTextChange?.(elaborateText.slice(0, -1));
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
else if (key.sequence && !key.ctrl && !key.meta && key.name !== "up" && key.name !== "down") {
|
|
145
|
-
const sanitized = key.sequence
|
|
146
|
-
.replace(/\x1b?\[<[\d;]*[Mm]/g, '')
|
|
147
|
-
.replace(/\[?[OI]/g, '');
|
|
148
|
-
if (sanitized.length > 0) {
|
|
149
|
-
onElaborateTextChange?.(elaborateText + sanitized);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
128
|
return;
|
|
153
129
|
}
|
|
154
130
|
// Spacebar: Select/toggle WITHOUT advancing (works for both modes)
|
|
@@ -176,8 +152,11 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
176
152
|
}
|
|
177
153
|
}
|
|
178
154
|
else {
|
|
179
|
-
// Single-select: Enter selects AND advances
|
|
180
|
-
|
|
155
|
+
// Single-select: Enter selects (without toggle) AND advances
|
|
156
|
+
const label = options[focusedIndex].label;
|
|
157
|
+
if (selectedOption !== label) {
|
|
158
|
+
onSelect(label);
|
|
159
|
+
}
|
|
181
160
|
if (onAdvance) {
|
|
182
161
|
onAdvance();
|
|
183
162
|
}
|
|
@@ -254,7 +233,7 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
254
233
|
marginTop: 0,
|
|
255
234
|
paddingX: 1,
|
|
256
235
|
paddingY: 0,
|
|
257
|
-
}, children:
|
|
236
|
+
}, children: _jsx("input", { value: customValue, onChange: (val) => onCustomChange?.(val), onSubmit: () => { }, placeholder: t("input.placeholder"), focused: true }) })), !isCustomInputFocused && customValue && (_jsx("box", { style: { marginLeft: 2, marginTop: 0 }, children: _jsxs("text", { style: { fg: theme.components.options.hint, attributes: TextAttributes.DIM }, children: [" ", customLines.slice(0, 3).join("\n "), customLines.length > 3 ? "\n \u2026" : ""] }) }))] }) })), showCustomInput && (_jsx("box", { style: { marginTop: 0 }, children: _jsxs("box", { style: { flexDirection: "column" }, children: [(() => {
|
|
258
237
|
const rowBg = isElaborateFocused
|
|
259
238
|
? theme.components.options.focusedBg
|
|
260
239
|
: isElaborateMarked
|
|
@@ -283,5 +262,5 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
283
262
|
marginTop: 0,
|
|
284
263
|
paddingX: 1,
|
|
285
264
|
paddingY: 0,
|
|
286
|
-
}, children:
|
|
265
|
+
}, children: _jsx("input", { value: elaborateText, onChange: (val) => onElaborateTextChange?.(val), onSubmit: () => { }, placeholder: t("input.elaboratePlaceholder"), focused: true }) })), !isElaborateFocused && elaborateText && (_jsx("box", { style: { marginLeft: 2, marginTop: 0 }, children: _jsxs("text", { style: { fg: theme.components.options.hint, attributes: TextAttributes.DIM }, children: [" ", elaborateLines.slice(0, 3).join("\n "), elaborateLines.length > 3 ? "\n \u2026" : ""] }) }))] }) }))] }));
|
|
287
266
|
};
|
|
@@ -358,11 +358,24 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
|
|
|
358
358
|
};
|
|
359
359
|
// Handle elaborate text change
|
|
360
360
|
const handleElaborateTextChange = (text) => {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
361
|
+
if (!text.trim()) {
|
|
362
|
+
// Auto-remove elaborate mark when text is cleared
|
|
363
|
+
setElaborateMarks((prev) => {
|
|
364
|
+
if (prev.has(currentQuestionIndex)) {
|
|
365
|
+
const newMarks = new Map(prev);
|
|
366
|
+
newMarks.delete(currentQuestionIndex);
|
|
367
|
+
return newMarks;
|
|
368
|
+
}
|
|
369
|
+
return prev;
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
setElaborateMarks((prev) => {
|
|
374
|
+
const newMarks = new Map(prev);
|
|
375
|
+
newMarks.set(currentQuestionIndex, text);
|
|
376
|
+
return newMarks;
|
|
377
|
+
});
|
|
378
|
+
}
|
|
366
379
|
};
|
|
367
380
|
// Keyboard handling for abandoned confirmation dialog
|
|
368
381
|
useKeyboard((key) => {
|
|
@@ -506,5 +519,5 @@ export const StepperView = ({ onComplete, onProgress, hasMultipleSessions, initi
|
|
|
506
519
|
return (_jsx("box", { style: { flexDirection: "column", paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1 }, children: _jsx(ReviewScreen, { isSubmitting: submitting, answers: answers, elapsedLabel: elapsedLabel, onConfirm: handleConfirm, onGoBack: handleGoBack, questions: sessionRequest.questions, sessionId: sessionId, elaborateMarks: elaborateMarks }) }));
|
|
507
520
|
}
|
|
508
521
|
// Show question display (default)
|
|
509
|
-
return (_jsx("box", { style: { flexDirection: "column", paddingLeft: 2, paddingRight: 2 }, children: _jsx(QuestionDisplay, { currentQuestion: currentQuestion, currentQuestionIndex: currentQuestionIndex, customAnswer: currentAnswer?.customText, elapsedLabel: elapsedLabel, onAdvanceToNext: handleAdvanceToNext, onChangeCustomAnswer: handleChangeCustomAnswer, onSelectOption: handleSelectOption, onToggleOption: handleToggleOption, multiSelect: currentQuestion.multiSelect, questions: sessionRequest.questions, selectedOption: currentAnswer?.selectedOption, answers: answers, focusContext: focusContext, onFocusContextChange: setFocusContext, focusedOptionIndex: focusedOptionIndex, onFocusedOptionIndexChange: setFocusedOptionIndex, workingDirectory: sessionRequest.workingDirectory, onRecommendedDetected: setHasRecommendedOptions, hasRecommendedOptions: hasRecommendedOptions, hasAnyRecommendedInSession: hasAnyRecommendedInSession, elaborateMarks: elaborateMarks, onElaborateSelect: handleElaborateSelect, elaborateText: elaborateMarks.get(currentQuestionIndex) || "", onElaborateTextChange: handleElaborateTextChange, onSelectIndex: (idx) => setCurrentQuestionIndex(Math.max(0, Math.min(idx, sessionRequest.questions.length - 1))), showSessionSwitching:
|
|
522
|
+
return (_jsx("box", { style: { flexDirection: "column", paddingLeft: 2, paddingRight: 2 }, children: _jsx(QuestionDisplay, { currentQuestion: currentQuestion, currentQuestionIndex: currentQuestionIndex, customAnswer: currentAnswer?.customText, elapsedLabel: elapsedLabel, onAdvanceToNext: handleAdvanceToNext, onChangeCustomAnswer: handleChangeCustomAnswer, onSelectOption: handleSelectOption, onToggleOption: handleToggleOption, multiSelect: currentQuestion.multiSelect, questions: sessionRequest.questions, selectedOption: currentAnswer?.selectedOption, answers: answers, focusContext: focusContext, onFocusContextChange: setFocusContext, focusedOptionIndex: focusedOptionIndex, onFocusedOptionIndexChange: setFocusedOptionIndex, workingDirectory: sessionRequest.workingDirectory, onRecommendedDetected: setHasRecommendedOptions, hasRecommendedOptions: hasRecommendedOptions, hasAnyRecommendedInSession: hasAnyRecommendedInSession, elaborateMarks: elaborateMarks, onElaborateSelect: handleElaborateSelect, elaborateText: elaborateMarks.get(currentQuestionIndex) || "", onElaborateTextChange: handleElaborateTextChange, onSelectIndex: (idx) => setCurrentQuestionIndex(Math.max(0, Math.min(idx, sessionRequest.questions.length - 1))), showSessionSwitching: !showReview && !showRejectionConfirm }) }));
|
|
510
523
|
};
|