@copilotkit/vue 1.57.1 → 1.57.3
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/README.md +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/{use-render-activity-message-CqtxiFSs.js → use-render-activity-message-BCoXRqzE.js} +230 -202
- package/dist/use-render-activity-message-BCoXRqzE.js.map +1 -0
- package/dist/use-render-activity-message-BRL1Rpl-.cjs.map +1 -1
- package/dist/v2/components/MCPAppsActivityRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts.map +1 -1
- package/dist/v2/components/a2ui/catalog.d.ts.map +1 -1
- package/dist/v2/hooks/use-interrupt.d.ts.map +1 -1
- package/dist/v2/hooks/use-render-activity-message.d.ts.map +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/CopilotKitProvider.types.d.ts.map +1 -1
- package/package.json +24 -24
- package/src/hooks/use-frontend-tool.ts +2 -2
- package/src/v2/components/MCPAppsActivityRenderer.ts +1 -3
- package/src/v2/components/a2ui/A2UIBuiltInToolCallRenderer.ts +23 -11
- package/src/v2/components/a2ui/A2UICatalogContext.ts +5 -6
- package/src/v2/components/a2ui/catalog.ts +235 -210
- package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.ts +2 -6
- package/src/v2/hooks/use-interrupt.ts +15 -10
- package/src/v2/hooks/use-render-activity-message.ts +7 -6
- package/src/v2/providers/CopilotChatConfigurationProvider.vue +1 -3
- package/src/v2/providers/CopilotKitProvider.types.ts +4 -1
- package/src/v2/providers/CopilotKitProvider.vue +7 -7
- package/dist/use-render-activity-message-CqtxiFSs.js.map +0 -1
|
@@ -452,127 +452,144 @@ const Button = createVueComponent(ButtonApi, ({ props, buildChild }) => {
|
|
|
452
452
|
);
|
|
453
453
|
});
|
|
454
454
|
|
|
455
|
-
const TextField = createVueComponent(
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
props.variant === "
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
? "
|
|
463
|
-
: "
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
455
|
+
const TextField = createVueComponent(
|
|
456
|
+
TextFieldApi,
|
|
457
|
+
({ props, state }) => {
|
|
458
|
+
const uniqueId = state.id;
|
|
459
|
+
const isLong = props.variant === "longText";
|
|
460
|
+
const type =
|
|
461
|
+
props.variant === "number"
|
|
462
|
+
? "number"
|
|
463
|
+
: props.variant === "obscured"
|
|
464
|
+
? "password"
|
|
465
|
+
: "text";
|
|
466
|
+
|
|
467
|
+
const inputStyle = {
|
|
468
|
+
padding: "8px",
|
|
469
|
+
width: "100%",
|
|
470
|
+
border:
|
|
471
|
+
props.validationErrors && props.validationErrors.length > 0
|
|
472
|
+
? "1px solid red"
|
|
473
|
+
: STANDARD_BORDER,
|
|
474
|
+
borderRadius: STANDARD_RADIUS,
|
|
475
|
+
boxSizing: "border-box",
|
|
476
|
+
};
|
|
475
477
|
|
|
476
|
-
|
|
478
|
+
const hasError =
|
|
479
|
+
props.validationErrors && props.validationErrors.length > 0;
|
|
477
480
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
481
|
+
return h(
|
|
482
|
+
"div",
|
|
483
|
+
{
|
|
484
|
+
style: {
|
|
485
|
+
display: "flex",
|
|
486
|
+
flexDirection: "column",
|
|
487
|
+
gap: "4px",
|
|
488
|
+
width: "100%",
|
|
489
|
+
margin: LEAF_MARGIN,
|
|
490
|
+
},
|
|
487
491
|
},
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
props.
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
props.
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
492
|
+
[
|
|
493
|
+
props.label
|
|
494
|
+
? h(
|
|
495
|
+
"label",
|
|
496
|
+
{
|
|
497
|
+
for: uniqueId,
|
|
498
|
+
style: { fontSize: "14px", fontWeight: "bold" },
|
|
499
|
+
},
|
|
500
|
+
props.label,
|
|
501
|
+
)
|
|
502
|
+
: null,
|
|
503
|
+
isLong
|
|
504
|
+
? h("textarea", {
|
|
505
|
+
id: uniqueId,
|
|
506
|
+
style: inputStyle,
|
|
507
|
+
value: props.value || "",
|
|
508
|
+
onInput: (e: Event) =>
|
|
509
|
+
props.setValue((e.target as HTMLTextAreaElement).value),
|
|
510
|
+
})
|
|
511
|
+
: h("input", {
|
|
512
|
+
id: uniqueId,
|
|
513
|
+
type,
|
|
514
|
+
style: inputStyle,
|
|
515
|
+
value: props.value || "",
|
|
516
|
+
onInput: (e: Event) =>
|
|
517
|
+
props.setValue((e.target as HTMLInputElement).value),
|
|
518
|
+
}),
|
|
519
|
+
hasError
|
|
520
|
+
? h(
|
|
521
|
+
"span",
|
|
522
|
+
{ style: { fontSize: "12px", color: "red" } },
|
|
523
|
+
props.validationErrors![0],
|
|
524
|
+
)
|
|
525
|
+
: null,
|
|
526
|
+
],
|
|
527
|
+
);
|
|
528
|
+
},
|
|
529
|
+
() => ({ id: useA2UIUniqueId() }),
|
|
530
|
+
);
|
|
523
531
|
|
|
524
|
-
const CheckBox = createVueComponent(
|
|
525
|
-
|
|
526
|
-
|
|
532
|
+
const CheckBox = createVueComponent(
|
|
533
|
+
CheckBoxApi,
|
|
534
|
+
({ props, state }) => {
|
|
535
|
+
const uniqueId = state.id;
|
|
536
|
+
const hasError =
|
|
537
|
+
props.validationErrors && props.validationErrors.length > 0;
|
|
527
538
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
539
|
+
return h(
|
|
540
|
+
"div",
|
|
541
|
+
{
|
|
542
|
+
style: {
|
|
543
|
+
display: "flex",
|
|
544
|
+
flexDirection: "column",
|
|
545
|
+
margin: LEAF_MARGIN,
|
|
546
|
+
},
|
|
547
|
+
},
|
|
548
|
+
[
|
|
549
|
+
h(
|
|
550
|
+
"div",
|
|
551
|
+
{ style: { display: "flex", alignItems: "center", gap: "8px" } },
|
|
552
|
+
[
|
|
553
|
+
h("input", {
|
|
554
|
+
id: uniqueId,
|
|
555
|
+
type: "checkbox",
|
|
556
|
+
checked: !!props.value,
|
|
557
|
+
onChange: (e: Event) =>
|
|
558
|
+
props.setValue((e.target as HTMLInputElement).checked),
|
|
559
|
+
style: {
|
|
560
|
+
cursor: "pointer",
|
|
561
|
+
outline: hasError ? "1px solid red" : "none",
|
|
562
|
+
},
|
|
563
|
+
}),
|
|
564
|
+
props.label
|
|
565
|
+
? h(
|
|
566
|
+
"label",
|
|
567
|
+
{
|
|
568
|
+
for: uniqueId,
|
|
569
|
+
style: {
|
|
570
|
+
cursor: "pointer",
|
|
571
|
+
color: hasError ? "red" : "inherit",
|
|
572
|
+
},
|
|
557
573
|
},
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
props.label,
|
|
575
|
+
)
|
|
576
|
+
: null,
|
|
577
|
+
],
|
|
578
|
+
),
|
|
579
|
+
hasError
|
|
580
|
+
? h(
|
|
581
|
+
"span",
|
|
582
|
+
{
|
|
583
|
+
style: { fontSize: "12px", color: "red", marginTop: "4px" },
|
|
584
|
+
},
|
|
585
|
+
props.validationErrors?.[0],
|
|
586
|
+
)
|
|
587
|
+
: null,
|
|
588
|
+
],
|
|
589
|
+
);
|
|
590
|
+
},
|
|
591
|
+
() => ({ id: useA2UIUniqueId() }),
|
|
592
|
+
);
|
|
576
593
|
|
|
577
594
|
const ChoicePicker = createVueComponent(
|
|
578
595
|
ChoicePickerApi,
|
|
@@ -704,106 +721,114 @@ const ChoicePicker = createVueComponent(
|
|
|
704
721
|
() => ({ filter: ref("") }),
|
|
705
722
|
);
|
|
706
723
|
|
|
707
|
-
const Slider = createVueComponent(
|
|
708
|
-
|
|
724
|
+
const Slider = createVueComponent(
|
|
725
|
+
SliderApi,
|
|
726
|
+
({ props, state }) => {
|
|
727
|
+
const uniqueId = state.id;
|
|
709
728
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
729
|
+
return h(
|
|
730
|
+
"div",
|
|
731
|
+
{
|
|
732
|
+
style: {
|
|
733
|
+
display: "flex",
|
|
734
|
+
flexDirection: "column",
|
|
735
|
+
gap: "4px",
|
|
736
|
+
margin: LEAF_MARGIN,
|
|
737
|
+
width: "100%",
|
|
738
|
+
},
|
|
719
739
|
},
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
const DateTimeInput = createVueComponent(DateTimeInputApi, ({ props, state }) => {
|
|
758
|
-
const uniqueId = state.id;
|
|
759
|
-
|
|
760
|
-
let type = "datetime-local";
|
|
761
|
-
if (props.enableDate && !props.enableTime) type = "date";
|
|
762
|
-
if (!props.enableDate && props.enableTime) type = "time";
|
|
740
|
+
[
|
|
741
|
+
h(
|
|
742
|
+
"div",
|
|
743
|
+
{ style: { display: "flex", justifyContent: "space-between" } },
|
|
744
|
+
[
|
|
745
|
+
props.label
|
|
746
|
+
? h(
|
|
747
|
+
"label",
|
|
748
|
+
{
|
|
749
|
+
for: uniqueId,
|
|
750
|
+
style: { fontSize: "14px", fontWeight: "bold" },
|
|
751
|
+
},
|
|
752
|
+
props.label,
|
|
753
|
+
)
|
|
754
|
+
: null,
|
|
755
|
+
h(
|
|
756
|
+
"span",
|
|
757
|
+
{ style: { fontSize: "12px", color: "#666" } },
|
|
758
|
+
String(props.value),
|
|
759
|
+
),
|
|
760
|
+
],
|
|
761
|
+
),
|
|
762
|
+
h("input", {
|
|
763
|
+
id: uniqueId,
|
|
764
|
+
type: "range",
|
|
765
|
+
min: props.min ?? 0,
|
|
766
|
+
max: props.max,
|
|
767
|
+
value: props.value ?? 0,
|
|
768
|
+
onInput: (e: Event) =>
|
|
769
|
+
props.setValue(Number((e.target as HTMLInputElement).value)),
|
|
770
|
+
style: { width: "100%", cursor: "pointer" },
|
|
771
|
+
}),
|
|
772
|
+
],
|
|
773
|
+
);
|
|
774
|
+
},
|
|
775
|
+
() => ({ id: useA2UIUniqueId() }),
|
|
776
|
+
);
|
|
763
777
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
778
|
+
const DateTimeInput = createVueComponent(
|
|
779
|
+
DateTimeInputApi,
|
|
780
|
+
({ props, state }) => {
|
|
781
|
+
const uniqueId = state.id;
|
|
782
|
+
|
|
783
|
+
let type = "datetime-local";
|
|
784
|
+
if (props.enableDate && !props.enableTime) type = "date";
|
|
785
|
+
if (!props.enableDate && props.enableTime) type = "time";
|
|
786
|
+
|
|
787
|
+
const style = {
|
|
788
|
+
padding: "8px",
|
|
789
|
+
width: "100%",
|
|
790
|
+
border: STANDARD_BORDER,
|
|
791
|
+
borderRadius: STANDARD_RADIUS,
|
|
792
|
+
boxSizing: "border-box",
|
|
793
|
+
};
|
|
771
794
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
795
|
+
return h(
|
|
796
|
+
"div",
|
|
797
|
+
{
|
|
798
|
+
style: {
|
|
799
|
+
display: "flex",
|
|
800
|
+
flexDirection: "column",
|
|
801
|
+
gap: "4px",
|
|
802
|
+
width: "100%",
|
|
803
|
+
margin: LEAF_MARGIN,
|
|
804
|
+
},
|
|
781
805
|
},
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
props.
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
806
|
+
[
|
|
807
|
+
props.label
|
|
808
|
+
? h(
|
|
809
|
+
"label",
|
|
810
|
+
{
|
|
811
|
+
for: uniqueId,
|
|
812
|
+
style: { fontSize: "14px", fontWeight: "bold" },
|
|
813
|
+
},
|
|
814
|
+
props.label,
|
|
815
|
+
)
|
|
816
|
+
: null,
|
|
817
|
+
h("input", {
|
|
818
|
+
id: uniqueId,
|
|
819
|
+
type,
|
|
820
|
+
style,
|
|
821
|
+
value: props.value || "",
|
|
822
|
+
onInput: (e: Event) =>
|
|
823
|
+
props.setValue((e.target as HTMLInputElement).value),
|
|
824
|
+
min: typeof props.min === "string" ? props.min : undefined,
|
|
825
|
+
max: typeof props.max === "string" ? props.max : undefined,
|
|
826
|
+
}),
|
|
827
|
+
],
|
|
828
|
+
);
|
|
829
|
+
},
|
|
830
|
+
() => ({ id: useA2UIUniqueId() }),
|
|
831
|
+
);
|
|
807
832
|
|
|
808
833
|
// ============================================================
|
|
809
834
|
// Catalog Assembly
|
|
@@ -392,9 +392,7 @@ describe("CopilotChat activity message rendering", () => {
|
|
|
392
392
|
// React's useEffect which defers). The connectAgent path calls
|
|
393
393
|
// setMessages([]) which would race with the submit's addMessage.
|
|
394
394
|
await waitFor(() => {
|
|
395
|
-
expect(
|
|
396
|
-
screen.queryByTestId("copilot-chat-view"),
|
|
397
|
-
).not.toBeNull();
|
|
395
|
+
expect(screen.queryByTestId("copilot-chat-view")).not.toBeNull();
|
|
398
396
|
});
|
|
399
397
|
await new Promise((r) => setTimeout(r, 50));
|
|
400
398
|
|
|
@@ -634,9 +632,7 @@ describe("CopilotChat activity message rendering", () => {
|
|
|
634
632
|
// Allow the /connect bootstrap cycle to settle before submitting.
|
|
635
633
|
// See the A2UI reconnect test above for the full rationale.
|
|
636
634
|
await waitFor(() => {
|
|
637
|
-
expect(
|
|
638
|
-
screen.queryByTestId("copilot-chat-view"),
|
|
639
|
-
).not.toBeNull();
|
|
635
|
+
expect(screen.queryByTestId("copilot-chat-view")).not.toBeNull();
|
|
640
636
|
});
|
|
641
637
|
await new Promise((r) => setTimeout(r, 50));
|
|
642
638
|
|
|
@@ -139,17 +139,22 @@ export function useInterrupt<TValue = unknown, TResult = never>(
|
|
|
139
139
|
|
|
140
140
|
const interruptEventValue = interrupt.value?.value;
|
|
141
141
|
interrupt.value = null;
|
|
142
|
-
void copilotkit.value
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
void copilotkit.value
|
|
143
|
+
.runAgent({
|
|
144
|
+
agent: resolvedAgent,
|
|
145
|
+
forwardedProps: {
|
|
146
|
+
command: {
|
|
147
|
+
resume: response,
|
|
148
|
+
interruptEvent: interruptEventValue,
|
|
149
|
+
},
|
|
148
150
|
},
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
})
|
|
152
|
+
.catch((error) => {
|
|
153
|
+
console.error(
|
|
154
|
+
"[CopilotKit] useInterrupt: failed to resume agent:",
|
|
155
|
+
error,
|
|
156
|
+
);
|
|
157
|
+
});
|
|
153
158
|
};
|
|
154
159
|
|
|
155
160
|
watch(
|
|
@@ -26,11 +26,11 @@ interface ActivityRendererResult {
|
|
|
26
26
|
export function useRenderActivityMessage() {
|
|
27
27
|
const { copilotkit } = useCopilotKit();
|
|
28
28
|
const config = useCopilotChatConfiguration();
|
|
29
|
-
const agentId = computed(
|
|
30
|
-
() => config.value?.agentId ?? DEFAULT_AGENT_ID,
|
|
31
|
-
);
|
|
29
|
+
const agentId = computed(() => config.value?.agentId ?? DEFAULT_AGENT_ID);
|
|
32
30
|
|
|
33
|
-
const renderers = computed(() => [
|
|
31
|
+
const renderers = computed(() => [
|
|
32
|
+
...copilotkit.value.renderActivityMessages,
|
|
33
|
+
]);
|
|
34
34
|
|
|
35
35
|
function findRenderer(
|
|
36
36
|
activityType: string,
|
|
@@ -72,8 +72,9 @@ export function useRenderActivityMessage() {
|
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
const agent: AbstractAgent | undefined =
|
|
76
|
-
|
|
75
|
+
const agent: AbstractAgent | undefined = copilotkit.value.getAgent(
|
|
76
|
+
agentId.value,
|
|
77
|
+
);
|
|
77
78
|
|
|
78
79
|
return {
|
|
79
80
|
renderer: renderer.render as Component<
|
|
@@ -55,9 +55,7 @@ const resolvedHasExplicitThreadId = computed(() => {
|
|
|
55
55
|
const shouldCreateModalState = computed(
|
|
56
56
|
() => props.isModalDefaultOpen !== undefined,
|
|
57
57
|
);
|
|
58
|
-
const resolvedDefaultOpen = computed(
|
|
59
|
-
() => props.isModalDefaultOpen ?? true,
|
|
60
|
-
);
|
|
58
|
+
const resolvedDefaultOpen = computed(() => props.isModalDefaultOpen ?? true);
|
|
61
59
|
|
|
62
60
|
const internalModalOpen = ref<boolean>(
|
|
63
61
|
parentConfigValue.value?.isModalOpen ?? resolvedDefaultOpen.value,
|
|
@@ -54,7 +54,10 @@ export interface CopilotKitProviderProps {
|
|
|
54
54
|
* Only used on first load before the user drags to a custom position.
|
|
55
55
|
* Defaults to `{ horizontal: "right", vertical: "top" }`.
|
|
56
56
|
*/
|
|
57
|
-
inspectorDefaultAnchor?: {
|
|
57
|
+
inspectorDefaultAnchor?: {
|
|
58
|
+
horizontal: "left" | "right";
|
|
59
|
+
vertical: "top" | "bottom";
|
|
60
|
+
};
|
|
58
61
|
/**
|
|
59
62
|
* Enable debug logging for the client-side event pipeline.
|
|
60
63
|
*
|
|
@@ -315,7 +315,8 @@ const builtInFrontendTools = computed<VueFrontendTool[]>(() => {
|
|
|
315
315
|
parameters: GenerateSandboxedUiArgsSchema,
|
|
316
316
|
handler: async () => "UI generated",
|
|
317
317
|
followUp: true,
|
|
318
|
-
render:
|
|
318
|
+
render:
|
|
319
|
+
OpenGenerativeUIToolRenderer as unknown as VueFrontendTool["render"],
|
|
319
320
|
} as VueFrontendTool,
|
|
320
321
|
];
|
|
321
322
|
});
|
|
@@ -327,7 +328,8 @@ const builtInActivityRenderers = computed<
|
|
|
327
328
|
{
|
|
328
329
|
activityType: MCPAppsActivityType,
|
|
329
330
|
content: MCPAppsActivityContentSchema as unknown as z.ZodSchema<unknown>,
|
|
330
|
-
render:
|
|
331
|
+
render:
|
|
332
|
+
MCPAppsActivityRenderer as unknown as VueActivityMessageRenderer<unknown>["render"],
|
|
331
333
|
},
|
|
332
334
|
];
|
|
333
335
|
|
|
@@ -335,7 +337,8 @@ const builtInActivityRenderers = computed<
|
|
|
335
337
|
renderers.push({
|
|
336
338
|
activityType: OpenGenerativeUIActivityType,
|
|
337
339
|
content: OpenGenerativeUIContentSchema as unknown as z.ZodSchema<unknown>,
|
|
338
|
-
render:
|
|
340
|
+
render:
|
|
341
|
+
OpenGenerativeUIActivityRenderer as unknown as VueActivityMessageRenderer<unknown>["render"],
|
|
339
342
|
});
|
|
340
343
|
}
|
|
341
344
|
|
|
@@ -545,10 +548,7 @@ const a2uiLoadingComponent = computed(() => props.a2ui?.loadingComponent);
|
|
|
545
548
|
const a2uiIncludeSchema = computed(() => props.a2ui?.includeSchema ?? true);
|
|
546
549
|
|
|
547
550
|
// A2UI tool call renderer (progress indicator) — auto-registered when A2UI enabled
|
|
548
|
-
registerA2UIBuiltInToolCallRenderer(
|
|
549
|
-
copilotkit,
|
|
550
|
-
() => runtimeA2UIEnabled.value,
|
|
551
|
-
);
|
|
551
|
+
registerA2UIBuiltInToolCallRenderer(copilotkit, () => runtimeA2UIEnabled.value);
|
|
552
552
|
|
|
553
553
|
// A2UI catalog context, schema, and generation/design guidelines
|
|
554
554
|
registerA2UICatalogContext(copilotkit, {
|