@helpai/elements 0.13.0 → 0.13.1
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 +7 -7
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +7 -7
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +7 -7
- package/elements.esm.js.map +3 -3
- package/elements.js +7 -7
- package/elements.js.map +3 -3
- package/index.d.ts +1 -1
- package/index.mjs +7 -8
- package/package.json +1 -1
- package/schema.d.ts +41 -41
- package/web-component.mjs +7 -8
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, L as Link, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, L as Link, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-Big98MYV.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
package/index.mjs
CHANGED
|
@@ -1914,9 +1914,7 @@ import { signal as signal2 } from "@preact/signals";
|
|
|
1914
1914
|
// src/stream/constants.ts
|
|
1915
1915
|
var ASK_USER_INPUT_TOOL = "tool:ask-user-input";
|
|
1916
1916
|
function isAskUserInputTool(toolName) {
|
|
1917
|
-
|
|
1918
|
-
const t = toolName.toLowerCase();
|
|
1919
|
-
return t === ASK_USER_INPUT_TOOL || t === "ask-user-input" || t === "ask_user_input";
|
|
1917
|
+
return toolName === ASK_USER_INPUT_TOOL;
|
|
1920
1918
|
}
|
|
1921
1919
|
var TRIGGER = {
|
|
1922
1920
|
submitMessage: "submit-message",
|
|
@@ -4251,12 +4249,13 @@ function ToolApproval({ part, strings, active, onDecision }) {
|
|
|
4251
4249
|
ap?.reason ? /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-decided-value`, children: ap.reason }) : null
|
|
4252
4250
|
] });
|
|
4253
4251
|
}
|
|
4252
|
+
const args = summarizeInput(input.value);
|
|
4254
4253
|
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-approval`, "data-testid": TID.toolApproval, children: [
|
|
4255
4254
|
/* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-head`, children: [
|
|
4256
4255
|
/* @__PURE__ */ jsx13("span", { class: `${p12}-tool-badge`, children: strings.approvalRequired }),
|
|
4257
4256
|
/* @__PURE__ */ jsx13("strong", { class: `${p12}-tool-title`, children: part.toolName })
|
|
4258
4257
|
] }),
|
|
4259
|
-
|
|
4258
|
+
args ? /* @__PURE__ */ jsx13("pre", { class: `${p12}-tool-args`, children: args }) : null,
|
|
4260
4259
|
active ? /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
4261
4260
|
/* @__PURE__ */ jsx13(
|
|
4262
4261
|
"input",
|
|
@@ -4378,12 +4377,12 @@ function ToolAskInput({ part, strings, active, onSubmit }) {
|
|
|
4378
4377
|
] });
|
|
4379
4378
|
}
|
|
4380
4379
|
const req = request.value;
|
|
4381
|
-
const
|
|
4380
|
+
const isConfirmation = req.responseType === "confirmation";
|
|
4382
4381
|
return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input`, "data-testid": TID.toolAskInput, children: [
|
|
4383
4382
|
/* @__PURE__ */ jsx14(Header, { strings, title: req.title }),
|
|
4384
4383
|
req.description ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-desc`, children: req.description }) : null,
|
|
4385
|
-
|
|
4386
|
-
|
|
4384
|
+
isConfirmation ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-question`, children: req.question }) : null,
|
|
4385
|
+
isConfirmation ? /* @__PURE__ */ jsxs11("div", { class: `${p13}-form-actions`, children: [
|
|
4387
4386
|
/* @__PURE__ */ jsx14(
|
|
4388
4387
|
"button",
|
|
4389
4388
|
{
|
|
@@ -4407,7 +4406,7 @@ function ToolAskInput({ part, strings, active, onSubmit }) {
|
|
|
4407
4406
|
] }) : /* @__PURE__ */ jsx14(
|
|
4408
4407
|
DynamicForm,
|
|
4409
4408
|
{
|
|
4410
|
-
fields,
|
|
4409
|
+
fields: askInputToFields(req),
|
|
4411
4410
|
strings,
|
|
4412
4411
|
submitLabel: strings.inputSubmit,
|
|
4413
4412
|
onSubmit: (values) => onSubmit(part.toolCallId, values),
|
package/package.json
CHANGED
package/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startSessionResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startSessionResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-Big98MYV.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -56,9 +56,9 @@ declare const presentationSchema: z.ZodObject<{
|
|
|
56
56
|
inset: z.ZodOptional<z.ZodString>;
|
|
57
57
|
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
58
58
|
fullscreen: "fullscreen";
|
|
59
|
-
normal: "normal";
|
|
60
59
|
expanded: "expanded";
|
|
61
60
|
auto: "auto";
|
|
61
|
+
normal: "normal";
|
|
62
62
|
}>>;
|
|
63
63
|
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
64
64
|
}, z.core.$loose>>;
|
|
@@ -148,9 +148,9 @@ declare const launcherSizeSchema: z.ZodEnum<{
|
|
|
148
148
|
}>;
|
|
149
149
|
type LauncherSize = z.infer<typeof launcherSizeSchema>;
|
|
150
150
|
declare const calloutShapeSchema: z.ZodEnum<{
|
|
151
|
+
callout: "callout";
|
|
151
152
|
pill: "pill";
|
|
152
153
|
bubble: "bubble";
|
|
153
|
-
callout: "callout";
|
|
154
154
|
}>;
|
|
155
155
|
type CalloutShape = z.infer<typeof calloutShapeSchema>;
|
|
156
156
|
declare const calloutPositionSchema: z.ZodEnum<{
|
|
@@ -162,9 +162,9 @@ type CalloutPosition = z.infer<typeof calloutPositionSchema>;
|
|
|
162
162
|
declare const launcherCalloutSchema: z.ZodObject<{
|
|
163
163
|
text: z.ZodDefault<z.ZodString>;
|
|
164
164
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
165
|
+
callout: "callout";
|
|
165
166
|
pill: "pill";
|
|
166
167
|
bubble: "bubble";
|
|
167
|
-
callout: "callout";
|
|
168
168
|
}>>;
|
|
169
169
|
position: z.ZodDefault<z.ZodEnum<{
|
|
170
170
|
auto: "auto";
|
|
@@ -195,9 +195,9 @@ declare const launcherOptionsSchema: z.ZodObject<{
|
|
|
195
195
|
callout: z.ZodOptional<z.ZodObject<{
|
|
196
196
|
text: z.ZodDefault<z.ZodString>;
|
|
197
197
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
198
|
+
callout: "callout";
|
|
198
199
|
pill: "pill";
|
|
199
200
|
bubble: "bubble";
|
|
200
|
-
callout: "callout";
|
|
201
201
|
}>>;
|
|
202
202
|
position: z.ZodDefault<z.ZodEnum<{
|
|
203
203
|
auto: "auto";
|
|
@@ -240,9 +240,9 @@ type LauncherOptions = z.infer<typeof launcherOptionsSchema>;
|
|
|
240
240
|
|
|
241
241
|
declare const initialSizeSchema: z.ZodEnum<{
|
|
242
242
|
fullscreen: "fullscreen";
|
|
243
|
-
normal: "normal";
|
|
244
243
|
expanded: "expanded";
|
|
245
244
|
auto: "auto";
|
|
245
|
+
normal: "normal";
|
|
246
246
|
}>;
|
|
247
247
|
declare const resizeOptionsSchema: z.ZodObject<{
|
|
248
248
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -269,9 +269,9 @@ declare const sizeOptionsSchema: z.ZodObject<{
|
|
|
269
269
|
inset: z.ZodOptional<z.ZodString>;
|
|
270
270
|
initialSize: z.ZodDefault<z.ZodEnum<{
|
|
271
271
|
fullscreen: "fullscreen";
|
|
272
|
-
normal: "normal";
|
|
273
272
|
expanded: "expanded";
|
|
274
273
|
auto: "auto";
|
|
274
|
+
normal: "normal";
|
|
275
275
|
}>>;
|
|
276
276
|
autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
|
|
277
277
|
}, z.core.$loose>;
|
|
@@ -323,40 +323,40 @@ type FeatureFlags = z.infer<typeof featureFlagsSchema>;
|
|
|
323
323
|
*/
|
|
324
324
|
|
|
325
325
|
declare const actionNameSchema: z.ZodEnum<{
|
|
326
|
+
close: "close";
|
|
326
327
|
expand: "expand";
|
|
327
328
|
fullscreen: "fullscreen";
|
|
328
329
|
popOut: "popOut";
|
|
329
|
-
|
|
330
|
-
language: "language";
|
|
330
|
+
clear: "clear";
|
|
331
331
|
theme: "theme";
|
|
332
|
+
language: "language";
|
|
332
333
|
history: "history";
|
|
333
|
-
clear: "clear";
|
|
334
334
|
sound: "sound";
|
|
335
335
|
}>;
|
|
336
336
|
type ActionName = z.infer<typeof actionNameSchema>;
|
|
337
337
|
declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
|
|
338
|
+
close: "close";
|
|
338
339
|
expand: "expand";
|
|
339
340
|
fullscreen: "fullscreen";
|
|
340
341
|
popOut: "popOut";
|
|
341
|
-
|
|
342
|
-
language: "language";
|
|
342
|
+
clear: "clear";
|
|
343
343
|
theme: "theme";
|
|
344
|
+
language: "language";
|
|
344
345
|
history: "history";
|
|
345
|
-
clear: "clear";
|
|
346
346
|
sound: "sound";
|
|
347
347
|
}>>;
|
|
348
348
|
type HeaderActions = z.infer<typeof headerActionsSchema>;
|
|
349
349
|
/** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
|
|
350
350
|
declare const headerSchema: z.ZodObject<{
|
|
351
351
|
actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
352
|
+
close: "close";
|
|
352
353
|
expand: "expand";
|
|
353
354
|
fullscreen: "fullscreen";
|
|
354
355
|
popOut: "popOut";
|
|
355
|
-
|
|
356
|
-
language: "language";
|
|
356
|
+
clear: "clear";
|
|
357
357
|
theme: "theme";
|
|
358
|
+
language: "language";
|
|
358
359
|
history: "history";
|
|
359
|
-
clear: "clear";
|
|
360
360
|
sound: "sound";
|
|
361
361
|
}>>>;
|
|
362
362
|
}, z.core.$loose>;
|
|
@@ -372,33 +372,33 @@ type HeaderOptions = z.infer<typeof headerSchema>;
|
|
|
372
372
|
*/
|
|
373
373
|
|
|
374
374
|
declare const feedbackEventSchema: z.ZodEnum<{
|
|
375
|
+
voiceStart: "voiceStart";
|
|
376
|
+
voiceStop: "voiceStop";
|
|
375
377
|
error: "error";
|
|
376
378
|
messageReceived: "messageReceived";
|
|
377
379
|
messageSent: "messageSent";
|
|
378
|
-
voiceStart: "voiceStart";
|
|
379
|
-
voiceStop: "voiceStop";
|
|
380
380
|
}>;
|
|
381
381
|
type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
|
|
382
382
|
declare const soundOptionsSchema: z.ZodObject<{
|
|
383
383
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
384
384
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
385
385
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
386
|
+
voiceStart: "voiceStart";
|
|
387
|
+
voiceStop: "voiceStop";
|
|
386
388
|
error: "error";
|
|
387
389
|
messageReceived: "messageReceived";
|
|
388
390
|
messageSent: "messageSent";
|
|
389
|
-
voiceStart: "voiceStart";
|
|
390
|
-
voiceStop: "voiceStop";
|
|
391
391
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
392
392
|
}, z.core.$loose>;
|
|
393
393
|
type SoundOptions = z.infer<typeof soundOptionsSchema>;
|
|
394
394
|
declare const hapticsOptionsSchema: z.ZodObject<{
|
|
395
395
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
396
396
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
397
|
+
voiceStart: "voiceStart";
|
|
398
|
+
voiceStop: "voiceStop";
|
|
397
399
|
error: "error";
|
|
398
400
|
messageReceived: "messageReceived";
|
|
399
401
|
messageSent: "messageSent";
|
|
400
|
-
voiceStart: "voiceStart";
|
|
401
|
-
voiceStop: "voiceStop";
|
|
402
402
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
403
403
|
}, z.core.$loose>;
|
|
404
404
|
type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
|
|
@@ -407,21 +407,21 @@ declare const feedbackSchema: z.ZodObject<{
|
|
|
407
407
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
408
408
|
volume: z.ZodDefault<z.ZodNumber>;
|
|
409
409
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
410
|
+
voiceStart: "voiceStart";
|
|
411
|
+
voiceStop: "voiceStop";
|
|
410
412
|
error: "error";
|
|
411
413
|
messageReceived: "messageReceived";
|
|
412
414
|
messageSent: "messageSent";
|
|
413
|
-
voiceStart: "voiceStart";
|
|
414
|
-
voiceStop: "voiceStop";
|
|
415
415
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
|
|
416
416
|
}, z.core.$loose>>;
|
|
417
417
|
haptics: z.ZodOptional<z.ZodObject<{
|
|
418
418
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
419
419
|
events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
420
|
+
voiceStart: "voiceStart";
|
|
421
|
+
voiceStop: "voiceStop";
|
|
420
422
|
error: "error";
|
|
421
423
|
messageReceived: "messageReceived";
|
|
422
424
|
messageSent: "messageSent";
|
|
423
|
-
voiceStart: "voiceStart";
|
|
424
|
-
voiceStop: "voiceStop";
|
|
425
425
|
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
|
|
426
426
|
}, z.core.$loose>>;
|
|
427
427
|
}, z.core.$loose>;
|
|
@@ -584,14 +584,14 @@ type I18nOptions = z.infer<typeof i18nSchema>;
|
|
|
584
584
|
|
|
585
585
|
declare const fieldTypeSchema: z.ZodEnum<{
|
|
586
586
|
number: "number";
|
|
587
|
+
select: "select";
|
|
588
|
+
textarea: "textarea";
|
|
587
589
|
text: "text";
|
|
590
|
+
checkbox: "checkbox";
|
|
591
|
+
radio: "radio";
|
|
588
592
|
url: "url";
|
|
589
593
|
email: "email";
|
|
590
594
|
tel: "tel";
|
|
591
|
-
textarea: "textarea";
|
|
592
|
-
select: "select";
|
|
593
|
-
radio: "radio";
|
|
594
|
-
checkbox: "checkbox";
|
|
595
595
|
multiselect: "multiselect";
|
|
596
596
|
}>;
|
|
597
597
|
type FieldType = z.infer<typeof fieldTypeSchema>;
|
|
@@ -616,14 +616,14 @@ declare const formFieldSchema: z.ZodObject<{
|
|
|
616
616
|
label: z.ZodString;
|
|
617
617
|
type: z.ZodEnum<{
|
|
618
618
|
number: "number";
|
|
619
|
+
select: "select";
|
|
620
|
+
textarea: "textarea";
|
|
619
621
|
text: "text";
|
|
622
|
+
checkbox: "checkbox";
|
|
623
|
+
radio: "radio";
|
|
620
624
|
url: "url";
|
|
621
625
|
email: "email";
|
|
622
626
|
tel: "tel";
|
|
623
|
-
textarea: "textarea";
|
|
624
|
-
select: "select";
|
|
625
|
-
radio: "radio";
|
|
626
|
-
checkbox: "checkbox";
|
|
627
627
|
multiselect: "multiselect";
|
|
628
628
|
}>;
|
|
629
629
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -656,14 +656,14 @@ declare const intakeSchema: z.ZodObject<{
|
|
|
656
656
|
label: z.ZodString;
|
|
657
657
|
type: z.ZodEnum<{
|
|
658
658
|
number: "number";
|
|
659
|
+
select: "select";
|
|
660
|
+
textarea: "textarea";
|
|
659
661
|
text: "text";
|
|
662
|
+
checkbox: "checkbox";
|
|
663
|
+
radio: "radio";
|
|
660
664
|
url: "url";
|
|
661
665
|
email: "email";
|
|
662
666
|
tel: "tel";
|
|
663
|
-
textarea: "textarea";
|
|
664
|
-
select: "select";
|
|
665
|
-
radio: "radio";
|
|
666
|
-
checkbox: "checkbox";
|
|
667
667
|
multiselect: "multiselect";
|
|
668
668
|
}>;
|
|
669
669
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
@@ -707,18 +707,18 @@ type Intake = z.infer<typeof intakeSchema>;
|
|
|
707
707
|
*/
|
|
708
708
|
|
|
709
709
|
declare const moduleLayoutSchema: z.ZodEnum<{
|
|
710
|
+
home: "home";
|
|
710
711
|
chat: "chat";
|
|
711
712
|
help: "help";
|
|
712
|
-
home: "home";
|
|
713
713
|
news: "news";
|
|
714
714
|
}>;
|
|
715
715
|
type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
|
|
716
716
|
declare const moduleSchema: z.ZodObject<{
|
|
717
717
|
label: z.ZodString;
|
|
718
718
|
layout: z.ZodEnum<{
|
|
719
|
+
home: "home";
|
|
719
720
|
chat: "chat";
|
|
720
721
|
help: "help";
|
|
721
|
-
home: "home";
|
|
722
722
|
news: "news";
|
|
723
723
|
}>;
|
|
724
724
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -744,9 +744,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
|
|
|
744
744
|
declare const modulesSchema: z.ZodArray<z.ZodObject<{
|
|
745
745
|
label: z.ZodString;
|
|
746
746
|
layout: z.ZodEnum<{
|
|
747
|
+
home: "home";
|
|
747
748
|
chat: "chat";
|
|
748
749
|
help: "help";
|
|
749
|
-
home: "home";
|
|
750
750
|
news: "news";
|
|
751
751
|
}>;
|
|
752
752
|
contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
package/web-component.mjs
CHANGED
|
@@ -1969,9 +1969,7 @@ import { signal as signal2 } from "@preact/signals";
|
|
|
1969
1969
|
// src/stream/constants.ts
|
|
1970
1970
|
var ASK_USER_INPUT_TOOL = "tool:ask-user-input";
|
|
1971
1971
|
function isAskUserInputTool(toolName) {
|
|
1972
|
-
|
|
1973
|
-
const t = toolName.toLowerCase();
|
|
1974
|
-
return t === ASK_USER_INPUT_TOOL || t === "ask-user-input" || t === "ask_user_input";
|
|
1972
|
+
return toolName === ASK_USER_INPUT_TOOL;
|
|
1975
1973
|
}
|
|
1976
1974
|
var TRIGGER = {
|
|
1977
1975
|
submitMessage: "submit-message",
|
|
@@ -4306,12 +4304,13 @@ function ToolApproval({ part, strings, active, onDecision }) {
|
|
|
4306
4304
|
ap?.reason ? /* @__PURE__ */ jsx13("span", { class: `${p12}-tool-decided-value`, children: ap.reason }) : null
|
|
4307
4305
|
] });
|
|
4308
4306
|
}
|
|
4307
|
+
const args = summarizeInput(input.value);
|
|
4309
4308
|
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-approval`, "data-testid": TID.toolApproval, children: [
|
|
4310
4309
|
/* @__PURE__ */ jsxs10("div", { class: `${p12}-tool-head`, children: [
|
|
4311
4310
|
/* @__PURE__ */ jsx13("span", { class: `${p12}-tool-badge`, children: strings.approvalRequired }),
|
|
4312
4311
|
/* @__PURE__ */ jsx13("strong", { class: `${p12}-tool-title`, children: part.toolName })
|
|
4313
4312
|
] }),
|
|
4314
|
-
|
|
4313
|
+
args ? /* @__PURE__ */ jsx13("pre", { class: `${p12}-tool-args`, children: args }) : null,
|
|
4315
4314
|
active ? /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
4316
4315
|
/* @__PURE__ */ jsx13(
|
|
4317
4316
|
"input",
|
|
@@ -4433,12 +4432,12 @@ function ToolAskInput({ part, strings, active, onSubmit }) {
|
|
|
4433
4432
|
] });
|
|
4434
4433
|
}
|
|
4435
4434
|
const req = request.value;
|
|
4436
|
-
const
|
|
4435
|
+
const isConfirmation = req.responseType === "confirmation";
|
|
4437
4436
|
return /* @__PURE__ */ jsxs11("div", { class: `${p13}-tool-ask-input`, "data-testid": TID.toolAskInput, children: [
|
|
4438
4437
|
/* @__PURE__ */ jsx14(Header, { strings, title: req.title }),
|
|
4439
4438
|
req.description ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-desc`, children: req.description }) : null,
|
|
4440
|
-
|
|
4441
|
-
|
|
4439
|
+
isConfirmation ? /* @__PURE__ */ jsx14("p", { class: `${p13}-tool-question`, children: req.question }) : null,
|
|
4440
|
+
isConfirmation ? /* @__PURE__ */ jsxs11("div", { class: `${p13}-form-actions`, children: [
|
|
4442
4441
|
/* @__PURE__ */ jsx14(
|
|
4443
4442
|
"button",
|
|
4444
4443
|
{
|
|
@@ -4462,7 +4461,7 @@ function ToolAskInput({ part, strings, active, onSubmit }) {
|
|
|
4462
4461
|
] }) : /* @__PURE__ */ jsx14(
|
|
4463
4462
|
DynamicForm,
|
|
4464
4463
|
{
|
|
4465
|
-
fields,
|
|
4464
|
+
fields: askInputToFields(req),
|
|
4466
4465
|
strings,
|
|
4467
4466
|
submitLabel: strings.inputSubmit,
|
|
4468
4467
|
onSubmit: (values) => onSubmit(part.toolCallId, values),
|