@helpai/elements 0.58.0 → 0.58.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/elements-web-component.esm.js +24 -24
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +23 -23
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +23 -23
- package/elements.esm.js.map +3 -3
- package/elements.js +23 -23
- package/elements.js.map +3 -3
- package/index.d.ts +1 -1
- package/index.mjs +43 -62
- package/package.json +1 -1
- package/web-component.mjs +43 -62
package/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ interface ClientStorage {
|
|
|
40
40
|
* populated {@link Strings} map. UI components then read `strings.send` as a
|
|
41
41
|
* normal property access — no per-render lookup, no per-render allocation.
|
|
42
42
|
*/
|
|
43
|
-
type StringKey = "launcherOpen" | "launcherLabel" | "panelTitle" | "composerPlaceholder" | "send" | "stop" | "attach" | "micStart" | "micStop" | "micUnsupported" | "expand" | "collapse" | "fullscreen" | "exitFullscreen" | "resizeHandle" | "scrollToBottom" | "close" | "moreActions" | "soundOn" | "soundOff" | "language" | "theme" | "themeAuto" | "themeLight" | "themeDark" | "textSize" | "textSizeSmall" | "textSizeNormal" | "textSizeLarge" | "history" | "historyTitle" | "historyEmpty" | "historyLoading" | "historyBack" | "historyContinue" | "conversationLoading" | "conversationClosed" | "startNewConversation" | "dateToday" | "dateYesterday" | "dateLastWeek" | "dateOlder" | "newConversation" | "dropZone" | "attachmentTooLarge" | "attachmentTooMany" | "attachmentMimeRejected" | "errorRetry" | "errorGeneric" | "errorRateLimited" | "loading" | "thinking" | "thoughts" | "
|
|
43
|
+
type StringKey = "launcherOpen" | "launcherLabel" | "panelTitle" | "composerPlaceholder" | "send" | "stop" | "attach" | "micStart" | "micStop" | "micUnsupported" | "expand" | "collapse" | "fullscreen" | "exitFullscreen" | "resizeHandle" | "scrollToBottom" | "close" | "moreActions" | "soundOn" | "soundOff" | "language" | "theme" | "themeAuto" | "themeLight" | "themeDark" | "textSize" | "textSizeSmall" | "textSizeNormal" | "textSizeLarge" | "history" | "historyTitle" | "historyEmpty" | "historyLoading" | "historyBack" | "historyContinue" | "conversationLoading" | "conversationClosed" | "startNewConversation" | "dateToday" | "dateYesterday" | "dateLastWeek" | "dateOlder" | "newConversation" | "dropZone" | "attachmentTooLarge" | "attachmentTooMany" | "attachmentMimeRejected" | "errorRetry" | "errorGeneric" | "errorRateLimited" | "loading" | "thinking" | "thoughts" | "toolResult" | "sources" | "feedbackUp" | "feedbackDown" | "feedbackThanks" | "copy" | "copied" | "collapseSidebar" | "expandSidebar" | "formSubmit" | "formSkip" | "formSubmitted" | "formSkipped" | "formFillOut" | "formRequired" | "formInvalidEmail" | "formInvalidTel" | "formInvalidUrl" | "formInvalidNumber" | "formTooShort" | "formTooLong" | "formNumberTooSmall" | "formNumberTooLarge" | "formPatternMismatch" | "formChooseAtLeast" | "formChooseAtMost" | "formOther" | "formOtherPlaceholder" | "inputRequired" | "inputBadge" | "inputAnswered" | "inputSkipped" | "inputSubmit" | "inputSubmitHint" | "inputSkip" | "showOptions" | "hideOptions" | "qtypeText" | "qtypeEmail" | "qtypePhone" | "qtypeNumber" | "qtypeDate" | "qtypeChooseOne" | "qtypeChooseAny" | "qtypeBoolean" | "confirmYes" | "confirmNo" | "approve" | "reject" | "approvalPrompt" | "approvalBody" | "approvalYourResponse" | "approvalEditHint" | "approvalSubmitting" | "edit" | "toolParameters" | "statusAwaiting" | "statusResponded" | "statusCompleted" | "statusDenied" | "statusError" | "statusRunning" | "statusSuperseded" | "tabHome" | "tabConversations" | "tabHelp" | "tabNews" | "modulesEmpty" | "moduleBack" | "contentLoading" | "homeGreeting" | "homeGreetingNamed" | "homeGreetingLead" | "homeSearchPlaceholder" | "homeContentTitle" | "homeStatus" | "helpTitle" | "helpSearchPlaceholder" | "helpEmpty" | "helpLoading" | "helpSearchEmpty" | "newsTitle" | "newsEmpty" | "newsLoading" | "newsBack" | "newsPublishedAt";
|
|
44
44
|
/** A partial map for one locale — what overrides look like on the wire. */
|
|
45
45
|
type LocaleStrings = Partial<Record<StringKey, string>>;
|
|
46
46
|
/**
|
package/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ var BRAND = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// src/core/version.ts
|
|
32
|
-
var ELEMENTS_VERSION = true ? "0.58.
|
|
32
|
+
var ELEMENTS_VERSION = true ? "0.58.2" : "0.0.0-dev";
|
|
33
33
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
34
34
|
|
|
35
35
|
// src/i18n/strings.ts
|
|
@@ -89,7 +89,6 @@ var STRINGS_EN = {
|
|
|
89
89
|
loading: "Loading\u2026",
|
|
90
90
|
thinking: "Thinking\u2026",
|
|
91
91
|
thoughts: "Thoughts",
|
|
92
|
-
usedTool: "Used tool",
|
|
93
92
|
toolResult: "Result",
|
|
94
93
|
sources: "Sources",
|
|
95
94
|
feedbackUp: "Good response",
|
|
@@ -147,25 +146,21 @@ var STRINGS_EN = {
|
|
|
147
146
|
inputSkipped: "Skipped",
|
|
148
147
|
showOptions: "Show options",
|
|
149
148
|
hideOptions: "Hide options",
|
|
150
|
-
qtypeText: "
|
|
151
|
-
qtypeEmail: "Email",
|
|
152
|
-
qtypePhone: "Phone",
|
|
149
|
+
qtypeText: "Your answer",
|
|
150
|
+
qtypeEmail: "Email address",
|
|
151
|
+
qtypePhone: "Phone number",
|
|
153
152
|
qtypeNumber: "Number",
|
|
154
153
|
qtypeDate: "Date",
|
|
155
|
-
qtypeChooseOne: "
|
|
156
|
-
qtypeChooseAny: "
|
|
154
|
+
qtypeChooseOne: "Pick one",
|
|
155
|
+
qtypeChooseAny: "Pick any",
|
|
157
156
|
qtypeBoolean: "Yes / No",
|
|
158
157
|
inputSubmit: "Submit answers",
|
|
159
158
|
inputSubmitHint: "Enter to send \xB7 Shift+Enter = new line",
|
|
160
159
|
inputSkip: "Skip",
|
|
161
160
|
confirmYes: "Yes",
|
|
162
161
|
confirmNo: "No",
|
|
163
|
-
approvalRequired: "Approval required",
|
|
164
162
|
approve: "Approve",
|
|
165
163
|
reject: "Reject",
|
|
166
|
-
approved: "Approved",
|
|
167
|
-
rejected: "Rejected",
|
|
168
|
-
approvalReason: "Add a reason (optional)",
|
|
169
164
|
approvalPrompt: "{tool} requires your approval to execute.",
|
|
170
165
|
approvalBody: "Review the tool input above and decide whether to allow this action.",
|
|
171
166
|
approvalYourResponse: "Your response: {decision}",
|
|
@@ -237,7 +232,6 @@ var STRINGS_FR = {
|
|
|
237
232
|
loading: "Chargement\u2026",
|
|
238
233
|
thinking: "R\xE9flexion\u2026",
|
|
239
234
|
thoughts: "R\xE9flexions",
|
|
240
|
-
usedTool: "Outil utilis\xE9",
|
|
241
235
|
toolResult: "R\xE9sultat",
|
|
242
236
|
sources: "Sources",
|
|
243
237
|
feedbackUp: "Bonne r\xE9ponse",
|
|
@@ -295,9 +289,9 @@ var STRINGS_FR = {
|
|
|
295
289
|
inputSkipped: "Ignor\xE9",
|
|
296
290
|
showOptions: "Afficher les options",
|
|
297
291
|
hideOptions: "Masquer les options",
|
|
298
|
-
qtypeText: "
|
|
299
|
-
qtypeEmail: "
|
|
300
|
-
qtypePhone: "
|
|
292
|
+
qtypeText: "Votre r\xE9ponse",
|
|
293
|
+
qtypeEmail: "Adresse e-mail",
|
|
294
|
+
qtypePhone: "Num\xE9ro de t\xE9l\xE9phone",
|
|
301
295
|
qtypeNumber: "Nombre",
|
|
302
296
|
qtypeDate: "Date",
|
|
303
297
|
qtypeChooseOne: "Choisir une",
|
|
@@ -308,12 +302,8 @@ var STRINGS_FR = {
|
|
|
308
302
|
inputSkip: "Ignorer",
|
|
309
303
|
confirmYes: "Oui",
|
|
310
304
|
confirmNo: "Non",
|
|
311
|
-
approvalRequired: "Approbation requise",
|
|
312
305
|
approve: "Approuver",
|
|
313
306
|
reject: "Refuser",
|
|
314
|
-
approved: "Approuv\xE9",
|
|
315
|
-
rejected: "Refus\xE9",
|
|
316
|
-
approvalReason: "Ajouter une raison (facultatif)",
|
|
317
307
|
approvalPrompt: "{tool} n\xE9cessite votre approbation pour s'ex\xE9cuter.",
|
|
318
308
|
approvalBody: "V\xE9rifiez les param\xE8tres ci-dessus et d\xE9cidez d'autoriser ou non cette action.",
|
|
319
309
|
approvalYourResponse: "Votre r\xE9ponse : {decision}",
|
|
@@ -385,7 +375,6 @@ var STRINGS_AR = {
|
|
|
385
375
|
loading: "\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",
|
|
386
376
|
thinking: "\u064A\u0641\u0643\u0651\u0631\u2026",
|
|
387
377
|
thoughts: "\u0627\u0644\u0623\u0641\u0643\u0627\u0631",
|
|
388
|
-
usedTool: "\u0623\u062F\u0627\u0629 \u0645\u064F\u0633\u062A\u062E\u062F\u064E\u0645\u0629",
|
|
389
378
|
toolResult: "\u0627\u0644\u0646\u062A\u064A\u062C\u0629",
|
|
390
379
|
sources: "\u0627\u0644\u0645\u0635\u0627\u062F\u0631",
|
|
391
380
|
feedbackUp: "\u0631\u062F \u062C\u064A\u062F",
|
|
@@ -443,9 +432,9 @@ var STRINGS_AR = {
|
|
|
443
432
|
inputSkipped: "\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A",
|
|
444
433
|
showOptions: "\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",
|
|
445
434
|
hideOptions: "\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",
|
|
446
|
-
qtypeText: "\u0625\u062C\u0627\u0628\
|
|
447
|
-
qtypeEmail: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
|
|
448
|
-
qtypePhone: "\u0647\u0627\u062A\u0641",
|
|
435
|
+
qtypeText: "\u0625\u062C\u0627\u0628\u062A\u0643",
|
|
436
|
+
qtypeEmail: "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
|
|
437
|
+
qtypePhone: "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641",
|
|
449
438
|
qtypeNumber: "\u0631\u0642\u0645",
|
|
450
439
|
qtypeDate: "\u062A\u0627\u0631\u064A\u062E",
|
|
451
440
|
qtypeChooseOne: "\u0627\u062E\u062A\u0631 \u0648\u0627\u062D\u062F\u064B\u0627",
|
|
@@ -456,12 +445,8 @@ var STRINGS_AR = {
|
|
|
456
445
|
inputSkip: "\u062A\u062E\u0637\u064D\u0651",
|
|
457
446
|
confirmYes: "\u0646\u0639\u0645",
|
|
458
447
|
confirmNo: "\u0644\u0627",
|
|
459
|
-
approvalRequired: "\u0645\u0637\u0644\u0648\u0628 \u0645\u0648\u0627\u0641\u0642\u0629",
|
|
460
448
|
approve: "\u0645\u0648\u0627\u0641\u0642\u0629",
|
|
461
449
|
reject: "\u0631\u0641\u0636",
|
|
462
|
-
approved: "\u062A\u0645\u062A \u0627\u0644\u0645\u0648\u0627\u0641\u0642\u0629",
|
|
463
|
-
rejected: "\u0645\u0631\u0641\u0648\u0636",
|
|
464
|
-
approvalReason: "\u0623\u0636\u0641 \u0633\u0628\u0628\u064B\u0627 (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",
|
|
465
450
|
approvalPrompt: "\u062A\u062A\u0637\u0644\u0628 {tool} \u0645\u0648\u0627\u0641\u0642\u062A\u0643 \u0644\u0644\u062A\u0646\u0641\u064A\u0630.",
|
|
466
451
|
approvalBody: "\u0631\u0627\u062C\u0639 \u0645\u064F\u0639\u0637\u064A\u0627\u062A \u0627\u0644\u0623\u062F\u0627\u0629 \u0623\u0639\u0644\u0627\u0647 \u0648\u0642\u0631\u0651\u0631 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0623\u0648 \u0631\u0641\u0636\u0647.",
|
|
467
452
|
approvalYourResponse: "\u0631\u062F\u0651\u0643: {decision}",
|
|
@@ -533,7 +518,6 @@ var STRINGS_ES = {
|
|
|
533
518
|
loading: "Cargando\u2026",
|
|
534
519
|
thinking: "Pensando\u2026",
|
|
535
520
|
thoughts: "Razonamiento",
|
|
536
|
-
usedTool: "Herramienta usada",
|
|
537
521
|
toolResult: "Resultado",
|
|
538
522
|
sources: "Fuentes",
|
|
539
523
|
feedbackUp: "Buena respuesta",
|
|
@@ -591,9 +575,9 @@ var STRINGS_ES = {
|
|
|
591
575
|
inputSkipped: "Omitido",
|
|
592
576
|
showOptions: "Mostrar opciones",
|
|
593
577
|
hideOptions: "Ocultar opciones",
|
|
594
|
-
qtypeText: "
|
|
595
|
-
qtypeEmail: "Correo",
|
|
596
|
-
qtypePhone: "
|
|
578
|
+
qtypeText: "Tu respuesta",
|
|
579
|
+
qtypeEmail: "Correo electr\xF3nico",
|
|
580
|
+
qtypePhone: "N\xFAmero de tel\xE9fono",
|
|
597
581
|
qtypeNumber: "N\xFAmero",
|
|
598
582
|
qtypeDate: "Fecha",
|
|
599
583
|
qtypeChooseOne: "Elige una",
|
|
@@ -604,12 +588,8 @@ var STRINGS_ES = {
|
|
|
604
588
|
inputSkip: "Omitir",
|
|
605
589
|
confirmYes: "S\xED",
|
|
606
590
|
confirmNo: "No",
|
|
607
|
-
approvalRequired: "Aprobaci\xF3n requerida",
|
|
608
591
|
approve: "Aprobar",
|
|
609
592
|
reject: "Rechazar",
|
|
610
|
-
approved: "Aprobado",
|
|
611
|
-
rejected: "Rechazado",
|
|
612
|
-
approvalReason: "A\xF1ade un motivo (opcional)",
|
|
613
593
|
approvalPrompt: "{tool} requiere tu aprobaci\xF3n para ejecutarse.",
|
|
614
594
|
approvalBody: "Revisa los par\xE1metros de arriba y decide si permites esta acci\xF3n.",
|
|
615
595
|
approvalYourResponse: "Tu respuesta: {decision}",
|
|
@@ -681,7 +661,6 @@ var STRINGS_HE = {
|
|
|
681
661
|
loading: "\u05D8\u05D5\u05E2\u05DF\u2026",
|
|
682
662
|
thinking: "\u05D7\u05D5\u05E9\u05D1\u2026",
|
|
683
663
|
thoughts: "\u05DE\u05D7\u05E9\u05D1\u05D5\u05EA",
|
|
684
|
-
usedTool: "\u05DB\u05DC\u05D9 \u05D1\u05E9\u05D9\u05DE\u05D5\u05E9",
|
|
685
664
|
toolResult: "\u05EA\u05D5\u05E6\u05D0\u05D4",
|
|
686
665
|
sources: "\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",
|
|
687
666
|
feedbackUp: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",
|
|
@@ -739,9 +718,9 @@ var STRINGS_HE = {
|
|
|
739
718
|
inputSkipped: "\u05D3\u05D5\u05DC\u05D2",
|
|
740
719
|
showOptions: "\u05D4\u05E6\u05D2 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",
|
|
741
720
|
hideOptions: "\u05D4\u05E1\u05EA\u05E8 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",
|
|
742
|
-
qtypeText: "\u05EA\u05E9\u05D5\u05D1\
|
|
743
|
-
qtypeEmail: "\u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",
|
|
744
|
-
qtypePhone: "\u05D8\u05DC\u05E4\u05D5\u05DF",
|
|
721
|
+
qtypeText: "\u05D4\u05EA\u05E9\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA",
|
|
722
|
+
qtypeEmail: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",
|
|
723
|
+
qtypePhone: "\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF",
|
|
745
724
|
qtypeNumber: "\u05DE\u05E1\u05E4\u05E8",
|
|
746
725
|
qtypeDate: "\u05EA\u05D0\u05E8\u05D9\u05DA",
|
|
747
726
|
qtypeChooseOne: "\u05D1\u05D7\u05E8 \u05D0\u05D7\u05EA",
|
|
@@ -752,12 +731,8 @@ var STRINGS_HE = {
|
|
|
752
731
|
inputSkip: "\u05D3\u05D9\u05DC\u05D5\u05D2",
|
|
753
732
|
confirmYes: "\u05DB\u05DF",
|
|
754
733
|
confirmNo: "\u05DC\u05D0",
|
|
755
|
-
approvalRequired: "\u05E0\u05D3\u05E8\u05E9 \u05D0\u05D9\u05E9\u05D5\u05E8",
|
|
756
734
|
approve: "\u05D0\u05D9\u05E9\u05D5\u05E8",
|
|
757
735
|
reject: "\u05D3\u05D7\u05D9\u05D9\u05D4",
|
|
758
|
-
approved: "\u05D0\u05D5\u05E9\u05E8",
|
|
759
|
-
rejected: "\u05E0\u05D3\u05D7\u05D4",
|
|
760
|
-
approvalReason: "\u05D4\u05D5\u05E1\u05E3 \u05E1\u05D9\u05D1\u05D4 (\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)",
|
|
761
736
|
approvalPrompt: "\u05D4\u05DB\u05DC\u05D9 {tool} \u05D3\u05D5\u05E8\u05E9 \u05D0\u05EA \u05D0\u05D9\u05E9\u05D5\u05E8\u05DA \u05DB\u05D3\u05D9 \u05DC\u05E4\u05E2\u05D5\u05DC.",
|
|
762
737
|
approvalBody: "\u05D1\u05D3\u05D5\u05E7 \u05D0\u05EA \u05E4\u05E8\u05DE\u05D8\u05E8\u05D9 \u05D4\u05DB\u05DC\u05D9 \u05E9\u05DC\u05DE\u05E2\u05DC\u05D4 \u05D5\u05D4\u05D7\u05DC\u05D8 \u05D0\u05DD \u05DC\u05D0\u05E9\u05E8 \u05E4\u05E2\u05D5\u05DC\u05D4 \u05D6\u05D5.",
|
|
763
738
|
approvalYourResponse: "\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA: {decision}",
|
|
@@ -2586,7 +2561,7 @@ var AgentTransport = class {
|
|
|
2586
2561
|
settingsKeys: Object.keys(userPrefs)
|
|
2587
2562
|
});
|
|
2588
2563
|
const res = await this.postJson(DEFAULT_PATHS.updateSettings, { userPrefs }, "saveUserPrefs");
|
|
2589
|
-
log6.debug("saveUserPrefs \u2190", {
|
|
2564
|
+
log6.debug("saveUserPrefs \u2190", { success: res.success });
|
|
2590
2565
|
return res;
|
|
2591
2566
|
}
|
|
2592
2567
|
get uploadPath() {
|
|
@@ -5653,6 +5628,12 @@ function toolDecisionState(state, approval) {
|
|
|
5653
5628
|
const responded = state === "approval-responded" || approval?.approved !== void 0;
|
|
5654
5629
|
return { terminal, responded, decided: terminal || responded };
|
|
5655
5630
|
}
|
|
5631
|
+
function StatusPill({ status, icon, label }) {
|
|
5632
|
+
return /* @__PURE__ */ jsxs12("span", { class: `${p14}-toolui-badge ${p14}-toolui-status`, "data-status": status, children: [
|
|
5633
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-status-icon`, children: icon }),
|
|
5634
|
+
label
|
|
5635
|
+
] });
|
|
5636
|
+
}
|
|
5656
5637
|
function statusOf(state, approval) {
|
|
5657
5638
|
if (state === "output-error") return "error";
|
|
5658
5639
|
if (state === "output-denied" || approval?.approved === false) return "denied";
|
|
@@ -5692,10 +5673,7 @@ function ToolStatus({
|
|
|
5692
5673
|
}) {
|
|
5693
5674
|
const base = statusOf(state, approval);
|
|
5694
5675
|
const status = superseded && (base === "awaiting" || base === "running") ? "superseded" : base;
|
|
5695
|
-
return /* @__PURE__ */
|
|
5696
|
-
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-status-icon`, children: /* @__PURE__ */ jsx15(StatusIcon, { status }) }),
|
|
5697
|
-
statusLabel(status, strings)
|
|
5698
|
-
] });
|
|
5676
|
+
return /* @__PURE__ */ jsx15(StatusPill, { status, icon: /* @__PURE__ */ jsx15(StatusIcon, { status }), label: statusLabel(status, strings) });
|
|
5699
5677
|
}
|
|
5700
5678
|
function ToolHeaderRow({
|
|
5701
5679
|
name,
|
|
@@ -5920,18 +5898,18 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5920
5898
|
const req = useComputed4(() => parseAskUserQuestions(part.inputSig.value)).value;
|
|
5921
5899
|
const { terminal, decided } = toolDecisionState(state, approval);
|
|
5922
5900
|
const answered = decided && approval?.approved === true;
|
|
5923
|
-
const
|
|
5924
|
-
const skipped = !
|
|
5901
|
+
const awaiting = !decided && !superseded;
|
|
5902
|
+
const skipped = !awaiting && !answered;
|
|
5925
5903
|
const canEdit = answered && active && !terminal;
|
|
5926
5904
|
const questions = req.questions;
|
|
5927
5905
|
const [manualOpen, setManualOpen] = useState7(null);
|
|
5928
|
-
const openDefault =
|
|
5906
|
+
const openDefault = awaiting || answered;
|
|
5929
5907
|
const isOpen = manualOpen ?? openDefault;
|
|
5930
5908
|
const [showOptions, setShowOptions] = useState7(false);
|
|
5931
5909
|
const QIcon = questions.length > 1 ? ChatIcon : HelpIcon;
|
|
5932
|
-
const identity =
|
|
5910
|
+
const identity = awaiting ? strings.inputRequired : strings.inputBadge;
|
|
5933
5911
|
const body = (() => {
|
|
5934
|
-
if (
|
|
5912
|
+
if (awaiting) {
|
|
5935
5913
|
return /* @__PURE__ */ jsx17(EditableForm, { req, strings, resolve: (reason, ok) => onDecision(part.toolCallId, ok, reason) });
|
|
5936
5914
|
}
|
|
5937
5915
|
if (showOptions) {
|
|
@@ -5968,7 +5946,7 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5968
5946
|
const next = e.currentTarget.open;
|
|
5969
5947
|
if (next !== isOpen) setManualOpen(next);
|
|
5970
5948
|
},
|
|
5971
|
-
"data-testid":
|
|
5949
|
+
"data-testid": awaiting ? TID.toolAskQuestions : TID.toolDecision,
|
|
5972
5950
|
children: [
|
|
5973
5951
|
/* @__PURE__ */ jsxs14("summary", { class: `${p16}-toolui-head`, children: [
|
|
5974
5952
|
/* @__PURE__ */ jsxs14("span", { class: `${p16}-toolui-q-pill`, children: [
|
|
@@ -5976,13 +5954,16 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5976
5954
|
identity
|
|
5977
5955
|
] }),
|
|
5978
5956
|
/* @__PURE__ */ jsxs14("span", { class: `${p16}-toolui-head-end`, children: [
|
|
5979
|
-
|
|
5980
|
-
//
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5957
|
+
awaiting ? null : (
|
|
5958
|
+
// Reuse the tool-call status-pill shell — green check = answered, muted ✕ = skipped.
|
|
5959
|
+
/* @__PURE__ */ jsx17(
|
|
5960
|
+
StatusPill,
|
|
5961
|
+
{
|
|
5962
|
+
status: skipped ? "superseded" : "completed",
|
|
5963
|
+
icon: skipped ? /* @__PURE__ */ jsx17(XCircleIcon, {}) : /* @__PURE__ */ jsx17(CheckCircleIcon, {}),
|
|
5964
|
+
label: skipped ? strings.inputSkipped : strings.inputAnswered
|
|
5965
|
+
}
|
|
5966
|
+
)
|
|
5986
5967
|
),
|
|
5987
5968
|
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-chevron`, children: /* @__PURE__ */ jsx17(ChevronDownIcon, {}) })
|
|
5988
5969
|
] })
|
|
@@ -5990,7 +5971,7 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5990
5971
|
/* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-collapse-body`, children: [
|
|
5991
5972
|
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5992
5973
|
body,
|
|
5993
|
-
|
|
5974
|
+
awaiting ? null : /* @__PURE__ */ jsxs14(
|
|
5994
5975
|
"button",
|
|
5995
5976
|
{
|
|
5996
5977
|
type: "button",
|
package/package.json
CHANGED
package/web-component.mjs
CHANGED
|
@@ -85,7 +85,6 @@ var STRINGS_EN = {
|
|
|
85
85
|
loading: "Loading\u2026",
|
|
86
86
|
thinking: "Thinking\u2026",
|
|
87
87
|
thoughts: "Thoughts",
|
|
88
|
-
usedTool: "Used tool",
|
|
89
88
|
toolResult: "Result",
|
|
90
89
|
sources: "Sources",
|
|
91
90
|
feedbackUp: "Good response",
|
|
@@ -143,25 +142,21 @@ var STRINGS_EN = {
|
|
|
143
142
|
inputSkipped: "Skipped",
|
|
144
143
|
showOptions: "Show options",
|
|
145
144
|
hideOptions: "Hide options",
|
|
146
|
-
qtypeText: "
|
|
147
|
-
qtypeEmail: "Email",
|
|
148
|
-
qtypePhone: "Phone",
|
|
145
|
+
qtypeText: "Your answer",
|
|
146
|
+
qtypeEmail: "Email address",
|
|
147
|
+
qtypePhone: "Phone number",
|
|
149
148
|
qtypeNumber: "Number",
|
|
150
149
|
qtypeDate: "Date",
|
|
151
|
-
qtypeChooseOne: "
|
|
152
|
-
qtypeChooseAny: "
|
|
150
|
+
qtypeChooseOne: "Pick one",
|
|
151
|
+
qtypeChooseAny: "Pick any",
|
|
153
152
|
qtypeBoolean: "Yes / No",
|
|
154
153
|
inputSubmit: "Submit answers",
|
|
155
154
|
inputSubmitHint: "Enter to send \xB7 Shift+Enter = new line",
|
|
156
155
|
inputSkip: "Skip",
|
|
157
156
|
confirmYes: "Yes",
|
|
158
157
|
confirmNo: "No",
|
|
159
|
-
approvalRequired: "Approval required",
|
|
160
158
|
approve: "Approve",
|
|
161
159
|
reject: "Reject",
|
|
162
|
-
approved: "Approved",
|
|
163
|
-
rejected: "Rejected",
|
|
164
|
-
approvalReason: "Add a reason (optional)",
|
|
165
160
|
approvalPrompt: "{tool} requires your approval to execute.",
|
|
166
161
|
approvalBody: "Review the tool input above and decide whether to allow this action.",
|
|
167
162
|
approvalYourResponse: "Your response: {decision}",
|
|
@@ -233,7 +228,6 @@ var STRINGS_FR = {
|
|
|
233
228
|
loading: "Chargement\u2026",
|
|
234
229
|
thinking: "R\xE9flexion\u2026",
|
|
235
230
|
thoughts: "R\xE9flexions",
|
|
236
|
-
usedTool: "Outil utilis\xE9",
|
|
237
231
|
toolResult: "R\xE9sultat",
|
|
238
232
|
sources: "Sources",
|
|
239
233
|
feedbackUp: "Bonne r\xE9ponse",
|
|
@@ -291,9 +285,9 @@ var STRINGS_FR = {
|
|
|
291
285
|
inputSkipped: "Ignor\xE9",
|
|
292
286
|
showOptions: "Afficher les options",
|
|
293
287
|
hideOptions: "Masquer les options",
|
|
294
|
-
qtypeText: "
|
|
295
|
-
qtypeEmail: "
|
|
296
|
-
qtypePhone: "
|
|
288
|
+
qtypeText: "Votre r\xE9ponse",
|
|
289
|
+
qtypeEmail: "Adresse e-mail",
|
|
290
|
+
qtypePhone: "Num\xE9ro de t\xE9l\xE9phone",
|
|
297
291
|
qtypeNumber: "Nombre",
|
|
298
292
|
qtypeDate: "Date",
|
|
299
293
|
qtypeChooseOne: "Choisir une",
|
|
@@ -304,12 +298,8 @@ var STRINGS_FR = {
|
|
|
304
298
|
inputSkip: "Ignorer",
|
|
305
299
|
confirmYes: "Oui",
|
|
306
300
|
confirmNo: "Non",
|
|
307
|
-
approvalRequired: "Approbation requise",
|
|
308
301
|
approve: "Approuver",
|
|
309
302
|
reject: "Refuser",
|
|
310
|
-
approved: "Approuv\xE9",
|
|
311
|
-
rejected: "Refus\xE9",
|
|
312
|
-
approvalReason: "Ajouter une raison (facultatif)",
|
|
313
303
|
approvalPrompt: "{tool} n\xE9cessite votre approbation pour s'ex\xE9cuter.",
|
|
314
304
|
approvalBody: "V\xE9rifiez les param\xE8tres ci-dessus et d\xE9cidez d'autoriser ou non cette action.",
|
|
315
305
|
approvalYourResponse: "Votre r\xE9ponse : {decision}",
|
|
@@ -381,7 +371,6 @@ var STRINGS_AR = {
|
|
|
381
371
|
loading: "\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644\u2026",
|
|
382
372
|
thinking: "\u064A\u0641\u0643\u0651\u0631\u2026",
|
|
383
373
|
thoughts: "\u0627\u0644\u0623\u0641\u0643\u0627\u0631",
|
|
384
|
-
usedTool: "\u0623\u062F\u0627\u0629 \u0645\u064F\u0633\u062A\u062E\u062F\u064E\u0645\u0629",
|
|
385
374
|
toolResult: "\u0627\u0644\u0646\u062A\u064A\u062C\u0629",
|
|
386
375
|
sources: "\u0627\u0644\u0645\u0635\u0627\u062F\u0631",
|
|
387
376
|
feedbackUp: "\u0631\u062F \u062C\u064A\u062F",
|
|
@@ -439,9 +428,9 @@ var STRINGS_AR = {
|
|
|
439
428
|
inputSkipped: "\u062A\u0645 \u0627\u0644\u062A\u062E\u0637\u064A",
|
|
440
429
|
showOptions: "\u0625\u0638\u0647\u0627\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",
|
|
441
430
|
hideOptions: "\u0625\u062E\u0641\u0627\u0621 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A",
|
|
442
|
-
qtypeText: "\u0625\u062C\u0627\u0628\
|
|
443
|
-
qtypeEmail: "\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
|
|
444
|
-
qtypePhone: "\u0647\u0627\u062A\u0641",
|
|
431
|
+
qtypeText: "\u0625\u062C\u0627\u0628\u062A\u0643",
|
|
432
|
+
qtypeEmail: "\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
|
|
433
|
+
qtypePhone: "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641",
|
|
445
434
|
qtypeNumber: "\u0631\u0642\u0645",
|
|
446
435
|
qtypeDate: "\u062A\u0627\u0631\u064A\u062E",
|
|
447
436
|
qtypeChooseOne: "\u0627\u062E\u062A\u0631 \u0648\u0627\u062D\u062F\u064B\u0627",
|
|
@@ -452,12 +441,8 @@ var STRINGS_AR = {
|
|
|
452
441
|
inputSkip: "\u062A\u062E\u0637\u064D\u0651",
|
|
453
442
|
confirmYes: "\u0646\u0639\u0645",
|
|
454
443
|
confirmNo: "\u0644\u0627",
|
|
455
|
-
approvalRequired: "\u0645\u0637\u0644\u0648\u0628 \u0645\u0648\u0627\u0641\u0642\u0629",
|
|
456
444
|
approve: "\u0645\u0648\u0627\u0641\u0642\u0629",
|
|
457
445
|
reject: "\u0631\u0641\u0636",
|
|
458
|
-
approved: "\u062A\u0645\u062A \u0627\u0644\u0645\u0648\u0627\u0641\u0642\u0629",
|
|
459
|
-
rejected: "\u0645\u0631\u0641\u0648\u0636",
|
|
460
|
-
approvalReason: "\u0623\u0636\u0641 \u0633\u0628\u0628\u064B\u0627 (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",
|
|
461
446
|
approvalPrompt: "\u062A\u062A\u0637\u0644\u0628 {tool} \u0645\u0648\u0627\u0641\u0642\u062A\u0643 \u0644\u0644\u062A\u0646\u0641\u064A\u0630.",
|
|
462
447
|
approvalBody: "\u0631\u0627\u062C\u0639 \u0645\u064F\u0639\u0637\u064A\u0627\u062A \u0627\u0644\u0623\u062F\u0627\u0629 \u0623\u0639\u0644\u0627\u0647 \u0648\u0642\u0631\u0651\u0631 \u0627\u0644\u0633\u0645\u0627\u062D \u0628\u0647\u0630\u0627 \u0627\u0644\u0625\u062C\u0631\u0627\u0621 \u0623\u0648 \u0631\u0641\u0636\u0647.",
|
|
463
448
|
approvalYourResponse: "\u0631\u062F\u0651\u0643: {decision}",
|
|
@@ -529,7 +514,6 @@ var STRINGS_ES = {
|
|
|
529
514
|
loading: "Cargando\u2026",
|
|
530
515
|
thinking: "Pensando\u2026",
|
|
531
516
|
thoughts: "Razonamiento",
|
|
532
|
-
usedTool: "Herramienta usada",
|
|
533
517
|
toolResult: "Resultado",
|
|
534
518
|
sources: "Fuentes",
|
|
535
519
|
feedbackUp: "Buena respuesta",
|
|
@@ -587,9 +571,9 @@ var STRINGS_ES = {
|
|
|
587
571
|
inputSkipped: "Omitido",
|
|
588
572
|
showOptions: "Mostrar opciones",
|
|
589
573
|
hideOptions: "Ocultar opciones",
|
|
590
|
-
qtypeText: "
|
|
591
|
-
qtypeEmail: "Correo",
|
|
592
|
-
qtypePhone: "
|
|
574
|
+
qtypeText: "Tu respuesta",
|
|
575
|
+
qtypeEmail: "Correo electr\xF3nico",
|
|
576
|
+
qtypePhone: "N\xFAmero de tel\xE9fono",
|
|
593
577
|
qtypeNumber: "N\xFAmero",
|
|
594
578
|
qtypeDate: "Fecha",
|
|
595
579
|
qtypeChooseOne: "Elige una",
|
|
@@ -600,12 +584,8 @@ var STRINGS_ES = {
|
|
|
600
584
|
inputSkip: "Omitir",
|
|
601
585
|
confirmYes: "S\xED",
|
|
602
586
|
confirmNo: "No",
|
|
603
|
-
approvalRequired: "Aprobaci\xF3n requerida",
|
|
604
587
|
approve: "Aprobar",
|
|
605
588
|
reject: "Rechazar",
|
|
606
|
-
approved: "Aprobado",
|
|
607
|
-
rejected: "Rechazado",
|
|
608
|
-
approvalReason: "A\xF1ade un motivo (opcional)",
|
|
609
589
|
approvalPrompt: "{tool} requiere tu aprobaci\xF3n para ejecutarse.",
|
|
610
590
|
approvalBody: "Revisa los par\xE1metros de arriba y decide si permites esta acci\xF3n.",
|
|
611
591
|
approvalYourResponse: "Tu respuesta: {decision}",
|
|
@@ -677,7 +657,6 @@ var STRINGS_HE = {
|
|
|
677
657
|
loading: "\u05D8\u05D5\u05E2\u05DF\u2026",
|
|
678
658
|
thinking: "\u05D7\u05D5\u05E9\u05D1\u2026",
|
|
679
659
|
thoughts: "\u05DE\u05D7\u05E9\u05D1\u05D5\u05EA",
|
|
680
|
-
usedTool: "\u05DB\u05DC\u05D9 \u05D1\u05E9\u05D9\u05DE\u05D5\u05E9",
|
|
681
660
|
toolResult: "\u05EA\u05D5\u05E6\u05D0\u05D4",
|
|
682
661
|
sources: "\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",
|
|
683
662
|
feedbackUp: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",
|
|
@@ -735,9 +714,9 @@ var STRINGS_HE = {
|
|
|
735
714
|
inputSkipped: "\u05D3\u05D5\u05DC\u05D2",
|
|
736
715
|
showOptions: "\u05D4\u05E6\u05D2 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",
|
|
737
716
|
hideOptions: "\u05D4\u05E1\u05EA\u05E8 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA",
|
|
738
|
-
qtypeText: "\u05EA\u05E9\u05D5\u05D1\
|
|
739
|
-
qtypeEmail: "\u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",
|
|
740
|
-
qtypePhone: "\u05D8\u05DC\u05E4\u05D5\u05DF",
|
|
717
|
+
qtypeText: "\u05D4\u05EA\u05E9\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA",
|
|
718
|
+
qtypeEmail: "\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",
|
|
719
|
+
qtypePhone: "\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF",
|
|
741
720
|
qtypeNumber: "\u05DE\u05E1\u05E4\u05E8",
|
|
742
721
|
qtypeDate: "\u05EA\u05D0\u05E8\u05D9\u05DA",
|
|
743
722
|
qtypeChooseOne: "\u05D1\u05D7\u05E8 \u05D0\u05D7\u05EA",
|
|
@@ -748,12 +727,8 @@ var STRINGS_HE = {
|
|
|
748
727
|
inputSkip: "\u05D3\u05D9\u05DC\u05D5\u05D2",
|
|
749
728
|
confirmYes: "\u05DB\u05DF",
|
|
750
729
|
confirmNo: "\u05DC\u05D0",
|
|
751
|
-
approvalRequired: "\u05E0\u05D3\u05E8\u05E9 \u05D0\u05D9\u05E9\u05D5\u05E8",
|
|
752
730
|
approve: "\u05D0\u05D9\u05E9\u05D5\u05E8",
|
|
753
731
|
reject: "\u05D3\u05D7\u05D9\u05D9\u05D4",
|
|
754
|
-
approved: "\u05D0\u05D5\u05E9\u05E8",
|
|
755
|
-
rejected: "\u05E0\u05D3\u05D7\u05D4",
|
|
756
|
-
approvalReason: "\u05D4\u05D5\u05E1\u05E3 \u05E1\u05D9\u05D1\u05D4 (\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)",
|
|
757
732
|
approvalPrompt: "\u05D4\u05DB\u05DC\u05D9 {tool} \u05D3\u05D5\u05E8\u05E9 \u05D0\u05EA \u05D0\u05D9\u05E9\u05D5\u05E8\u05DA \u05DB\u05D3\u05D9 \u05DC\u05E4\u05E2\u05D5\u05DC.",
|
|
758
733
|
approvalBody: "\u05D1\u05D3\u05D5\u05E7 \u05D0\u05EA \u05E4\u05E8\u05DE\u05D8\u05E8\u05D9 \u05D4\u05DB\u05DC\u05D9 \u05E9\u05DC\u05DE\u05E2\u05DC\u05D4 \u05D5\u05D4\u05D7\u05DC\u05D8 \u05D0\u05DD \u05DC\u05D0\u05E9\u05E8 \u05E4\u05E2\u05D5\u05DC\u05D4 \u05D6\u05D5.",
|
|
759
734
|
approvalYourResponse: "\u05D4\u05EA\u05D2\u05D5\u05D1\u05D4 \u05E9\u05DC\u05DA: {decision}",
|
|
@@ -1959,7 +1934,7 @@ function createAuth(opts) {
|
|
|
1959
1934
|
}
|
|
1960
1935
|
|
|
1961
1936
|
// src/core/version.ts
|
|
1962
|
-
var ELEMENTS_VERSION = true ? "0.58.
|
|
1937
|
+
var ELEMENTS_VERSION = true ? "0.58.2" : "0.0.0-dev";
|
|
1963
1938
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1964
1939
|
|
|
1965
1940
|
// src/stream/types.ts
|
|
@@ -2545,7 +2520,7 @@ var AgentTransport = class {
|
|
|
2545
2520
|
settingsKeys: Object.keys(userPrefs)
|
|
2546
2521
|
});
|
|
2547
2522
|
const res = await this.postJson(DEFAULT_PATHS.updateSettings, { userPrefs }, "saveUserPrefs");
|
|
2548
|
-
log5.debug("saveUserPrefs \u2190", {
|
|
2523
|
+
log5.debug("saveUserPrefs \u2190", { success: res.success });
|
|
2549
2524
|
return res;
|
|
2550
2525
|
}
|
|
2551
2526
|
get uploadPath() {
|
|
@@ -5612,6 +5587,12 @@ function toolDecisionState(state, approval) {
|
|
|
5612
5587
|
const responded = state === "approval-responded" || approval?.approved !== void 0;
|
|
5613
5588
|
return { terminal, responded, decided: terminal || responded };
|
|
5614
5589
|
}
|
|
5590
|
+
function StatusPill({ status, icon, label }) {
|
|
5591
|
+
return /* @__PURE__ */ jsxs12("span", { class: `${p14}-toolui-badge ${p14}-toolui-status`, "data-status": status, children: [
|
|
5592
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-status-icon`, children: icon }),
|
|
5593
|
+
label
|
|
5594
|
+
] });
|
|
5595
|
+
}
|
|
5615
5596
|
function statusOf(state, approval) {
|
|
5616
5597
|
if (state === "output-error") return "error";
|
|
5617
5598
|
if (state === "output-denied" || approval?.approved === false) return "denied";
|
|
@@ -5651,10 +5632,7 @@ function ToolStatus({
|
|
|
5651
5632
|
}) {
|
|
5652
5633
|
const base = statusOf(state, approval);
|
|
5653
5634
|
const status = superseded && (base === "awaiting" || base === "running") ? "superseded" : base;
|
|
5654
|
-
return /* @__PURE__ */
|
|
5655
|
-
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-status-icon`, children: /* @__PURE__ */ jsx15(StatusIcon, { status }) }),
|
|
5656
|
-
statusLabel(status, strings)
|
|
5657
|
-
] });
|
|
5635
|
+
return /* @__PURE__ */ jsx15(StatusPill, { status, icon: /* @__PURE__ */ jsx15(StatusIcon, { status }), label: statusLabel(status, strings) });
|
|
5658
5636
|
}
|
|
5659
5637
|
function ToolHeaderRow({
|
|
5660
5638
|
name,
|
|
@@ -5879,18 +5857,18 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5879
5857
|
const req = useComputed4(() => parseAskUserQuestions(part.inputSig.value)).value;
|
|
5880
5858
|
const { terminal, decided } = toolDecisionState(state, approval);
|
|
5881
5859
|
const answered = decided && approval?.approved === true;
|
|
5882
|
-
const
|
|
5883
|
-
const skipped = !
|
|
5860
|
+
const awaiting = !decided && !superseded;
|
|
5861
|
+
const skipped = !awaiting && !answered;
|
|
5884
5862
|
const canEdit = answered && active && !terminal;
|
|
5885
5863
|
const questions = req.questions;
|
|
5886
5864
|
const [manualOpen, setManualOpen] = useState7(null);
|
|
5887
|
-
const openDefault =
|
|
5865
|
+
const openDefault = awaiting || answered;
|
|
5888
5866
|
const isOpen = manualOpen ?? openDefault;
|
|
5889
5867
|
const [showOptions, setShowOptions] = useState7(false);
|
|
5890
5868
|
const QIcon = questions.length > 1 ? ChatIcon : HelpIcon;
|
|
5891
|
-
const identity =
|
|
5869
|
+
const identity = awaiting ? strings.inputRequired : strings.inputBadge;
|
|
5892
5870
|
const body = (() => {
|
|
5893
|
-
if (
|
|
5871
|
+
if (awaiting) {
|
|
5894
5872
|
return /* @__PURE__ */ jsx17(EditableForm, { req, strings, resolve: (reason, ok) => onDecision(part.toolCallId, ok, reason) });
|
|
5895
5873
|
}
|
|
5896
5874
|
if (showOptions) {
|
|
@@ -5927,7 +5905,7 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5927
5905
|
const next = e.currentTarget.open;
|
|
5928
5906
|
if (next !== isOpen) setManualOpen(next);
|
|
5929
5907
|
},
|
|
5930
|
-
"data-testid":
|
|
5908
|
+
"data-testid": awaiting ? TID.toolAskQuestions : TID.toolDecision,
|
|
5931
5909
|
children: [
|
|
5932
5910
|
/* @__PURE__ */ jsxs14("summary", { class: `${p16}-toolui-head`, children: [
|
|
5933
5911
|
/* @__PURE__ */ jsxs14("span", { class: `${p16}-toolui-q-pill`, children: [
|
|
@@ -5935,13 +5913,16 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5935
5913
|
identity
|
|
5936
5914
|
] }),
|
|
5937
5915
|
/* @__PURE__ */ jsxs14("span", { class: `${p16}-toolui-head-end`, children: [
|
|
5938
|
-
|
|
5939
|
-
//
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5916
|
+
awaiting ? null : (
|
|
5917
|
+
// Reuse the tool-call status-pill shell — green check = answered, muted ✕ = skipped.
|
|
5918
|
+
/* @__PURE__ */ jsx17(
|
|
5919
|
+
StatusPill,
|
|
5920
|
+
{
|
|
5921
|
+
status: skipped ? "superseded" : "completed",
|
|
5922
|
+
icon: skipped ? /* @__PURE__ */ jsx17(XCircleIcon, {}) : /* @__PURE__ */ jsx17(CheckCircleIcon, {}),
|
|
5923
|
+
label: skipped ? strings.inputSkipped : strings.inputAnswered
|
|
5924
|
+
}
|
|
5925
|
+
)
|
|
5945
5926
|
),
|
|
5946
5927
|
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-chevron`, children: /* @__PURE__ */ jsx17(ChevronDownIcon, {}) })
|
|
5947
5928
|
] })
|
|
@@ -5949,7 +5930,7 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5949
5930
|
/* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-collapse-body`, children: [
|
|
5950
5931
|
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5951
5932
|
body,
|
|
5952
|
-
|
|
5933
|
+
awaiting ? null : /* @__PURE__ */ jsxs14(
|
|
5953
5934
|
"button",
|
|
5954
5935
|
{
|
|
5955
5936
|
type: "button",
|