auq-mcp-server 3.3.1 → 3.3.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
|
@@ -244,7 +244,10 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
244
244
|
return (React.createElement(Text, { backgroundColor: rowBg, bold: isCustomInputFocused || isSelected, color: rowColor }, fitRow(mainLine)));
|
|
245
245
|
})(),
|
|
246
246
|
isCustomInputFocused && onCustomChange && (React.createElement(Box, { borderColor: theme.components.input.borderFocused, borderStyle: "round", marginBottom: 1, marginLeft: 2, marginTop: 0, paddingX: 1, paddingY: 0 },
|
|
247
|
-
React.createElement(MultiLineTextInput, { isFocused: true, onChange: onCustomChange, onSubmit:
|
|
247
|
+
React.createElement(MultiLineTextInput, { isFocused: true, onChange: onCustomChange, onSubmit: () => {
|
|
248
|
+
onCustomChange?.(customValue);
|
|
249
|
+
onAdvance?.();
|
|
250
|
+
}, placeholder: t("input.placeholder"), value: customValue }))),
|
|
248
251
|
!isCustomInputFocused && customValue && (React.createElement(Box, { marginLeft: 2, marginTop: 0 },
|
|
249
252
|
React.createElement(Text, { color: theme.components.options.hint, dimColor: true },
|
|
250
253
|
customLines.slice(0, 3).map((line, idx) => (React.createElement(React.Fragment, { key: idx },
|
|
@@ -275,6 +278,7 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
275
278
|
})(),
|
|
276
279
|
isElaborateFocused && onElaborateTextChange && (React.createElement(Box, { borderColor: theme.components.input.borderFocused, borderStyle: "round", marginBottom: 1, marginLeft: 2, marginTop: 0, paddingX: 1, paddingY: 0 },
|
|
277
280
|
React.createElement(MultiLineTextInput, { enterSubmits: true, isFocused: true, onChange: onElaborateTextChange, onSubmit: () => {
|
|
281
|
+
onElaborateTextChange?.(elaborateText);
|
|
278
282
|
// Enter/Tab submits and advance
|
|
279
283
|
// Only call onElaborateSelect if no text (to toggle mark on)
|
|
280
284
|
// If text exists, mark is already set via onElaborateTextChange
|
|
@@ -174,4 +174,24 @@ describe("StepperView SessionUIState boundary", () => {
|
|
|
174
174
|
expect(snapshotState.answers.get(0)?.selectedOption).toBe("Python");
|
|
175
175
|
expect(snapshotState.answers.get(0)?.selectedOption).not.toBe("TypeScript");
|
|
176
176
|
});
|
|
177
|
+
it("custom text is preserved in answers when advancing via Tab", async () => {
|
|
178
|
+
const onStateSnapshot = vi.fn();
|
|
179
|
+
const initialState = {
|
|
180
|
+
currentQuestionIndex: 0,
|
|
181
|
+
answers: new Map([[0, { customText: "my custom answer" }]]),
|
|
182
|
+
elaborateMarks: new Map(),
|
|
183
|
+
focusContext: "option",
|
|
184
|
+
focusedOptionIndex: 0,
|
|
185
|
+
showReview: false,
|
|
186
|
+
};
|
|
187
|
+
const instance = renderStepper({ onStateSnapshot, initialState });
|
|
188
|
+
instance.stdin.write("\t");
|
|
189
|
+
await vi.waitFor(() => {
|
|
190
|
+
expect(onStateSnapshot).toHaveBeenCalled();
|
|
191
|
+
const lastCall = onStateSnapshot.mock.calls[onStateSnapshot.mock.calls.length - 1];
|
|
192
|
+
const [, snapshotState] = lastCall;
|
|
193
|
+
expect(snapshotState.answers.get(0)?.customText).toBe("my custom answer");
|
|
194
|
+
expect(snapshotState.currentQuestionIndex).toBe(1);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
177
197
|
});
|
|
@@ -89,6 +89,7 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
89
89
|
setFocusedIndex(Math.max(0, options.length - 1));
|
|
90
90
|
}
|
|
91
91
|
else if (key.name === "tab" && !key.shift) {
|
|
92
|
+
onCustomChange?.(customValue);
|
|
92
93
|
onAdvance?.();
|
|
93
94
|
}
|
|
94
95
|
else if (key.name === "return") {
|
|
@@ -99,6 +100,7 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
99
100
|
}
|
|
100
101
|
else {
|
|
101
102
|
// Enter: advance to next question
|
|
103
|
+
onCustomChange?.(customValue);
|
|
102
104
|
onAdvance?.();
|
|
103
105
|
}
|
|
104
106
|
}
|
|
@@ -116,6 +118,10 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
116
118
|
setFocusedIndex(customInputIndex);
|
|
117
119
|
}
|
|
118
120
|
else if (key.name === "tab" && !key.shift) {
|
|
121
|
+
onElaborateTextChange?.(elaborateText);
|
|
122
|
+
if (!elaborateText.trim()) {
|
|
123
|
+
onElaborateSelect?.();
|
|
124
|
+
}
|
|
119
125
|
onAdvance?.();
|
|
120
126
|
}
|
|
121
127
|
else if (key.name === "return") {
|
|
@@ -126,6 +132,7 @@ export const OptionsList = ({ isFocused, onSelect, options, selectedOption, show
|
|
|
126
132
|
}
|
|
127
133
|
else {
|
|
128
134
|
// Enter: advance to next question
|
|
135
|
+
onElaborateTextChange?.(elaborateText);
|
|
129
136
|
if (!elaborateText.trim()) {
|
|
130
137
|
onElaborateSelect?.();
|
|
131
138
|
}
|