@copilotkit/vue 1.72.0 → 1.73.0
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/LICENSE +21 -0
- package/PARITY.md +15 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/use-render-activity-message-C45MYgwB.cjs +85 -0
- package/dist/use-render-activity-message-C45MYgwB.cjs.map +1 -0
- package/dist/use-render-activity-message-DI4kGqHF.js +9758 -0
- package/dist/use-render-activity-message-DI4kGqHF.js.map +1 -0
- package/dist/v2/components/LicenseWarningBanner.vue.d.ts +3 -5
- package/dist/v2/components/LicenseWarningBanner.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChat.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts +4 -0
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts +7 -0
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatUserMessage.vue.d.ts +2 -0
- package/dist/v2/components/chat/CopilotChatUserMessage.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts +8 -2
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopup.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupWelcomeScreen.vue.d.ts +7 -4
- package/dist/v2/components/chat/CopilotPopupWelcomeScreen.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebar.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarWelcomeScreen.vue.d.ts +8 -5
- package/dist/v2/components/chat/CopilotSidebarWelcomeScreen.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/index.d.ts +50 -26
- package/dist/v2/components/chat/index.d.ts.map +1 -1
- package/dist/v2/components/chat/types.d.ts +44 -17
- package/dist/v2/components/chat/types.d.ts.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/package.json +5 -5
- package/src/v2/components/LicenseWarningBanner.vue +5 -17
- package/src/v2/components/__tests__/LicenseWarningBanner.test.ts +23 -0
- package/src/v2/components/chat/CopilotChat.vue +21 -14
- package/src/v2/components/chat/CopilotChatAssistantMessage.vue +12 -21
- package/src/v2/components/chat/CopilotChatInput.vue +32 -26
- package/src/v2/components/chat/CopilotChatUserMessage.vue +19 -19
- package/src/v2/components/chat/CopilotChatView.vue +31 -39
- package/src/v2/components/chat/CopilotPopup.vue +8 -10
- package/src/v2/components/chat/CopilotPopupView.vue +8 -18
- package/src/v2/components/chat/CopilotPopupViewInternal.vue +5 -19
- package/src/v2/components/chat/CopilotPopupWelcomeScreen.vue +36 -6
- package/src/v2/components/chat/CopilotSidebar.vue +8 -10
- package/src/v2/components/chat/CopilotSidebarView.vue +8 -18
- package/src/v2/components/chat/CopilotSidebarViewInternal.vue +5 -19
- package/src/v2/components/chat/CopilotSidebarWelcomeScreen.vue +36 -6
- package/src/v2/components/chat/__tests__/CopilotChat.e2e.test.ts +156 -5
- package/src/v2/components/chat/__tests__/CopilotChatInput.test.ts +34 -0
- package/src/v2/components/chat/__tests__/CopilotChatUserMessage.test.ts +46 -0
- package/src/v2/components/chat/__tests__/CopilotChatView.test.ts +118 -0
- package/src/v2/components/chat/__tests__/CopilotPopupView.test.ts +79 -0
- package/src/v2/components/chat/__tests__/CopilotSidebarView.test.ts +93 -0
- package/src/v2/components/chat/types.ts +73 -18
- package/dist/use-render-activity-message-Ciee03Rx.js +0 -9702
- package/dist/use-render-activity-message-Ciee03Rx.js.map +0 -1
- package/dist/use-render-activity-message-DXJDZGkW.cjs +0 -85
- package/dist/use-render-activity-message-DXJDZGkW.cjs.map +0 -1
|
@@ -57,6 +57,22 @@ export interface CopilotChatViewProps {
|
|
|
57
57
|
inputValue?: string;
|
|
58
58
|
inputMode?: CopilotChatInputMode;
|
|
59
59
|
inputToolsMenu?: (ToolsMenuItem | "-")[];
|
|
60
|
+
/** Optional event callbacks used to drive the default input controls. */
|
|
61
|
+
onSubmitMessage?: (value: string) => void | Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Presence drives reactive gating of the default stop control.
|
|
64
|
+
* Prefer `@stop` / `emit("stop")` for invocation; do not call this prop
|
|
65
|
+
* directly or the handler can fire twice.
|
|
66
|
+
*/
|
|
67
|
+
onStop?: () => void;
|
|
68
|
+
onInputChange?: (value: string) => void;
|
|
69
|
+
onSelectSuggestion?: (
|
|
70
|
+
suggestion: Suggestion,
|
|
71
|
+
index: number,
|
|
72
|
+
) => void | Promise<void>;
|
|
73
|
+
onStartTranscribe?: () => void;
|
|
74
|
+
onCancelTranscribe?: () => void;
|
|
75
|
+
onFinishTranscribe?: () => void;
|
|
60
76
|
/**
|
|
61
77
|
* When `true`, suppresses the welcome screen while a thread's initial
|
|
62
78
|
* connect is in flight. Prevents the "How can I help you today?" flash
|
|
@@ -93,6 +109,13 @@ export interface CopilotChatProps extends Omit<
|
|
|
93
109
|
| "onDragOver"
|
|
94
110
|
| "onDragLeave"
|
|
95
111
|
| "onDrop"
|
|
112
|
+
| "onSubmitMessage"
|
|
113
|
+
| "onStop"
|
|
114
|
+
| "onInputChange"
|
|
115
|
+
| "onSelectSuggestion"
|
|
116
|
+
| "onStartTranscribe"
|
|
117
|
+
| "onCancelTranscribe"
|
|
118
|
+
| "onFinishTranscribe"
|
|
96
119
|
> {
|
|
97
120
|
agentId?: string;
|
|
98
121
|
threadId?: string;
|
|
@@ -107,18 +130,21 @@ export interface CopilotChatProps extends Omit<
|
|
|
107
130
|
}
|
|
108
131
|
|
|
109
132
|
export interface CopilotChatViewOverrideSlotProps extends CopilotChatViewProps {
|
|
133
|
+
canStop: boolean;
|
|
134
|
+
canAddFile: boolean;
|
|
135
|
+
canTranscribe: boolean;
|
|
110
136
|
onSubmitMessage: (value: string) => void | Promise<void>;
|
|
111
|
-
onStop
|
|
137
|
+
onStop: () => void;
|
|
112
138
|
onInputChange: (value: string) => void;
|
|
113
139
|
onSelectSuggestion: (
|
|
114
140
|
suggestion: Suggestion,
|
|
115
141
|
index: number,
|
|
116
142
|
) => void | Promise<void>;
|
|
117
|
-
onAddFile
|
|
118
|
-
onStartTranscribe
|
|
119
|
-
onCancelTranscribe
|
|
120
|
-
onFinishTranscribe
|
|
121
|
-
onFinishTranscribeWithAudio
|
|
143
|
+
onAddFile: () => void;
|
|
144
|
+
onStartTranscribe: () => void;
|
|
145
|
+
onCancelTranscribe: () => void;
|
|
146
|
+
onFinishTranscribe: () => void;
|
|
147
|
+
onFinishTranscribeWithAudio: (audioBlob: Blob) => void | Promise<void>;
|
|
122
148
|
}
|
|
123
149
|
|
|
124
150
|
export interface CopilotChatMessageViewSlotProps {
|
|
@@ -154,9 +180,12 @@ export interface CopilotChatInputSlotProps {
|
|
|
154
180
|
isRunning: boolean;
|
|
155
181
|
inputMode: CopilotChatInputMode;
|
|
156
182
|
inputToolsMenu: (ToolsMenuItem | "-")[];
|
|
183
|
+
canStop: boolean;
|
|
184
|
+
canAddFile: boolean;
|
|
185
|
+
canTranscribe: boolean;
|
|
157
186
|
onUpdateModelValue: (value: string) => void;
|
|
158
187
|
onSubmitMessage: (value: string) => void;
|
|
159
|
-
onStop
|
|
188
|
+
onStop: () => void;
|
|
160
189
|
onAddFile: () => void;
|
|
161
190
|
onStartTranscribe: () => void;
|
|
162
191
|
onCancelTranscribe: () => void;
|
|
@@ -189,9 +218,12 @@ export interface CopilotChatWelcomeScreenSlotProps extends CopilotChatSuggestion
|
|
|
189
218
|
isRunning: boolean;
|
|
190
219
|
inputMode: CopilotChatInputMode;
|
|
191
220
|
inputToolsMenu: (ToolsMenuItem | "-")[];
|
|
221
|
+
canStop: boolean;
|
|
222
|
+
canAddFile: boolean;
|
|
223
|
+
canTranscribe: boolean;
|
|
192
224
|
onUpdateModelValue: (value: string) => void;
|
|
193
225
|
onSubmitMessage: (value: string) => void;
|
|
194
|
-
onStop
|
|
226
|
+
onStop: () => void;
|
|
195
227
|
onAddFile: () => void;
|
|
196
228
|
onStartTranscribe: () => void;
|
|
197
229
|
onCancelTranscribe: () => void;
|
|
@@ -402,14 +434,17 @@ export interface CopilotSidebarWelcomeScreenInputSlotProps {
|
|
|
402
434
|
isRunning: boolean;
|
|
403
435
|
inputMode: CopilotChatInputMode;
|
|
404
436
|
inputToolsMenu: (ToolsMenuItem | "-")[];
|
|
437
|
+
canStop: boolean;
|
|
438
|
+
canAddFile: boolean;
|
|
439
|
+
canTranscribe: boolean;
|
|
405
440
|
onUpdateModelValue: (value: string) => void;
|
|
406
441
|
onSubmitMessage: (value: string) => void;
|
|
407
|
-
onStop
|
|
408
|
-
onAddFile
|
|
409
|
-
onStartTranscribe
|
|
410
|
-
onCancelTranscribe
|
|
411
|
-
onFinishTranscribe
|
|
412
|
-
onFinishTranscribeWithAudio
|
|
442
|
+
onStop: () => void;
|
|
443
|
+
onAddFile: () => void;
|
|
444
|
+
onStartTranscribe: () => void;
|
|
445
|
+
onCancelTranscribe: () => void;
|
|
446
|
+
onFinishTranscribe: () => void;
|
|
447
|
+
onFinishTranscribeWithAudio: (audioBlob: Blob) => void | Promise<void>;
|
|
413
448
|
}
|
|
414
449
|
|
|
415
450
|
export interface CopilotSidebarWelcomeScreenSuggestionViewSlotProps {
|
|
@@ -423,8 +458,29 @@ export interface CopilotSidebarWelcomeScreenLayoutSlotProps
|
|
|
423
458
|
CopilotSidebarWelcomeScreenInputSlotProps,
|
|
424
459
|
CopilotSidebarWelcomeScreenSuggestionViewSlotProps {}
|
|
425
460
|
|
|
426
|
-
|
|
427
|
-
|
|
461
|
+
type WelcomeScreenCommandProps =
|
|
462
|
+
| "onStop"
|
|
463
|
+
| "onAddFile"
|
|
464
|
+
| "onStartTranscribe"
|
|
465
|
+
| "onCancelTranscribe"
|
|
466
|
+
| "onFinishTranscribe"
|
|
467
|
+
| "onFinishTranscribeWithAudio";
|
|
468
|
+
|
|
469
|
+
type WelcomeScreenDerivedCapabilityProps =
|
|
470
|
+
| "canStop"
|
|
471
|
+
| "canAddFile"
|
|
472
|
+
| "canTranscribe";
|
|
473
|
+
|
|
474
|
+
export type CopilotSidebarWelcomeScreenProps = Omit<
|
|
475
|
+
CopilotSidebarWelcomeScreenLayoutSlotProps,
|
|
476
|
+
WelcomeScreenCommandProps | WelcomeScreenDerivedCapabilityProps
|
|
477
|
+
> &
|
|
478
|
+
Partial<
|
|
479
|
+
Pick<
|
|
480
|
+
CopilotSidebarWelcomeScreenLayoutSlotProps,
|
|
481
|
+
WelcomeScreenCommandProps | WelcomeScreenDerivedCapabilityProps
|
|
482
|
+
>
|
|
483
|
+
>;
|
|
428
484
|
|
|
429
485
|
export interface CopilotSidebarViewHeaderSlotProps {
|
|
430
486
|
title: string;
|
|
@@ -458,8 +514,7 @@ export type CopilotPopupWelcomeScreenSuggestionViewSlotProps =
|
|
|
458
514
|
export type CopilotPopupWelcomeScreenLayoutSlotProps =
|
|
459
515
|
CopilotSidebarWelcomeScreenLayoutSlotProps;
|
|
460
516
|
|
|
461
|
-
export type CopilotPopupWelcomeScreenProps =
|
|
462
|
-
CopilotPopupWelcomeScreenLayoutSlotProps;
|
|
517
|
+
export type CopilotPopupWelcomeScreenProps = CopilotSidebarWelcomeScreenProps;
|
|
463
518
|
|
|
464
519
|
export interface CopilotPopupViewProps extends CopilotChatViewProps {
|
|
465
520
|
width?: number | string;
|