@xynogen/pix-ask 0.2.5 → 0.2.6
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/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/questionnaire.ts +1 -1
- package/src/rpc.ts +1 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -106,7 +106,7 @@ export default function registerAsk(pi: ExtensionAPI): void {
|
|
|
106
106
|
renderCall(args, theme) {
|
|
107
107
|
const questions = Array.isArray(args.questions) ? args.questions : [];
|
|
108
108
|
const count = questions.length;
|
|
109
|
-
const firstQ =
|
|
109
|
+
const firstQ = questions[0]?.question ?? "";
|
|
110
110
|
let text = theme.fg("toolTitle", theme.bold(`ask (${count}) `));
|
|
111
111
|
text += theme.fg("muted", firstQ);
|
|
112
112
|
if (count > 1) text += theme.fg("dim", ` +${count - 1} more`);
|
package/src/questionnaire.ts
CHANGED
|
@@ -172,7 +172,7 @@ export class AskQuestionnaire extends Container {
|
|
|
172
172
|
} else if (item.kind === "next") {
|
|
173
173
|
const selected = Array.from(this.multiChecked)
|
|
174
174
|
.sort((a, b) => a - b)
|
|
175
|
-
.map((i) => this.currentQ.options[i]?.label);
|
|
175
|
+
.map((i) => this.currentQ.options[i]?.label ?? "");
|
|
176
176
|
if (selected.length === 0) {
|
|
177
177
|
this.cancel();
|
|
178
178
|
return;
|
package/src/rpc.ts
CHANGED
|
@@ -36,7 +36,7 @@ export async function rpcFallback(
|
|
|
36
36
|
.split(",")
|
|
37
37
|
.map((s) => Number(s.trim()))
|
|
38
38
|
.filter((n) => n >= 1 && n <= q.options.length);
|
|
39
|
-
const selected = indices.map((n) => q.options[n - 1]?.label);
|
|
39
|
+
const selected = indices.map((n) => q.options[n - 1]?.label ?? "");
|
|
40
40
|
if (selected.length > 0) {
|
|
41
41
|
answers.push({
|
|
42
42
|
questionIndex: i,
|