nolo-cli 0.69.0-alpha.1 → 0.69.0-alpha.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/{agentEmailCommands-LXGAJ3WU.js → agentEmailCommands-LVUZQHBF.js} +2 -2
- package/{agentMachineCommands-W35VHNJN.js → agentMachineCommands-XNIBG4L2.js} +1 -1
- package/{agentRecordCommands-JKA6W77W.js → agentRecordCommands-ID3URU2J.js} +2 -2
- package/{agentRunCommand-DFMXY5SI.js → agentRunCommand-KZMPUI53.js} +2 -2
- package/{chunk-MNIB5JKP.js → chunk-36G25COQ.js} +1 -1
- package/{chunk-JFPBCEFP.js → chunk-JKAWV72Y.js} +2 -3
- package/{chunk-ZXB3C27J.js → chunk-O2X6R45W.js} +1 -1
- package/{chunk-HFC7I2SI.js → chunk-Z3XXUE2E.js} +16 -8
- package/index.js +15 -15
- package/{machineCommands-7G33TEID.js → machineCommands-3Y3EHK2H.js} +2 -2
- package/{machineWsRunDispatch-5I4IU4FF.js → machineWsRunDispatch-RSVSJ4D7.js} +2 -2
- package/package.json +1 -1
- package/{readlineWorkspace-5A2BHFDV.js → readlineWorkspace-7FZA4JYG.js} +198 -86
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
} from "./chunk-JYYZCK2Z.js";
|
|
9
9
|
import {
|
|
10
10
|
runAgentCreateCommand
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-36G25COQ.js";
|
|
12
|
+
import "./chunk-Z3XXUE2E.js";
|
|
13
13
|
import "./chunk-BNATE77Z.js";
|
|
14
14
|
import "./chunk-EADNWBAZ.js";
|
|
15
15
|
import "./chunk-HH65VA5U.js";
|
|
@@ -89,7 +89,7 @@ async function defaultExecuteCli(provider, prompt, options) {
|
|
|
89
89
|
return executeCli(provider, prompt, options);
|
|
90
90
|
}
|
|
91
91
|
async function forwardConnectorRunMessage(machine, message, pushMessage, executeCli, env, fetchImpl) {
|
|
92
|
-
const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-
|
|
92
|
+
const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-RSVSJ4D7.js");
|
|
93
93
|
return handleConnectorRunMessage(message, pushMessage, executeCli, env, fetchImpl);
|
|
94
94
|
}
|
|
95
95
|
async function detectLaunchableMachineInfo() {
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
runAgentCreateCommand,
|
|
3
3
|
runAgentReadCommand,
|
|
4
4
|
runAgentUpdateCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-36G25COQ.js";
|
|
6
|
+
import "./chunk-Z3XXUE2E.js";
|
|
7
7
|
import "./chunk-BNATE77Z.js";
|
|
8
8
|
import "./chunk-EADNWBAZ.js";
|
|
9
9
|
import "./chunk-HH65VA5U.js";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
resolveRunSettlementNote,
|
|
9
9
|
resolveWorkflowReference,
|
|
10
10
|
runAgentRunCommand
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JKAWV72Y.js";
|
|
12
12
|
import "./chunk-S7Z2HMCN.js";
|
|
13
13
|
import {
|
|
14
14
|
parseAgentRunArgs
|
|
15
15
|
} from "./chunk-JYYZCK2Z.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-Z3XXUE2E.js";
|
|
17
17
|
import "./chunk-BNATE77Z.js";
|
|
18
18
|
import "./chunk-EADNWBAZ.js";
|
|
19
19
|
import "./chunk-HH65VA5U.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveLocalUserId,
|
|
28
28
|
t,
|
|
29
29
|
toolLabel
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-Z3XXUE2E.js";
|
|
31
31
|
import {
|
|
32
32
|
createRunActivityTracker,
|
|
33
33
|
popSingleQueueMessage,
|
|
@@ -1477,11 +1477,10 @@ function surfaceBackgroundSequence(env = process.env, brightness = resolveTuiBri
|
|
|
1477
1477
|
return hexToBgSgr((SURFACE_HEX[activeThemeName] ?? SURFACE_HEX.trail)[brightness]);
|
|
1478
1478
|
}
|
|
1479
1479
|
function userSurfaceBackgroundSequence(env = process.env, brightness = resolveTuiBrightness(env)) {
|
|
1480
|
-
if (resolveTuiThemeMode(env) === "terminal") return "";
|
|
1481
1480
|
if (!supportsTruecolor(env)) return "";
|
|
1482
1481
|
const palette = THEME_PALETTES[activeThemeName] ?? THEME_PALETTES.trail;
|
|
1483
1482
|
const accentHex = palette[brightness].accent.hex;
|
|
1484
|
-
const weight = brightness === "dark" ? 0.
|
|
1483
|
+
const weight = brightness === "dark" ? 0.3 : 0.2;
|
|
1485
1484
|
return hexToBgSgr(blendHex(accentHex, resolveTerminalBaseHex(brightness), weight));
|
|
1486
1485
|
}
|
|
1487
1486
|
function themeColorSequence(token, env = process.env, brightness = resolveTuiBrightness(env)) {
|
|
@@ -795,6 +795,10 @@ var STRINGS = {
|
|
|
795
795
|
zh: "\u2191 Shift+\u6EDA\u8F6E\u53EF\u56DE\u770B\u4E0A\u65B9\u6D88\u606F"
|
|
796
796
|
},
|
|
797
797
|
askChoiceSubmit: {
|
|
798
|
+
en: "submit \u2193",
|
|
799
|
+
zh: "\u63D0\u4EA4 \u2193"
|
|
800
|
+
},
|
|
801
|
+
askChoiceSubmitRow: {
|
|
798
802
|
en: "Submit",
|
|
799
803
|
zh: "\u63D0\u4EA4"
|
|
800
804
|
},
|
|
@@ -803,20 +807,24 @@ var STRINGS = {
|
|
|
803
807
|
zh: "\u5176\u4ED6"
|
|
804
808
|
},
|
|
805
809
|
askChoiceHintSingle: {
|
|
806
|
-
en: "
|
|
807
|
-
zh: "\u8F93\u5165\
|
|
810
|
+
en: "Enter/Space picks \xB7 in Other, Enter only saves \xB7 \u2193 to Submit row, Enter sends",
|
|
811
|
+
zh: "Enter/\u7A7A\u683C \u9009\u62E9 \xB7 \u5176\u4ED6\u4E2D\u8F93\u5165\u540E Enter \u4EC5\u4E3A\u4FDD\u5B58 \xB7 \u2193 \u5230\u63D0\u4EA4\u884C Enter \u53D1\u9001"
|
|
808
812
|
},
|
|
809
813
|
askChoiceHintMulti: {
|
|
810
|
-
en: "Space to
|
|
811
|
-
zh: "
|
|
814
|
+
en: "Enter/Space toggles \xB7 \u2193 to Submit row, Enter sends",
|
|
815
|
+
zh: "Enter/\u7A7A\u683C \u5207\u6362\u9009\u4E2D \xB7 \u2193 \u5230\u63D0\u4EA4\u884C Enter \u53D1\u9001"
|
|
812
816
|
},
|
|
813
817
|
askChoiceFooterSingle: {
|
|
814
|
-
en: "\u21B5
|
|
815
|
-
zh: "\u21B5 \u9009\u62E9
|
|
818
|
+
en: "\u21B5 select \xB7 \u2193 submit row \u21B5 send \xB7 ctrl+s send \xB7 tab switch \xB7 esc cancel",
|
|
819
|
+
zh: "\u21B5 \u9009\u62E9 \xB7 \u2193 \u63D0\u4EA4\u884C \u21B5 \u53D1\u9001 \xB7 ctrl+s \u53D1\u9001 \xB7 tab \u5207\u6362 \xB7 esc \u53D6\u6D88"
|
|
816
820
|
},
|
|
817
821
|
askChoiceFooterMulti: {
|
|
818
|
-
en: "\u21B5 submit \xB7
|
|
819
|
-
zh: "\u21B5 \u63D0\u4EA4 \xB7
|
|
822
|
+
en: "\u21B5 toggle \xB7 \u2193 submit row \u21B5 send \xB7 ctrl+s send \xB7 tab switch \xB7 esc cancel",
|
|
823
|
+
zh: "\u21B5 \u5207\u6362 \xB7 \u2193 \u63D0\u4EA4\u884C \u21B5 \u53D1\u9001 \xB7 ctrl+s \u53D1\u9001 \xB7 tab \u5207\u6362 \xB7 esc \u53D6\u6D88"
|
|
824
|
+
},
|
|
825
|
+
askChoiceValidationRequired: {
|
|
826
|
+
en: "Required questions are unanswered \u2014 jumped to the first one.",
|
|
827
|
+
zh: "\u5FC5\u586B\u95EE\u9898\u5C1A\u672A\u56DE\u7B54 \u2014 \u5DF2\u8DF3\u8F6C\u5230\u7B2C\u4E00\u4E2A\u672A\u7B54\u9898\u3002"
|
|
820
828
|
},
|
|
821
829
|
askChoiceHistoryHint: {
|
|
822
830
|
en: "Type a number to choose, or reply directly:",
|
package/index.js
CHANGED
|
@@ -127,7 +127,7 @@ function createDaemonShortcutCommand(path, description, command2) {
|
|
|
127
127
|
// packages/cli/agentInternalCommandEntries.ts
|
|
128
128
|
function getAgentInternalCommandEntries() {
|
|
129
129
|
const createAgentRunCommand = (path, description) => createContextCommand(path, description, async (args2, ctx) => {
|
|
130
|
-
const { runAgentRunCommand } = await import("./agentRunCommand-
|
|
130
|
+
const { runAgentRunCommand } = await import("./agentRunCommand-KZMPUI53.js");
|
|
131
131
|
return runAgentRunCommand(args2, {
|
|
132
132
|
env: ctx.env,
|
|
133
133
|
scriptDir: ctx.scriptDir,
|
|
@@ -143,7 +143,7 @@ function getAgentInternalCommandEntries() {
|
|
|
143
143
|
return runAgentListCommand(args2, deps);
|
|
144
144
|
}),
|
|
145
145
|
createEnvCommand(["agent", "create"], "Create a new agent", async (args2, deps) => {
|
|
146
|
-
const { runAgentCreateCommand } = await import("./agentRecordCommands-
|
|
146
|
+
const { runAgentCreateCommand } = await import("./agentRecordCommands-ID3URU2J.js");
|
|
147
147
|
return runAgentCreateCommand(args2, deps);
|
|
148
148
|
}),
|
|
149
149
|
createEnvCommand(["agent", "models"], "List models available on an OpenAI-compatible provider", async (args2, deps) => {
|
|
@@ -155,7 +155,7 @@ function getAgentInternalCommandEntries() {
|
|
|
155
155
|
return runAgentPullCommand(args2, deps);
|
|
156
156
|
}),
|
|
157
157
|
createEnvCommand(["agent", "read"], "Read a single agent", async (args2, deps) => {
|
|
158
|
-
const { runAgentReadCommand } = await import("./agentRecordCommands-
|
|
158
|
+
const { runAgentReadCommand } = await import("./agentRecordCommands-ID3URU2J.js");
|
|
159
159
|
return runAgentReadCommand(args2, deps);
|
|
160
160
|
}),
|
|
161
161
|
createAgentRunCommand(["agent", "run"], "Run an agent"),
|
|
@@ -184,26 +184,26 @@ function getAgentInternalCommandEntries() {
|
|
|
184
184
|
return runSetupOfflineMarxistsAgentCommand(args2, deps);
|
|
185
185
|
}),
|
|
186
186
|
createEnvCommand(["agent", "update"], "Update agent fields", async (args2, deps) => {
|
|
187
|
-
const { runAgentUpdateCommand } = await import("./agentRecordCommands-
|
|
187
|
+
const { runAgentUpdateCommand } = await import("./agentRecordCommands-ID3URU2J.js");
|
|
188
188
|
return runAgentUpdateCommand(args2, deps);
|
|
189
189
|
}),
|
|
190
190
|
createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args2, deps) => {
|
|
191
|
-
const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-
|
|
191
|
+
const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-LVUZQHBF.js");
|
|
192
192
|
return runAgentEmailProvisionCommand(args2, deps);
|
|
193
193
|
}),
|
|
194
194
|
createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args2, deps) => {
|
|
195
|
-
const { runAgentEmailBindCommand } = await import("./agentEmailCommands-
|
|
195
|
+
const { runAgentEmailBindCommand } = await import("./agentEmailCommands-LVUZQHBF.js");
|
|
196
196
|
return runAgentEmailBindCommand(args2, deps);
|
|
197
197
|
}),
|
|
198
198
|
createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args2, deps) => {
|
|
199
|
-
const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-
|
|
199
|
+
const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-LVUZQHBF.js");
|
|
200
200
|
return runAgentEmailTransferCommand(args2, deps);
|
|
201
201
|
}),
|
|
202
202
|
createEnvCommand(
|
|
203
203
|
["agent", "email", "create-and-provision"],
|
|
204
204
|
"Create an agent and provision its controlled inbox",
|
|
205
205
|
async (args2, deps) => {
|
|
206
|
-
const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-
|
|
206
|
+
const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-LVUZQHBF.js");
|
|
207
207
|
return runAgentEmailCreateAndProvisionCommand(args2, deps);
|
|
208
208
|
}
|
|
209
209
|
),
|
|
@@ -224,15 +224,15 @@ function getAgentInternalCommandEntries() {
|
|
|
224
224
|
return runAgentRevokeGrantCommand(args2, deps);
|
|
225
225
|
}),
|
|
226
226
|
createEnvCommand(["agent", "bind-current"], "Bind an agent to this machine", async (args2, deps) => {
|
|
227
|
-
const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-
|
|
227
|
+
const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-XNIBG4L2.js");
|
|
228
228
|
return runAgentBindCurrentCommand(args2, deps);
|
|
229
229
|
}),
|
|
230
230
|
createEnvCommand(["agent", "smoke-current"], "Smoke test a bound agent through this machine", async (args2, deps) => {
|
|
231
|
-
const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-
|
|
231
|
+
const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-XNIBG4L2.js");
|
|
232
232
|
return runAgentSmokeCurrentCommand(args2, deps);
|
|
233
233
|
}),
|
|
234
234
|
createEnvCommand(["agent", "runtime-doctor"], "Diagnose current machine runtime compatibility", async (args2, deps) => {
|
|
235
|
-
const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-
|
|
235
|
+
const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-XNIBG4L2.js");
|
|
236
236
|
return runAgentRuntimeDoctorCommand(args2, deps);
|
|
237
237
|
}),
|
|
238
238
|
createAgentRunCommand(["agent", "chat"], "Chat with an agent")
|
|
@@ -417,15 +417,15 @@ function getSystemInternalCommandEntries(renderHelpText2) {
|
|
|
417
417
|
return runWhoamiCommand({ args: args2, env: ctx.env });
|
|
418
418
|
}),
|
|
419
419
|
createEntrypointEnvCommand(["connect"], "Send machine heartbeats or hold a connector websocket", async (args2, deps) => {
|
|
420
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
420
|
+
const { runMachineConnectCommand } = await import("./machineCommands-3Y3EHK2H.js");
|
|
421
421
|
return runMachineConnectCommand(args2, deps);
|
|
422
422
|
}),
|
|
423
423
|
createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args2, deps) => {
|
|
424
|
-
const { runMachineConnectCommand } = await import("./machineCommands-
|
|
424
|
+
const { runMachineConnectCommand } = await import("./machineCommands-3Y3EHK2H.js");
|
|
425
425
|
return runMachineConnectCommand(args2, deps);
|
|
426
426
|
}),
|
|
427
427
|
createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args2, deps) => {
|
|
428
|
-
const { runMachineStatusCommand } = await import("./machineCommands-
|
|
428
|
+
const { runMachineStatusCommand } = await import("./machineCommands-3Y3EHK2H.js");
|
|
429
429
|
return runMachineStatusCommand(args2, deps);
|
|
430
430
|
}),
|
|
431
431
|
createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args2, deps) => {
|
|
@@ -815,7 +815,7 @@ async function runScript(script, forwardedArgs, env) {
|
|
|
815
815
|
return proc.exited;
|
|
816
816
|
}
|
|
817
817
|
async function launchTuiWorkspace(args2) {
|
|
818
|
-
const { startTuiWorkspace } = await import("./readlineWorkspace-
|
|
818
|
+
const { startTuiWorkspace } = await import("./readlineWorkspace-7FZA4JYG.js");
|
|
819
819
|
const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-ZGATEM35.js");
|
|
820
820
|
return startTuiWorkspace({
|
|
821
821
|
...args2,
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
buildMachinePermissionPromptBlock,
|
|
3
3
|
handleConnectorRunMessage,
|
|
4
4
|
resolveMachineRunPermissionPolicy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O2X6R45W.js";
|
|
6
6
|
import {
|
|
7
7
|
isConnectorWebSocketAuthError,
|
|
8
8
|
isConnectorWebSocketRetryableError,
|
|
9
9
|
resolveConnectorWebSocketTarget
|
|
10
10
|
} from "./chunk-ALXHV7NK.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-Z3XXUE2E.js";
|
|
12
12
|
import "./chunk-BNATE77Z.js";
|
|
13
13
|
import "./chunk-EADNWBAZ.js";
|
|
14
14
|
import "./chunk-HH65VA5U.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runtimeWorkspacePermissionPolicy,
|
|
12
12
|
scopePermissionPolicyToRuntimeWorkspace,
|
|
13
13
|
summarizeAgentConfigForLogs
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-O2X6R45W.js";
|
|
15
|
+
import "./chunk-Z3XXUE2E.js";
|
|
16
16
|
import "./chunk-BNATE77Z.js";
|
|
17
17
|
import "./chunk-EADNWBAZ.js";
|
|
18
18
|
import "./chunk-HH65VA5U.js";
|
package/package.json
CHANGED
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
wrapTextToLines,
|
|
73
73
|
wrapTranscriptLine,
|
|
74
74
|
wrapTranscriptLineWithLayout
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-JKAWV72Y.js";
|
|
76
76
|
import "./chunk-S7Z2HMCN.js";
|
|
77
77
|
import {
|
|
78
78
|
listFavoriteAgentIdsAcrossServers,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
readTimestamp,
|
|
97
97
|
setCliLocale,
|
|
98
98
|
t
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-Z3XXUE2E.js";
|
|
100
100
|
import "./chunk-BNATE77Z.js";
|
|
101
101
|
import "./chunk-EADNWBAZ.js";
|
|
102
102
|
import {
|
|
@@ -6806,18 +6806,50 @@ function normalizeQuestion(raw, index) {
|
|
|
6806
6806
|
required: raw?.required !== false
|
|
6807
6807
|
};
|
|
6808
6808
|
}
|
|
6809
|
-
function createInitialAskChoiceState(questions) {
|
|
6809
|
+
function createInitialAskChoiceState(questions, savedAnswers) {
|
|
6810
|
+
const hasSaved = Boolean(
|
|
6811
|
+
savedAnswers?.answers?.length || savedAnswers?.selected || savedAnswers?.phase === "submitted"
|
|
6812
|
+
);
|
|
6810
6813
|
return {
|
|
6811
6814
|
questions,
|
|
6812
6815
|
activeIndex: 0,
|
|
6813
|
-
questionStates: questions.map(() =>
|
|
6814
|
-
|
|
6815
|
-
selectedIds
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6816
|
+
questionStates: questions.map((q, i) => {
|
|
6817
|
+
let pickedId = null;
|
|
6818
|
+
let selectedIds = [];
|
|
6819
|
+
let otherText = "";
|
|
6820
|
+
if (savedAnswers?.answers?.length) {
|
|
6821
|
+
const byId = savedAnswers.answers.find((a) => a.questionId === q.id);
|
|
6822
|
+
const byPosition = savedAnswers.answers[i]?.questionId ? void 0 : savedAnswers.answers[i];
|
|
6823
|
+
const found = byId ?? byPosition;
|
|
6824
|
+
if (found) {
|
|
6825
|
+
selectedIds = Array.isArray(found.selectedIds) ? found.selectedIds : [];
|
|
6826
|
+
otherText = typeof found.otherText === "string" ? found.otherText : "";
|
|
6827
|
+
if (!q.multiSelect && selectedIds.length > 0) {
|
|
6828
|
+
pickedId = selectedIds[0];
|
|
6829
|
+
}
|
|
6830
|
+
}
|
|
6831
|
+
} else if (savedAnswers?.selected) {
|
|
6832
|
+
const label = savedAnswers.selected.label;
|
|
6833
|
+
const matched = q.choices.find(
|
|
6834
|
+
(c) => c.label === label || savedAnswers.selected?.userMessage && c.userMessage === savedAnswers.selected.userMessage
|
|
6835
|
+
);
|
|
6836
|
+
if (matched) {
|
|
6837
|
+
pickedId = matched.id;
|
|
6838
|
+
selectedIds = [matched.id];
|
|
6839
|
+
} else if (label) {
|
|
6840
|
+
otherText = label;
|
|
6841
|
+
}
|
|
6842
|
+
}
|
|
6843
|
+
return {
|
|
6844
|
+
cursorIndex: 0,
|
|
6845
|
+
selectedIds,
|
|
6846
|
+
pickedId,
|
|
6847
|
+
otherText,
|
|
6848
|
+
otherFocused: false
|
|
6849
|
+
};
|
|
6850
|
+
}),
|
|
6851
|
+
phase: savedAnswers?.phase ?? (hasSaved ? "submitted" : "active"),
|
|
6852
|
+
validationAttempted: false
|
|
6821
6853
|
};
|
|
6822
6854
|
}
|
|
6823
6855
|
function askChoiceReducer(state, action) {
|
|
@@ -6847,8 +6879,15 @@ function askChoiceReducer(state, action) {
|
|
|
6847
6879
|
case "CANCEL":
|
|
6848
6880
|
return { ...state, phase: "cancelled" };
|
|
6849
6881
|
case "SUBMIT": {
|
|
6850
|
-
|
|
6851
|
-
|
|
6882
|
+
const firstUnanswered = findFirstUnansweredIndex(state);
|
|
6883
|
+
if (firstUnanswered !== -1) {
|
|
6884
|
+
return {
|
|
6885
|
+
...state,
|
|
6886
|
+
activeIndex: firstUnanswered,
|
|
6887
|
+
validationAttempted: true
|
|
6888
|
+
};
|
|
6889
|
+
}
|
|
6890
|
+
return { ...state, phase: "submitted", validationAttempted: false };
|
|
6852
6891
|
}
|
|
6853
6892
|
case "SWITCH_TAB": {
|
|
6854
6893
|
const idx = clamp(action.index, 0, state.questions.length - 1);
|
|
@@ -6878,58 +6917,62 @@ function askChoiceReducer(state, action) {
|
|
|
6878
6917
|
case "TOGGLE_AT_CURSOR": {
|
|
6879
6918
|
const qs = state.questionStates[state.activeIndex];
|
|
6880
6919
|
const q = state.questions[state.activeIndex];
|
|
6881
|
-
if (!q.multiSelect)
|
|
6920
|
+
if (!q.multiSelect) {
|
|
6921
|
+
return askChoiceReducer(state, { type: "SELECT_AT_CURSOR" });
|
|
6922
|
+
}
|
|
6882
6923
|
const isOtherRow = qs.cursorIndex >= q.choices.length;
|
|
6883
6924
|
if (isOtherRow) {
|
|
6884
|
-
const
|
|
6885
|
-
|
|
6886
|
-
return { ...state, questionStates:
|
|
6925
|
+
const newQs = [...state.questionStates];
|
|
6926
|
+
newQs[state.activeIndex] = { ...qs, otherFocused: !qs.otherFocused };
|
|
6927
|
+
return { ...state, questionStates: newQs };
|
|
6887
6928
|
}
|
|
6888
6929
|
const choiceId = q.choices[qs.cursorIndex]?.id;
|
|
6889
6930
|
if (!choiceId) return state;
|
|
6890
|
-
|
|
6891
|
-
|
|
6931
|
+
return askChoiceReducer(state, { type: "SELECT_CHOICE", choiceId });
|
|
6932
|
+
}
|
|
6933
|
+
// The one explicit "choose this option" action, addressed by choice id so
|
|
6934
|
+
// that click / tap handlers on every platform share the same behaviour as
|
|
6935
|
+
// cursor-driven keys. Multi-select toggles, single-select picks. It never
|
|
6936
|
+
// advances the tab and never submits.
|
|
6937
|
+
case "SELECT_CHOICE": {
|
|
6938
|
+
const qs = state.questionStates[state.activeIndex];
|
|
6939
|
+
const q = state.questions[state.activeIndex];
|
|
6940
|
+
const choiceIndex = q.choices.findIndex((c) => c.id === action.choiceId);
|
|
6941
|
+
if (choiceIndex === -1) return state;
|
|
6892
6942
|
const newQs = [...state.questionStates];
|
|
6893
|
-
|
|
6894
|
-
|
|
6943
|
+
if (q.multiSelect) {
|
|
6944
|
+
const has = qs.selectedIds.includes(action.choiceId);
|
|
6945
|
+
const newSelected = has ? qs.selectedIds.filter((id) => id !== action.choiceId) : [...qs.selectedIds, action.choiceId];
|
|
6946
|
+
newQs[state.activeIndex] = {
|
|
6947
|
+
...qs,
|
|
6948
|
+
cursorIndex: choiceIndex,
|
|
6949
|
+
selectedIds: newSelected,
|
|
6950
|
+
otherText: "",
|
|
6951
|
+
otherFocused: false
|
|
6952
|
+
};
|
|
6953
|
+
} else {
|
|
6954
|
+
newQs[state.activeIndex] = {
|
|
6955
|
+
...qs,
|
|
6956
|
+
cursorIndex: choiceIndex,
|
|
6957
|
+
pickedId: action.choiceId,
|
|
6958
|
+
otherText: "",
|
|
6959
|
+
otherFocused: false
|
|
6960
|
+
};
|
|
6961
|
+
}
|
|
6962
|
+
return { ...state, questionStates: newQs, validationAttempted: false };
|
|
6895
6963
|
}
|
|
6896
6964
|
case "SELECT_AT_CURSOR": {
|
|
6897
6965
|
const qs = state.questionStates[state.activeIndex];
|
|
6898
6966
|
const q = state.questions[state.activeIndex];
|
|
6899
6967
|
const isOtherRow = qs.cursorIndex >= q.choices.length;
|
|
6900
6968
|
if (isOtherRow) {
|
|
6901
|
-
const
|
|
6902
|
-
|
|
6903
|
-
return { ...state, questionStates:
|
|
6969
|
+
const newQs = [...state.questionStates];
|
|
6970
|
+
newQs[state.activeIndex] = { ...qs, otherFocused: true };
|
|
6971
|
+
return { ...state, questionStates: newQs };
|
|
6904
6972
|
}
|
|
6905
6973
|
const choiceId = q.choices[qs.cursorIndex]?.id;
|
|
6906
6974
|
if (!choiceId) return state;
|
|
6907
|
-
|
|
6908
|
-
const has = qs.selectedIds.includes(choiceId);
|
|
6909
|
-
const newSelected = has ? qs.selectedIds.filter((id) => id !== choiceId) : [...qs.selectedIds, choiceId];
|
|
6910
|
-
const newQs2 = [...state.questionStates];
|
|
6911
|
-
newQs2[state.activeIndex] = { ...qs, selectedIds: newSelected };
|
|
6912
|
-
return { ...state, questionStates: newQs2 };
|
|
6913
|
-
}
|
|
6914
|
-
const newQs = [...state.questionStates];
|
|
6915
|
-
newQs[state.activeIndex] = { ...qs, pickedId: choiceId, otherFocused: false };
|
|
6916
|
-
if (state.questions.length === 1) {
|
|
6917
|
-
return {
|
|
6918
|
-
...state,
|
|
6919
|
-
questionStates: newQs,
|
|
6920
|
-
phase: "submitted"
|
|
6921
|
-
};
|
|
6922
|
-
}
|
|
6923
|
-
const nextState = { ...state, questionStates: newQs };
|
|
6924
|
-
const isLastTab = state.activeIndex >= state.questions.length - 1;
|
|
6925
|
-
if (isLastTab && canSubmit(nextState)) {
|
|
6926
|
-
return { ...nextState, phase: "submitted" };
|
|
6927
|
-
}
|
|
6928
|
-
const nextTab = Math.min(
|
|
6929
|
-
state.activeIndex + 1,
|
|
6930
|
-
state.questions.length - 1
|
|
6931
|
-
);
|
|
6932
|
-
return { ...nextState, activeIndex: nextTab };
|
|
6975
|
+
return askChoiceReducer(state, { type: "SELECT_CHOICE", choiceId });
|
|
6933
6976
|
}
|
|
6934
6977
|
case "FOCUS_OTHER": {
|
|
6935
6978
|
const qs = state.questionStates[state.activeIndex];
|
|
@@ -6946,40 +6989,47 @@ function askChoiceReducer(state, action) {
|
|
|
6946
6989
|
case "SET_OTHER_TEXT": {
|
|
6947
6990
|
const qs = state.questionStates[state.activeIndex];
|
|
6948
6991
|
const newQs = [...state.questionStates];
|
|
6949
|
-
|
|
6950
|
-
|
|
6992
|
+
const hasText = action.text.trim().length > 0;
|
|
6993
|
+
newQs[state.activeIndex] = {
|
|
6994
|
+
...qs,
|
|
6995
|
+
otherText: action.text,
|
|
6996
|
+
// Non-empty Other is mutually exclusive with predefined choices
|
|
6997
|
+
...hasText ? { pickedId: null, selectedIds: [] } : {}
|
|
6998
|
+
};
|
|
6999
|
+
return { ...state, questionStates: newQs, validationAttempted: false };
|
|
6951
7000
|
}
|
|
6952
7001
|
default:
|
|
6953
7002
|
return state;
|
|
6954
7003
|
}
|
|
6955
7004
|
}
|
|
7005
|
+
function findFirstUnansweredIndex(state) {
|
|
7006
|
+
return state.questions.findIndex(
|
|
7007
|
+
(q, i) => !isQuestionAnswered(q, state.questionStates[i])
|
|
7008
|
+
);
|
|
7009
|
+
}
|
|
6956
7010
|
function isQuestionAnswered(q, qs) {
|
|
6957
7011
|
if (!q.required) return true;
|
|
6958
|
-
const hasSelection = q.multiSelect ? qs.selectedIds.length > 0 : qs.pickedId !== null;
|
|
6959
7012
|
const hasOther = q.allowOther && qs.otherText.trim().length > 0;
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
function canSubmit(state) {
|
|
6963
|
-
return state.questions.every(
|
|
6964
|
-
(q, i) => isQuestionAnswered(q, state.questionStates[i])
|
|
6965
|
-
);
|
|
7013
|
+
const hasSelection = q.multiSelect ? qs.selectedIds.length > 0 : qs.pickedId !== null;
|
|
7014
|
+
return hasOther || hasSelection;
|
|
6966
7015
|
}
|
|
6967
7016
|
function buildAskChoiceResult(state) {
|
|
6968
7017
|
if (state.phase === "cancelled") return { kind: "cancelled" };
|
|
6969
7018
|
if (state.phase !== "submitted") return { kind: "cancelled" };
|
|
6970
7019
|
const answers = state.questions.map((q, i) => {
|
|
6971
7020
|
const qs = state.questionStates[i];
|
|
6972
|
-
const selectedIds = q.multiSelect ? qs.selectedIds : qs.pickedId ? [qs.pickedId] : [];
|
|
6973
7021
|
const otherText = qs.otherText.trim();
|
|
7022
|
+
const selectedIds = otherText ? [] : q.multiSelect ? qs.selectedIds : qs.pickedId ? [qs.pickedId] : [];
|
|
6974
7023
|
const parts = [];
|
|
6975
|
-
for (const id of selectedIds) {
|
|
6976
|
-
const choice = q.choices.find((c) => c.id === id);
|
|
6977
|
-
if (choice) {
|
|
6978
|
-
parts.push(choice.userMessage || choice.label);
|
|
6979
|
-
}
|
|
6980
|
-
}
|
|
6981
7024
|
if (otherText) {
|
|
6982
7025
|
parts.push(otherText);
|
|
7026
|
+
} else {
|
|
7027
|
+
for (const id of selectedIds) {
|
|
7028
|
+
const choice = q.choices.find((c) => c.id === id);
|
|
7029
|
+
if (choice) {
|
|
7030
|
+
parts.push(choice.userMessage || choice.label);
|
|
7031
|
+
}
|
|
7032
|
+
}
|
|
6983
7033
|
}
|
|
6984
7034
|
return {
|
|
6985
7035
|
questionId: q.id,
|
|
@@ -6990,6 +7040,19 @@ function buildAskChoiceResult(state) {
|
|
|
6990
7040
|
});
|
|
6991
7041
|
return { kind: "submitted", answers };
|
|
6992
7042
|
}
|
|
7043
|
+
function formatOutboundUserMessage(questions, answers) {
|
|
7044
|
+
if (answers.length <= 1) {
|
|
7045
|
+
return answers[0]?.userMessage ?? "";
|
|
7046
|
+
}
|
|
7047
|
+
return answers.map((a) => {
|
|
7048
|
+
const q = questions.find((item) => item.id === a.questionId);
|
|
7049
|
+
const title = q?.header || q?.question;
|
|
7050
|
+
if (title && a.userMessage) {
|
|
7051
|
+
return `[${title}]: ${a.userMessage}`;
|
|
7052
|
+
}
|
|
7053
|
+
return a.userMessage;
|
|
7054
|
+
}).filter(Boolean).join("\n\n");
|
|
7055
|
+
}
|
|
6993
7056
|
function clamp(value, min, max) {
|
|
6994
7057
|
return Math.max(min, Math.min(max, value));
|
|
6995
7058
|
}
|
|
@@ -7000,10 +7063,17 @@ var KEY_SHIFT_TAB = "\x1B[Z";
|
|
|
7000
7063
|
var KEY_BACKSPACE = "\x7F";
|
|
7001
7064
|
var KEY_BACKSPACE_ALT = "\b";
|
|
7002
7065
|
var KEY_SPACE = " ";
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7066
|
+
var KEY_CTRL_S = "";
|
|
7067
|
+
var TAB_DONE = "\u2713";
|
|
7068
|
+
var TAB_MISSING = "!";
|
|
7069
|
+
var TAB_OPTIONAL = "\xB7";
|
|
7070
|
+
function renderTabBar(state, colorEnabled) {
|
|
7071
|
+
const tabs = state.questions.map((q, i) => {
|
|
7072
|
+
const qs = state.questionStates[i];
|
|
7073
|
+
const hasAnswer = qs.pickedId !== null || qs.selectedIds.length > 0 || qs.otherText.trim().length > 0;
|
|
7074
|
+
const mark = hasAnswer ? TAB_DONE : q.required ? TAB_MISSING : TAB_OPTIONAL;
|
|
7075
|
+
const label = `${mark} ${q.header || `Q${i + 1}`}`;
|
|
7076
|
+
if (i === state.activeIndex) {
|
|
7007
7077
|
return colorEnabled ? `${themeColorSequence("accent")} ${label} \x1B[0m` : `[${label}]`;
|
|
7008
7078
|
}
|
|
7009
7079
|
return colorEnabled ? themeText(` ${label} `, "muted", colorEnabled) : ` ${label} `;
|
|
@@ -7020,6 +7090,7 @@ function otherRowPrefix(index) {
|
|
|
7020
7090
|
}
|
|
7021
7091
|
function renderAskChoiceFrame(state, options) {
|
|
7022
7092
|
const colorEnabled = resolveCliColorEnabled();
|
|
7093
|
+
const submitFocused = options?.submitFocused === true;
|
|
7023
7094
|
const q = state.questions[state.activeIndex];
|
|
7024
7095
|
const qs = state.questionStates[state.activeIndex];
|
|
7025
7096
|
const lines = [];
|
|
@@ -7032,7 +7103,13 @@ function renderAskChoiceFrame(state, options) {
|
|
|
7032
7103
|
}
|
|
7033
7104
|
lines.push("");
|
|
7034
7105
|
if (state.questions.length > 1) {
|
|
7035
|
-
lines.push(renderTabBar(state
|
|
7106
|
+
lines.push(renderTabBar(state, colorEnabled));
|
|
7107
|
+
lines.push("");
|
|
7108
|
+
}
|
|
7109
|
+
if (state.validationAttempted) {
|
|
7110
|
+
lines.push(
|
|
7111
|
+
colorEnabled ? themeText(` ${t("askChoiceValidationRequired")}`, "warning", colorEnabled) : ` ${t("askChoiceValidationRequired")}`
|
|
7112
|
+
);
|
|
7036
7113
|
lines.push("");
|
|
7037
7114
|
}
|
|
7038
7115
|
lines.push(
|
|
@@ -7059,7 +7136,7 @@ function renderAskChoiceFrame(state, options) {
|
|
|
7059
7136
|
for (let i = window.start; i < window.end; i++) {
|
|
7060
7137
|
if (i < q.choices.length) {
|
|
7061
7138
|
const choice = q.choices[i];
|
|
7062
|
-
const focused = qs.cursorIndex === i;
|
|
7139
|
+
const focused = qs.cursorIndex === i && !submitFocused;
|
|
7063
7140
|
const checkbox = q.multiSelect ? qs.selectedIds.includes(choice.id) ? DIALOG_CHECKED : DIALOG_UNCHECKED : qs.pickedId === choice.id ? DIALOG_CHECKED : void 0;
|
|
7064
7141
|
lines.push(
|
|
7065
7142
|
renderDialogRow({
|
|
@@ -7070,7 +7147,7 @@ function renderAskChoiceFrame(state, options) {
|
|
|
7070
7147
|
})
|
|
7071
7148
|
);
|
|
7072
7149
|
} else {
|
|
7073
|
-
const focused = qs.cursorIndex === i;
|
|
7150
|
+
const focused = qs.cursorIndex === i && !submitFocused;
|
|
7074
7151
|
const marker = focused ? DIALOG_CURSOR : " ";
|
|
7075
7152
|
const plainPrefix = `${marker}${otherRowPrefix(i)}`;
|
|
7076
7153
|
const plainRow = `${plainPrefix}${qs.otherText}`;
|
|
@@ -7092,6 +7169,12 @@ function renderAskChoiceFrame(state, options) {
|
|
|
7092
7169
|
if (window.end < totalRows) {
|
|
7093
7170
|
lines.push(renderOverflowBelow(totalRows - window.end));
|
|
7094
7171
|
}
|
|
7172
|
+
lines.push(
|
|
7173
|
+
renderDialogRow({
|
|
7174
|
+
label: t("askChoiceSubmitRow"),
|
|
7175
|
+
focused: submitFocused
|
|
7176
|
+
})
|
|
7177
|
+
);
|
|
7095
7178
|
lines.push("");
|
|
7096
7179
|
lines.push(renderFooter(q.multiSelect, colorEnabled));
|
|
7097
7180
|
return { text: lines.join("\n"), otherCursor };
|
|
@@ -7114,6 +7197,7 @@ async function runAskChoiceDialog(args) {
|
|
|
7114
7197
|
const session = args.session ?? createStandaloneDialogSession({ input, output });
|
|
7115
7198
|
const wheelThrottle = createWheelThrottle();
|
|
7116
7199
|
let rawAcquired = false;
|
|
7200
|
+
let submitFocused = false;
|
|
7117
7201
|
const bottomAnchored = Boolean(args.bottomAnchored && args.bottomRow);
|
|
7118
7202
|
const resolveBottomRow = () => Math.max(
|
|
7119
7203
|
1,
|
|
@@ -7122,7 +7206,7 @@ async function runAskChoiceDialog(args) {
|
|
|
7122
7206
|
const painter = createDialogFramePainter({
|
|
7123
7207
|
output,
|
|
7124
7208
|
render: () => {
|
|
7125
|
-
const frame = renderAskChoiceFrame(state, { bottomAnchored });
|
|
7209
|
+
const frame = renderAskChoiceFrame(state, { bottomAnchored, submitFocused });
|
|
7126
7210
|
return {
|
|
7127
7211
|
text: frame.text,
|
|
7128
7212
|
cursor: frame.otherCursor
|
|
@@ -7164,6 +7248,7 @@ async function runAskChoiceDialog(args) {
|
|
|
7164
7248
|
}
|
|
7165
7249
|
const direction = scrollAction === "wheel-up" ? -1 : 1;
|
|
7166
7250
|
if (wheelThrottle.step(direction) === 0) continue;
|
|
7251
|
+
submitFocused = false;
|
|
7167
7252
|
state = askChoiceReducer(state, {
|
|
7168
7253
|
type: "MOVE_CURSOR",
|
|
7169
7254
|
delta: direction
|
|
@@ -7185,29 +7270,49 @@ async function runAskChoiceDialog(args) {
|
|
|
7185
7270
|
} else if (isCancel(sequence)) {
|
|
7186
7271
|
action = { type: "CANCEL" };
|
|
7187
7272
|
} else if (isArrowUp(sequence)) {
|
|
7273
|
+
if (submitFocused) {
|
|
7274
|
+
submitFocused = false;
|
|
7275
|
+
paint();
|
|
7276
|
+
continue;
|
|
7277
|
+
}
|
|
7188
7278
|
action = { type: "MOVE_CURSOR", delta: -1 };
|
|
7189
7279
|
} else if (isArrowDown(sequence)) {
|
|
7280
|
+
const maxRowIndex = q.allowOther ? q.choices.length : q.choices.length - 1;
|
|
7281
|
+
if (submitFocused) {
|
|
7282
|
+
continue;
|
|
7283
|
+
}
|
|
7284
|
+
if (qs.cursorIndex >= maxRowIndex) {
|
|
7285
|
+
submitFocused = true;
|
|
7286
|
+
state = askChoiceReducer(state, { type: "MOVE_CURSOR", delta: 1 });
|
|
7287
|
+
paint();
|
|
7288
|
+
continue;
|
|
7289
|
+
}
|
|
7190
7290
|
action = { type: "MOVE_CURSOR", delta: 1 };
|
|
7291
|
+
} else if (sequence === KEY_CTRL_S) {
|
|
7292
|
+
action = { type: "SUBMIT" };
|
|
7191
7293
|
} else if (sequence === KEY_SPACE) {
|
|
7294
|
+
if (submitFocused) {
|
|
7295
|
+
continue;
|
|
7296
|
+
}
|
|
7192
7297
|
if (qs.otherFocused) {
|
|
7193
7298
|
action = {
|
|
7194
7299
|
type: "SET_OTHER_TEXT",
|
|
7195
7300
|
text: qs.otherText + " "
|
|
7196
7301
|
};
|
|
7197
|
-
} else if (q.multiSelect) {
|
|
7198
|
-
action = { type: "TOGGLE_AT_CURSOR" };
|
|
7199
7302
|
} else if (isOtherRow) {
|
|
7200
7303
|
action = { type: "FOCUS_OTHER" };
|
|
7304
|
+
} else {
|
|
7305
|
+
action = { type: "TOGGLE_AT_CURSOR" };
|
|
7201
7306
|
}
|
|
7202
7307
|
} else if (isSubmit(sequence)) {
|
|
7203
|
-
if (
|
|
7308
|
+
if (submitFocused) {
|
|
7309
|
+
action = { type: "SUBMIT" };
|
|
7310
|
+
} else if (qs.otherFocused) {
|
|
7204
7311
|
action = { type: "BLUR_OTHER" };
|
|
7205
|
-
} else if (isOtherRow
|
|
7312
|
+
} else if (isOtherRow) {
|
|
7206
7313
|
action = { type: "FOCUS_OTHER" };
|
|
7207
|
-
} else if (q.multiSelect) {
|
|
7208
|
-
action = { type: "SUBMIT" };
|
|
7209
7314
|
} else {
|
|
7210
|
-
action = { type: "
|
|
7315
|
+
action = { type: "TOGGLE_AT_CURSOR" };
|
|
7211
7316
|
}
|
|
7212
7317
|
} else if (sequence === KEY_BACKSPACE || sequence === KEY_BACKSPACE_ALT) {
|
|
7213
7318
|
if (qs.otherFocused && qs.otherText.length > 0) {
|
|
@@ -7217,6 +7322,16 @@ async function runAskChoiceDialog(args) {
|
|
|
7217
7322
|
text: chars.slice(0, -1).join("")
|
|
7218
7323
|
};
|
|
7219
7324
|
}
|
|
7325
|
+
} else if (submitFocused) {
|
|
7326
|
+
continue;
|
|
7327
|
+
} else if (sequence.length === 1 && sequence >= "1" && sequence <= "9" && !qs.otherFocused) {
|
|
7328
|
+
const rowIndex = Number(sequence) - 1;
|
|
7329
|
+
if (rowIndex < q.choices.length) {
|
|
7330
|
+
const choice = q.choices[rowIndex];
|
|
7331
|
+
if (choice) action = { type: "SELECT_CHOICE", choiceId: choice.id };
|
|
7332
|
+
} else if (rowIndex === q.choices.length && q.allowOther) {
|
|
7333
|
+
action = { type: "FOCUS_OTHER" };
|
|
7334
|
+
}
|
|
7220
7335
|
} else if (sequence.length >= 1 && sequence.charCodeAt(0) >= 32 && !sequence.startsWith("\x1B")) {
|
|
7221
7336
|
if (qs.otherFocused || isOtherRow && q.allowOther) {
|
|
7222
7337
|
const cleaned = sequence.replace(/[\x00-\x1f\x7f]/g, "");
|
|
@@ -7235,10 +7350,7 @@ async function runAskChoiceDialog(args) {
|
|
|
7235
7350
|
if (action) {
|
|
7236
7351
|
state = askChoiceReducer(state, action);
|
|
7237
7352
|
if (state.phase !== "active") break;
|
|
7238
|
-
|
|
7239
|
-
state = askChoiceReducer(state, { type: "SUBMIT" });
|
|
7240
|
-
break;
|
|
7241
|
-
}
|
|
7353
|
+
submitFocused = false;
|
|
7242
7354
|
paint();
|
|
7243
7355
|
}
|
|
7244
7356
|
}
|
|
@@ -7270,7 +7382,7 @@ async function runAskChoiceDialog(args) {
|
|
|
7270
7382
|
return {
|
|
7271
7383
|
kind: "multi-submitted",
|
|
7272
7384
|
answers: result.answers,
|
|
7273
|
-
userMessage: result.answers
|
|
7385
|
+
userMessage: formatOutboundUserMessage(normalized.questions, result.answers)
|
|
7274
7386
|
};
|
|
7275
7387
|
}
|
|
7276
7388
|
|