@copilotkit/vue 1.69.1 → 1.69.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/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/use-render-activity-message-CIlNtfvE.cjs +85 -0
- package/dist/use-render-activity-message-CIlNtfvE.cjs.map +1 -0
- package/dist/{use-render-activity-message-CADUB--8.js → use-render-activity-message-Db2rOZkW.js} +3940 -4241
- package/dist/use-render-activity-message-Db2rOZkW.js.map +1 -0
- package/dist/v2/components/CopilotKitInspector.vue.d.ts +0 -2
- package/dist/v2/components/CopilotKitInspector.vue.d.ts.map +1 -1
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts +0 -18
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatReasoningMessage.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts.map +1 -1
- package/dist/v2/components/icons/index.d.ts +1 -1
- package/dist/v2/components/icons/index.d.ts.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/keys.d.ts +0 -36
- package/dist/v2/providers/keys.d.ts.map +1 -1
- package/dist/v2/providers/types.d.ts +0 -3
- package/dist/v2/providers/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/v2/components/CopilotKitInspector.vue +1 -19
- package/src/v2/components/OpenGenerativeUIRenderer.ts +1 -42
- package/src/v2/components/chat/CopilotChatAssistantMessage.vue +1 -52
- package/src/v2/components/chat/CopilotChatMessageView.vue +23 -57
- package/src/v2/components/chat/CopilotChatReasoningMessage.vue +32 -68
- package/src/v2/components/chat/CopilotChatToolCallsView.vue +16 -70
- package/src/v2/components/icons/__tests__/icons.test.ts +0 -2
- package/src/v2/components/icons/index.ts +0 -1
- package/src/v2/providers/CopilotKitProvider.vue +6 -66
- package/src/v2/providers/keys.ts +0 -47
- package/src/v2/providers/types.ts +0 -3
- package/dist/use-render-activity-message-BtaJ2iQc.cjs +0 -97
- package/dist/use-render-activity-message-BtaJ2iQc.cjs.map +0 -1
- package/dist/use-render-activity-message-CADUB--8.js.map +0 -1
- package/dist/v2/components/chat/SaveSnippetBeside.vue.d.ts +0 -20
- package/dist/v2/components/chat/SaveSnippetBeside.vue.d.ts.map +0 -1
- package/dist/v2/components/chat/save-snippet-beside.d.ts +0 -20
- package/dist/v2/components/chat/save-snippet-beside.d.ts.map +0 -1
- package/src/v2/components/chat/SaveSnippetBeside.vue +0 -82
- package/src/v2/components/chat/save-snippet-beside.ts +0 -84
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { CopilotKitCoreVue } from "../lib/vue-core";
|
|
2
|
-
import type { VueInspectorOpenRequest } from "../providers/keys";
|
|
3
2
|
type __VLS_Props = {
|
|
4
3
|
core?: CopilotKitCoreVue | null;
|
|
5
|
-
openRequest?: VueInspectorOpenRequest | null;
|
|
6
4
|
};
|
|
7
5
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
6
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotKitInspector.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/components/CopilotKitInspector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotKitInspector.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/components/CopilotKitInspector.vue"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACjC,CAAC;;AAmEF,wBAMG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenGenerativeUIRenderer.d.ts","sourceRoot":"","sources":["../../../src/v2/components/OpenGenerativeUIRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOlD,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AAEjE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;EAOxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AA0DF,eAAO,MAAM,wBAAwB;;cAIf,QAAQ,CAAC,uBAAuB,CAAC;;;;;;;cAAjC,QAAQ,CAAC,uBAAuB,CAAC;;;
|
|
1
|
+
{"version":3,"file":"OpenGenerativeUIRenderer.d.ts","sourceRoot":"","sources":["../../../src/v2/components/OpenGenerativeUIRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOlD,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AAEjE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;EAOxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AA0DF,eAAO,MAAM,wBAAwB;;cAIf,QAAQ,CAAC,uBAAuB,CAAC;;;;;;;cAAjC,QAAQ,CAAC,uBAAuB,CAAC;;;iGAsXrD,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;cAKvB,QAAQ,CAAC,uBAAuB,CAAC;;;;cAGxB,QAAQ,CAAC,OAAO,CAAC;;;;cAE1B,QAAQ,CAAC,OAAO,CAAC;;;;;;;;;;;;cALjB,QAAQ,CAAC,uBAAuB,CAAC;;;;cAGxB,QAAQ,CAAC,OAAO,CAAC;;;;cAE1B,QAAQ,CAAC,OAAO,CAAC;;;;;;4EAQrC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;cAKnB,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;;;;cAGlC,QAAQ,CAAC,cAAc,CAAC;;;;cACxB,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;;;;;;;;;cAJpC,QAAQ,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC;;;;cAGlC,QAAQ,CAAC,cAAc,CAAC;;;;cACxB,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;;;iGAmCxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotChatAssistantMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatAssistantMessage.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotChatAssistant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AM,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC;AA07BF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;0BAzgCrB,CA1HqC;;;;;;;;;;;;;;;;0BA0HrC,CA1HqC;;;;;;;;;;;;;;;;0BA0HrC,CA1HqC;;;;;;;;;;;;;;;;0BA0HrC,CA1HqC;;;;;;;;;;;;;;;;;0BA0HrC,CA1HqC;;;;;;;;;;;;;;;;0BA0HrC,CA1HqC;;;;;;;;;;;;;;;;0BA0HrC,CA1HqC;;;;;;;;;;;;;;;;0BA0HrC,CA1HqC;;;;cAkKtB,OAAO,EAAE;eACR,OAAO;oBACF,OAAO;6EAu+B1B,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -84,9 +84,6 @@ declare var __VLS_1: {
|
|
|
84
84
|
readonly assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
85
85
|
readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
86
86
|
readonly assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
87
|
-
readonly assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
88
|
-
readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local Only";
|
|
89
|
-
readonly assistantMessageToolbarSaveSnippetLabel: "Save as snippet";
|
|
90
87
|
readonly assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
91
88
|
readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
92
89
|
readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
@@ -118,9 +115,6 @@ declare var __VLS_1: {
|
|
|
118
115
|
readonly assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
119
116
|
readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
120
117
|
readonly assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
121
|
-
readonly assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
122
|
-
readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local Only";
|
|
123
|
-
readonly assistantMessageToolbarSaveSnippetLabel: "Save as snippet";
|
|
124
118
|
readonly assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
125
119
|
readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
126
120
|
readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
@@ -146,9 +140,6 @@ declare var __VLS_1: {
|
|
|
146
140
|
readonly assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
147
141
|
readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
148
142
|
readonly assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
149
|
-
readonly assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
150
|
-
readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local Only";
|
|
151
|
-
readonly assistantMessageToolbarSaveSnippetLabel: "Save as snippet";
|
|
152
143
|
readonly assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
153
144
|
readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
154
145
|
readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
@@ -174,9 +165,6 @@ declare var __VLS_1: {
|
|
|
174
165
|
readonly assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
175
166
|
readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
176
167
|
readonly assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
177
|
-
readonly assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
178
|
-
readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local Only";
|
|
179
|
-
readonly assistantMessageToolbarSaveSnippetLabel: "Save as snippet";
|
|
180
168
|
readonly assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
181
169
|
readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
182
170
|
readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
@@ -202,9 +190,6 @@ declare var __VLS_1: {
|
|
|
202
190
|
readonly assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
203
191
|
readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
204
192
|
readonly assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
205
|
-
readonly assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
206
|
-
readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local Only";
|
|
207
|
-
readonly assistantMessageToolbarSaveSnippetLabel: "Save as snippet";
|
|
208
193
|
readonly assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
209
194
|
readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
210
195
|
readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
@@ -232,9 +217,6 @@ declare var __VLS_1: {
|
|
|
232
217
|
readonly assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
233
218
|
readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
234
219
|
readonly assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
235
|
-
readonly assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
236
|
-
readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local Only";
|
|
237
|
-
readonly assistantMessageToolbarSaveSnippetLabel: "Save as snippet";
|
|
238
220
|
readonly assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
239
221
|
readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
240
222
|
readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotChatInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatInput.vue"],"names":[],"mappings":"AAixCA,O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KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAChE;IAAE,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAChE;IAAE,yBAAyB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC/D;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA6EnD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;UA7nDV,oBAAoB;cAJhB,OAAO;eAMN,OAAO;eAJP,OAAO;mBACH,OAAO;eAEX,SAAS,EAAE;iBAET,QAAQ,GAAG,UAAU;oBAClB,MAAM;oBACN,OAAO;aACd,MAAM;oBAcC,OAAO;6EAinD1B,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotChatMessageView.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatMessageView.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotChatMessageView.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatMessageView.vue"],"names":[],"mappings":"AAieA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,WAAW,EACZ,MAAM,aAAa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age.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatReasoningMessage.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotChatReasoningMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatReasoningMessage.vue"],"names":[],"mappings":"AA0PA,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI7D,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AASJ,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QACf,OAAO,EAAE,gBAAgB,CAAC;QAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;QACnB,MAAM,EAAE;YACN,MAAM,EAAE,OAAO,CAAC;YAChB,KAAK,EAAE,MAAM,CAAC;YACd,UAAU,EAAE,OAAO,CAAC;YACpB,WAAW,EAAE,OAAO,CAAC;YACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;SACtB,CAAC;QACF,WAAW,EAAE;YACX,WAAW,EAAE,OAAO,CAAC;YACrB,UAAU,EAAE,OAAO,CAAC;YACpB,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;QACF,MAAM,EAAE;YACN,MAAM,EAAE,OAAO,CAAC;YAChB,WAAW,EAAE;gBACX,WAAW,EAAE,OAAO,CAAC;gBACrB,UAAU,EAAE,OAAO,CAAC;gBACpB,OAAO,EAAE,MAAM,CAAC;aACjB,CAAC;SACH,CAAC;KACH,KAAK,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,OAAO,CAAC;QACpB,WAAW,EAAE,OAAO,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACtB,KAAK,OAAO,CAAC;IACd,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE;QACvB,WAAW,EAAE,OAAO,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;KACjB,KAAK,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE;QACf,MAAM,EAAE,OAAO,CAAC;QAChB,WAAW,EAAE;YACX,WAAW,EAAE,OAAO,CAAC;YACrB,UAAU,EAAE,OAAO,CAAC;YACpB,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,KAAK,OAAO,CAAC;CACf,CAAC;AAuRF,QAAA,MAAM,eAAe;cAhVN,OAAO,EAAE;eACR,OAAO;6EAsVrB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotChatToolCallsView.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatToolCallsView.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotChatToolCallsView.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatToolCallsView.vue"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,SAAS,CAAC;AAGlE,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB,CAAC;AAQJ,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,kCAAkC,KAAK,OAAO,CAAC;IACrE,CAAC,GAAG,EAAE,aAAa,MAAM,EAAE,GAAG,CAC5B,KAAK,EAAE,kCAAkC,KACtC,OAAO,CAAC;CACd,CAAC;AAoEF,QAAA,MAAM,eAAe;cAlFN,OAAO,EAAE;6EAyFtB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MessageCircle as IconMessageCircle, X as IconX, ChevronDown as IconChevronDown, Plus as IconPlus, Mic as IconMic, ArrowUp as IconArrowUp,
|
|
1
|
+
export { MessageCircle as IconMessageCircle, X as IconX, ChevronDown as IconChevronDown, Plus as IconPlus, Mic as IconMic, ArrowUp as IconArrowUp, Check as IconCheck, Square as IconSquare, Loader2 as IconLoader2, Copy as IconCopy, Download as IconDownload, Edit as IconEdit, ChevronLeft as IconChevronLeft, ChevronRight as IconChevronRight, ThumbsUp as IconThumbsUp, ThumbsDown as IconThumbsDown, Volume2 as IconVolume2, RefreshCw as IconRefreshCw, CheckCircle as IconCheckCircle, Circle as IconCircle, PanelLeftOpen as IconPanelLeftOpen, } from "lucide-vue-next";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,CAAC,IAAI,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,IAAI,IAAI,QAAQ,EAChB,GAAG,IAAI,OAAO,EACd,OAAO,IAAI,WAAW,EACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,CAAC,IAAI,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,IAAI,IAAI,QAAQ,EAChB,GAAG,IAAI,OAAO,EACd,OAAO,IAAI,WAAW,EACtB,KAAK,IAAI,SAAS,EAClB,MAAM,IAAI,UAAU,EACpB,OAAO,IAAI,WAAW,EACtB,IAAI,IAAI,QAAQ,EAChB,QAAQ,IAAI,YAAY,EACxB,IAAI,IAAI,QAAQ,EAChB,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,EAChC,QAAQ,IAAI,YAAY,EACxB,UAAU,IAAI,cAAc,EAC5B,OAAO,IAAI,WAAW,EACtB,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,MAAM,IAAI,UAAU,EACpB,aAAa,IAAI,iBAAiB,GACnC,MAAM,iBAAiB,CAAC"}
|
package/dist/v2/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@copilotkit/core"),i=require("@ag-ui/client"),e=require("../use-render-activity-message-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@copilotkit/core"),i=require("@ag-ui/client"),e=require("../use-render-activity-message-CIlNtfvE.cjs"),n=require("@copilotkit/shared");exports.A2UIActivityContentSchema=e.A2UIActivityContentSchema;exports.A2UISurfaceActivityRenderer=e._sfc_main;exports.A2UISurfaceActivityType=e.A2UISurfaceActivityType;exports.CopilotChat=e.CopilotChat;exports.CopilotChatAssistantMessage=e._sfc_main$1;exports.CopilotChatAttachmentQueue=e._sfc_main$2;exports.CopilotChatAttachmentRenderer=e._sfc_main$3;exports.CopilotChatAudioRecorder=e._sfc_main$4;exports.CopilotChatConfigurationProvider=e._sfc_main$5;exports.CopilotChatDefaultLabels=e.CopilotChatDefaultLabels;exports.CopilotChatInput=e._sfc_main$6;exports.CopilotChatMessageView=e._sfc_main$7;exports.CopilotChatReasoningMessage=e._sfc_main$8;exports.CopilotChatSuggestionPill=e._sfc_main$9;exports.CopilotChatSuggestionView=e._sfc_main$10;exports.CopilotChatToggleButton=e.CopilotChatToggleButton;exports.CopilotChatToggleButtonCloseIcon=e.CopilotChatToggleButtonCloseIcon;exports.CopilotChatToggleButtonOpenIcon=e.CopilotChatToggleButtonOpenIcon;exports.CopilotChatToolCallsView=e._sfc_main$11;exports.CopilotChatUserMessage=e._sfc_main$12;exports.CopilotChatView=e._sfc_main$13;exports.CopilotKitCoreVue=e.CopilotKitCoreVue;exports.CopilotKitInspector=e._sfc_main$14;exports.CopilotKitProvider=e._sfc_main$15;exports.CopilotModalHeader=e.CopilotModalHeader;exports.CopilotPopup=e._sfc_main$16;exports.CopilotPopupView=e.CopilotPopupView;exports.CopilotSidebar=e._sfc_main$17;exports.CopilotSidebarView=e.CopilotSidebarView;exports.CopilotThreadsDrawer=e._sfc_main$18;exports.GenerateSandboxedUiArgsSchema=e.GenerateSandboxedUiArgsSchema;exports.LicenseContextKey=e.LicenseContextKey;exports.MCPAppsActivityContentSchema=e.MCPAppsActivityContentSchema;exports.MCPAppsActivityRenderer=e.MCPAppsActivityRenderer;exports.MCPAppsActivityType=e.MCPAppsActivityType;exports.OpenGenerativeUIActivityRenderer=e.OpenGenerativeUIActivityRenderer;exports.OpenGenerativeUIActivityType=e.OpenGenerativeUIActivityType;exports.OpenGenerativeUIContentSchema=e.OpenGenerativeUIContentSchema;exports.OpenGenerativeUIRenderer=e.OpenGenerativeUIRenderer;exports.OpenGenerativeUIToolRenderer=e.OpenGenerativeUIToolRenderer;exports.UseAgentUpdate=e.UseAgentUpdate;exports.createA2UIMessageRenderer=e.createA2UIMessageRenderer;exports.createDefaultLicenseRef=e.createDefaultLicenseRef;exports.defineToolCallRenderer=e.defineToolCallRenderer;exports.extractCompleteStyles=e.extractCompleteStyles;exports.getOperationSurfaceId=e.getOperationSurfaceId;exports.processPartialHtml=e.processPartialHtml;exports.useAgent=e.useAgent;exports.useAgentContext=e.useAgentContext;exports.useAttachments=e.useAttachments;exports.useCapabilities=e.useCapabilities;exports.useComponent=e.useComponent;exports.useConfigureSuggestions=e.useConfigureSuggestions;exports.useCopilotChatConfiguration=e.useCopilotChatConfiguration;exports.useCopilotKit=e.useCopilotKit;exports.useDefaultRenderTool=e.useDefaultRenderTool;exports.useFrontendTool=e.useFrontendTool;exports.useHumanInTheLoop=e.useHumanInTheLoop;exports.useInterrupt=e.useInterrupt;exports.useKatexStyles=e.useKatexStyles;exports.useKeyboardHeight=e.useKeyboardHeight;exports.useLicenseContext=e.useLicenseContext;exports.useRenderActivityMessage=e.useRenderActivityMessage;exports.useRenderCustomMessages=e.useRenderCustomMessages;exports.useRenderTool=e.useRenderTool;exports.useSandboxFunctions=e.useSandboxFunctions;exports.useSuggestions=e.useSuggestions;exports.useThreads=e.useThreads;exports.vueBasicCatalog=e.vueBasicCatalog;Object.defineProperty(exports,"createLicenseContextValue",{enumerable:!0,get:()=>n.createLicenseContextValue});Object.keys(o).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>o[t]})});Object.keys(i).forEach(t=>{t!=="default"&&!Object.prototype.hasOwnProperty.call(exports,t)&&Object.defineProperty(exports,t,{enumerable:!0,get:()=>i[t]})});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/v2/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "@copilotkit/core";
|
|
2
2
|
export * from "@ag-ui/client";
|
|
3
|
-
import { A as o, _ as i, a as n, C, b as r, c as p, d as l, e as u, f as c, g, h as d, i as h, j as A, k as v, l as S, m, n as y, o as I, p as f, q as R, r as T, s as U, t as x, u as M, v as P, w as b, x as V, y as w, z as K, B as O, G, L, M as B, D, E as H, O as F, F as Q, H as j, I as k, J as q, U as z, K as E, N as J, P as N, Q as W, R as X, S as Y, T as Z, V as _, W as $, X as ee, Y as ae, Z as te, $ as se, a0 as oe, a1 as ie, a2 as ne, a3 as Ce, a4 as re, a5 as pe, a6 as le, a7 as ue, a8 as ce, a9 as ge, aa as de, ab as he, ac as Ae, ad as ve, ae as Se } from "../use-render-activity-message-
|
|
3
|
+
import { A as o, _ as i, a as n, C, b as r, c as p, d as l, e as u, f as c, g, h as d, i as h, j as A, k as v, l as S, m, n as y, o as I, p as f, q as R, r as T, s as U, t as x, u as M, v as P, w as b, x as V, y as w, z as K, B as O, G, L, M as B, D, E as H, O as F, F as Q, H as j, I as k, J as q, U as z, K as E, N as J, P as N, Q as W, R as X, S as Y, T as Z, V as _, W as $, X as ee, Y as ae, Z as te, $ as se, a0 as oe, a1 as ie, a2 as ne, a3 as Ce, a4 as re, a5 as pe, a6 as le, a7 as ue, a8 as ce, a9 as ge, aa as de, ab as he, ac as Ae, ad as ve, ae as Se } from "../use-render-activity-message-Db2rOZkW.js";
|
|
4
4
|
import { createLicenseContextValue as ye } from "@copilotkit/shared";
|
|
5
5
|
export {
|
|
6
6
|
o as A2UIActivityContentSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotKitProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotKitProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.vue"],"names":[],"mappings":"AAsqBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAiCnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,eAAe,EACf,iBAAiB,EAElB,MAAM,UAAU,CAAC;AAuqBlB,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA2B/C,QAAA,MAAM,eAAe;;;;;;;;;;;wBAtvBrB,CApnBgB;mBAonBhB,CAnnByB;;;;aAmnBzB,CAhnB2B;eAgnB3B,CAhnBoD;wBAgnBpD,CA/mBK;qBA+mBL,CA7mBG;;6EA02CD,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -14,40 +14,4 @@ export interface CopilotKitContextValue {
|
|
|
14
14
|
export declare const CopilotKitKey: InjectionKey<CopilotKitContextValue>;
|
|
15
15
|
export declare const CopilotChatConfigurationKey: InjectionKey<ComputedRef<CopilotChatConfigurationValue>>;
|
|
16
16
|
export declare const SandboxFunctionsKey: InjectionKey<Ref<readonly SandboxFunction[]>>;
|
|
17
|
-
export type VueInspectorOpenRequest = {
|
|
18
|
-
messageId: string;
|
|
19
|
-
threadId?: string;
|
|
20
|
-
agentId?: string;
|
|
21
|
-
menu?: "event-snippets";
|
|
22
|
-
snippetId?: string;
|
|
23
|
-
};
|
|
24
|
-
export type VueInspectorSaveRequest = {
|
|
25
|
-
threadId?: string;
|
|
26
|
-
agentId?: string;
|
|
27
|
-
} & ({
|
|
28
|
-
kind: "text";
|
|
29
|
-
messageId: string;
|
|
30
|
-
content: string;
|
|
31
|
-
} | {
|
|
32
|
-
kind: "reasoning";
|
|
33
|
-
messageId: string;
|
|
34
|
-
content: string;
|
|
35
|
-
} | {
|
|
36
|
-
kind: "tool-call";
|
|
37
|
-
messageId: string;
|
|
38
|
-
toolCallId: string;
|
|
39
|
-
toolName: string;
|
|
40
|
-
argsJson: string | Record<string, unknown>;
|
|
41
|
-
} | {
|
|
42
|
-
kind: "activity";
|
|
43
|
-
messageId: string;
|
|
44
|
-
activityType: string;
|
|
45
|
-
content: unknown;
|
|
46
|
-
});
|
|
47
|
-
export type VueInspectorContextValue = {
|
|
48
|
-
isLocalInspectorEnabled: ComputedRef<boolean>;
|
|
49
|
-
openInspector: (request: VueInspectorOpenRequest) => void;
|
|
50
|
-
saveEventSnippet: (request: VueInspectorSaveRequest) => Promise<void>;
|
|
51
|
-
};
|
|
52
|
-
export declare const InspectorKey: InjectionKey<VueInspectorContextValue>;
|
|
53
17
|
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC1C,oBAAoB,EAAE,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/C,SAAS,EAAE,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAC9C,WAAW,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,oBAAoB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3C,iBAAiB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,aAAa,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-8,9 +8,6 @@ export declare const CopilotChatDefaultLabels: {
|
|
|
8
8
|
readonly assistantMessageToolbarCopyCodeLabel: "Copy";
|
|
9
9
|
readonly assistantMessageToolbarCopyCodeCopiedLabel: "Copied";
|
|
10
10
|
readonly assistantMessageToolbarCopyMessageLabel: "Copy";
|
|
11
|
-
readonly assistantMessageToolbarInspectorLabel: "View in Inspector";
|
|
12
|
-
readonly assistantMessageToolbarInspectorLocalOnlyLabel: "Local Only";
|
|
13
|
-
readonly assistantMessageToolbarSaveSnippetLabel: "Save as snippet";
|
|
14
11
|
readonly assistantMessageToolbarThumbsUpLabel: "Good response";
|
|
15
12
|
readonly assistantMessageToolbarThumbsDownLabel: "Bad response";
|
|
16
13
|
readonly assistantMessageToolbarReadAloudLabel: "Read aloud";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;CAsB3B,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,wBAAwB,CAAC;AAEhE,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,iBAAiB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;;OAIG;IACH,iBAAiB,EAAE,CACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7B,IAAI,CAAC;IACV;;;OAGG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,4DAA4D;IAC5D,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,gFAAgF;IAChF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,cAAc,EAAE,MAAM,MAAM,IAAI,CAAC;CAClC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/vue",
|
|
3
|
-
"version": "1.69.
|
|
3
|
+
"version": "1.69.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vue 3 components and composables for CopilotKit",
|
|
6
6
|
"keywords": [
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"streamdown-vue": "^1.0.29",
|
|
71
71
|
"zod": "^3.25.75",
|
|
72
72
|
"zod-to-json-schema": "^3.24.5",
|
|
73
|
-
"@copilotkit/core": "1.69.
|
|
74
|
-
"@copilotkit/
|
|
75
|
-
"@copilotkit/
|
|
76
|
-
"@copilotkit/web-inspector": "1.69.
|
|
73
|
+
"@copilotkit/core": "1.69.2",
|
|
74
|
+
"@copilotkit/web-components": "1.69.2",
|
|
75
|
+
"@copilotkit/shared": "1.69.2",
|
|
76
|
+
"@copilotkit/web-inspector": "1.69.2"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@eslint/js": "^9.39.2",
|
|
@@ -3,13 +3,11 @@ defineOptions({
|
|
|
3
3
|
inheritAttrs: false,
|
|
4
4
|
});
|
|
5
5
|
|
|
6
|
-
import { onMounted, onUnmounted, shallowRef, useAttrs
|
|
6
|
+
import { onMounted, onUnmounted, shallowRef, useAttrs } from "vue";
|
|
7
7
|
import type { CopilotKitCoreVue } from "../lib/vue-core";
|
|
8
|
-
import type { VueInspectorOpenRequest } from "../providers/keys";
|
|
9
8
|
|
|
10
9
|
const props = defineProps<{
|
|
11
10
|
core?: CopilotKitCoreVue | null;
|
|
12
|
-
openRequest?: VueInspectorOpenRequest | null;
|
|
13
11
|
}>();
|
|
14
12
|
|
|
15
13
|
const attrs = useAttrs();
|
|
@@ -32,22 +30,6 @@ onMounted(() => {
|
|
|
32
30
|
onUnmounted(() => {
|
|
33
31
|
isMounted = false;
|
|
34
32
|
});
|
|
35
|
-
|
|
36
|
-
watch(
|
|
37
|
-
() => [inspectorTag.value, props.openRequest] as const,
|
|
38
|
-
([tag, request]) => {
|
|
39
|
-
if (!tag || !request) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
const element = document.querySelector(tag) as {
|
|
43
|
-
openInspector?: (
|
|
44
|
-
source: string,
|
|
45
|
-
options: VueInspectorOpenRequest,
|
|
46
|
-
) => void;
|
|
47
|
-
} | null;
|
|
48
|
-
element?.openInspector?.("message_toolbar", request);
|
|
49
|
-
},
|
|
50
|
-
);
|
|
51
33
|
</script>
|
|
52
34
|
|
|
53
35
|
<template>
|
|
@@ -117,8 +117,6 @@ export const OpenGenerativeUIRenderer = defineComponent({
|
|
|
117
117
|
const executedExpressionIndex = ref(0);
|
|
118
118
|
const jsFunctionsInjected = ref(false);
|
|
119
119
|
const pendingQueue = ref<string[]>([]);
|
|
120
|
-
const autoHeight = ref<number | null>(null);
|
|
121
|
-
const heightMeasured = ref(false);
|
|
122
120
|
|
|
123
121
|
const localApi = computed(() => {
|
|
124
122
|
const api: Record<string, unknown> = {};
|
|
@@ -187,8 +185,7 @@ export const OpenGenerativeUIRenderer = defineComponent({
|
|
|
187
185
|
() => !!fullHtml.value || hasPreview.value,
|
|
188
186
|
);
|
|
189
187
|
const resolvedHeight = computed(
|
|
190
|
-
() =>
|
|
191
|
-
`${autoHeight.value ?? throttledContent.value.initialHeight ?? 200}px`,
|
|
188
|
+
() => `${throttledContent.value.initialHeight ?? 200}px`,
|
|
192
189
|
);
|
|
193
190
|
|
|
194
191
|
const destroyPreview = () => {
|
|
@@ -208,8 +205,6 @@ export const OpenGenerativeUIRenderer = defineComponent({
|
|
|
208
205
|
pendingQueue.value = [];
|
|
209
206
|
executedExpressionIndex.value = 0;
|
|
210
207
|
jsFunctionsInjected.value = false;
|
|
211
|
-
autoHeight.value = null;
|
|
212
|
-
heightMeasured.value = false;
|
|
213
208
|
};
|
|
214
209
|
|
|
215
210
|
watch(
|
|
@@ -359,42 +354,6 @@ export const OpenGenerativeUIRenderer = defineComponent({
|
|
|
359
354
|
{ immediate: true },
|
|
360
355
|
);
|
|
361
356
|
|
|
362
|
-
const measureOnce = `
|
|
363
|
-
(function() {
|
|
364
|
-
var s = document.createElement('style');
|
|
365
|
-
s.textContent = 'body { height: auto !important; min-height: 0 !important; }';
|
|
366
|
-
document.head.appendChild(s);
|
|
367
|
-
var h = document.body.scrollHeight;
|
|
368
|
-
var cs = getComputedStyle(document.body);
|
|
369
|
-
h += parseFloat(cs.marginTop) || 0;
|
|
370
|
-
h += parseFloat(cs.marginBottom) || 0;
|
|
371
|
-
s.remove();
|
|
372
|
-
parent.postMessage({ type: "__ck_resize", height: Math.ceil(h) }, "*");
|
|
373
|
-
})();
|
|
374
|
-
`;
|
|
375
|
-
|
|
376
|
-
watch(
|
|
377
|
-
[sandboxReady, () => throttledContent.value.generating === false],
|
|
378
|
-
([ready, generationDone]) => {
|
|
379
|
-
const sandbox = sandboxRef.value;
|
|
380
|
-
if (!ready || !generationDone || heightMeasured.value || !sandbox) {
|
|
381
|
-
return;
|
|
382
|
-
}
|
|
383
|
-
heightMeasured.value = true;
|
|
384
|
-
const onMessage = (event: MessageEvent) => {
|
|
385
|
-
if (
|
|
386
|
-
event.source === sandbox.iframe.contentWindow &&
|
|
387
|
-
event.data?.type === "__ck_resize"
|
|
388
|
-
) {
|
|
389
|
-
autoHeight.value = event.data.height;
|
|
390
|
-
window.removeEventListener("message", onMessage);
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
window.addEventListener("message", onMessage);
|
|
394
|
-
void sandbox.run(measureOnce);
|
|
395
|
-
},
|
|
396
|
-
);
|
|
397
|
-
|
|
398
357
|
watch(
|
|
399
358
|
() => throttledContent.value.jsFunctions,
|
|
400
359
|
(functionsCode) => {
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
defineComponent,
|
|
5
5
|
getCurrentInstance,
|
|
6
6
|
h,
|
|
7
|
-
inject,
|
|
8
7
|
onBeforeUnmount,
|
|
9
8
|
onMounted,
|
|
10
9
|
ref,
|
|
@@ -14,7 +13,6 @@ import { StreamMarkdown } from "streamdown-vue";
|
|
|
14
13
|
import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfiguration";
|
|
15
14
|
import { CopilotChatDefaultLabels } from "../../providers/types";
|
|
16
15
|
import {
|
|
17
|
-
IconBookmark,
|
|
18
16
|
IconCheck,
|
|
19
17
|
IconCopy,
|
|
20
18
|
IconDownload,
|
|
@@ -36,7 +34,6 @@ import type {
|
|
|
36
34
|
CopilotChatAssistantMessageToolbarSlotProps,
|
|
37
35
|
} from "./types";
|
|
38
36
|
import { useKatexStyles } from "../../hooks/use-katex-styles";
|
|
39
|
-
import { InspectorKey } from "../../providers/keys";
|
|
40
37
|
|
|
41
38
|
useKatexStyles();
|
|
42
39
|
|
|
@@ -91,10 +88,6 @@ const emit = defineEmits<{
|
|
|
91
88
|
|
|
92
89
|
const config = useCopilotChatConfiguration();
|
|
93
90
|
const labels = computed(() => config.value?.labels ?? CopilotChatDefaultLabels);
|
|
94
|
-
const inspector = inject(InspectorKey, null);
|
|
95
|
-
const isLocalInspectorEnabled = computed(
|
|
96
|
-
() => inspector?.isLocalInspectorEnabled.value === true,
|
|
97
|
-
);
|
|
98
91
|
const instance = getCurrentInstance();
|
|
99
92
|
const copied = ref(false);
|
|
100
93
|
let copiedResetTimeout: ReturnType<typeof setTimeout> | null = null;
|
|
@@ -668,31 +661,10 @@ const isLatestAssistantMessage = computed(
|
|
|
668
661
|
const shouldShowToolbar = computed(
|
|
669
662
|
() =>
|
|
670
663
|
props.toolbarVisible &&
|
|
671
|
-
|
|
664
|
+
hasContent.value &&
|
|
672
665
|
!(props.isRunning && isLatestAssistantMessage.value),
|
|
673
666
|
);
|
|
674
667
|
|
|
675
|
-
function handleViewInspector() {
|
|
676
|
-
inspector?.openInspector({
|
|
677
|
-
messageId: props.message.id,
|
|
678
|
-
threadId: config.value?.threadId,
|
|
679
|
-
agentId: config.value?.agentId,
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
function handleSaveSnippet() {
|
|
684
|
-
if (!hasContent.value) {
|
|
685
|
-
return;
|
|
686
|
-
}
|
|
687
|
-
void inspector?.saveEventSnippet({
|
|
688
|
-
kind: "text",
|
|
689
|
-
messageId: props.message.id,
|
|
690
|
-
content: props.message.content ?? "",
|
|
691
|
-
threadId: config.value?.threadId,
|
|
692
|
-
agentId: config.value?.agentId,
|
|
693
|
-
});
|
|
694
|
-
}
|
|
695
|
-
|
|
696
668
|
function resetCopiedStateWithDelay() {
|
|
697
669
|
if (copiedResetTimeout) {
|
|
698
670
|
clearTimeout(copiedResetTimeout);
|
|
@@ -842,29 +814,6 @@ onBeforeUnmount(() => {
|
|
|
842
814
|
</button>
|
|
843
815
|
</slot>
|
|
844
816
|
|
|
845
|
-
<button
|
|
846
|
-
v-if="isLocalInspectorEnabled"
|
|
847
|
-
data-testid="copilot-inspector-button"
|
|
848
|
-
type="button"
|
|
849
|
-
:class="toolbarButtonClass"
|
|
850
|
-
:aria-label="`${labels.assistantMessageToolbarInspectorLabel} (${labels.assistantMessageToolbarInspectorLocalOnlyLabel})`"
|
|
851
|
-
:title="`${labels.assistantMessageToolbarInspectorLabel} (${labels.assistantMessageToolbarInspectorLocalOnlyLabel})`"
|
|
852
|
-
@click="handleViewInspector"
|
|
853
|
-
>
|
|
854
|
-
I
|
|
855
|
-
</button>
|
|
856
|
-
<button
|
|
857
|
-
v-if="isLocalInspectorEnabled && hasContent"
|
|
858
|
-
data-testid="copilot-save-snippet-button"
|
|
859
|
-
type="button"
|
|
860
|
-
:class="toolbarButtonClass"
|
|
861
|
-
:aria-label="`${labels.assistantMessageToolbarSaveSnippetLabel} (${labels.assistantMessageToolbarInspectorLocalOnlyLabel})`"
|
|
862
|
-
:title="`${labels.assistantMessageToolbarSaveSnippetLabel} (${labels.assistantMessageToolbarInspectorLocalOnlyLabel})`"
|
|
863
|
-
@click="handleSaveSnippet"
|
|
864
|
-
>
|
|
865
|
-
<IconBookmark class="cpk:size-[18px]" />
|
|
866
|
-
</button>
|
|
867
|
-
|
|
868
817
|
<slot
|
|
869
818
|
v-if="hasThumbsUp"
|
|
870
819
|
name="thumbs-up-button"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed,
|
|
2
|
+
import { computed, ref, useSlots, watch } from "vue";
|
|
3
3
|
import type { Component } from "vue";
|
|
4
4
|
import type {
|
|
5
5
|
ActivityMessage,
|
|
@@ -19,9 +19,6 @@ import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfi
|
|
|
19
19
|
import CopilotChatAssistantMessage from "./CopilotChatAssistantMessage.vue";
|
|
20
20
|
import CopilotChatReasoningMessage from "./CopilotChatReasoningMessage.vue";
|
|
21
21
|
import CopilotChatUserMessage from "./CopilotChatUserMessage.vue";
|
|
22
|
-
import { InspectorKey } from "../../providers/keys";
|
|
23
|
-
import { IconBookmark } from "../icons";
|
|
24
|
-
import SaveSnippetBeside from "./SaveSnippetBeside.vue";
|
|
25
22
|
|
|
26
23
|
interface MessageMetaProps {
|
|
27
24
|
message: Message;
|
|
@@ -41,23 +38,6 @@ interface ActivitySlotProps {
|
|
|
41
38
|
agent: unknown;
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
const inspector = inject(InspectorKey, null);
|
|
45
|
-
const canSaveActivity = (message: ActivityMessage) =>
|
|
46
|
-
inspector?.isLocalInspectorEnabled.value === true &&
|
|
47
|
-
(message.activityType === "a2ui-surface" ||
|
|
48
|
-
message.activityType === "open-generative-ui");
|
|
49
|
-
|
|
50
|
-
function saveActivitySnippet(message: ActivityMessage) {
|
|
51
|
-
void inspector?.saveEventSnippet({
|
|
52
|
-
kind: "activity",
|
|
53
|
-
messageId: message.id,
|
|
54
|
-
activityType: message.activityType,
|
|
55
|
-
content: message.content,
|
|
56
|
-
threadId: config.value?.threadId,
|
|
57
|
-
agentId: config.value?.agentId,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
41
|
type InterruptSlotProps = InterruptRenderProps<unknown, unknown>;
|
|
62
42
|
type CustomMessagePosition = VueCustomMessageRendererProps["position"];
|
|
63
43
|
type ResolvedCustomMessageRenderer = {
|
|
@@ -434,42 +414,28 @@ function resolveToolMessage(
|
|
|
434
414
|
/>
|
|
435
415
|
</slot>
|
|
436
416
|
|
|
437
|
-
<
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
</slot>
|
|
460
|
-
<template #save>
|
|
461
|
-
<button
|
|
462
|
-
type="button"
|
|
463
|
-
class="cpk:inline-flex cpk:h-8 cpk:w-8 cpk:items-center cpk:justify-center cpk:rounded-md cpk:p-0 cpk:text-[rgb(93,93,93)] cpk:hover:bg-[#E8E8E8] cpk:dark:text-[rgb(243,243,243)] cpk:dark:hover:bg-[#303030]"
|
|
464
|
-
data-testid="copilot-activity-save-snippet-button"
|
|
465
|
-
:aria-label="`${config?.labels.assistantMessageToolbarSaveSnippetLabel ?? 'Save as snippet'} (Local Only)`"
|
|
466
|
-
@click="saveActivitySnippet(message)"
|
|
467
|
-
>
|
|
468
|
-
<IconBookmark class="cpk:size-[18px]" />
|
|
469
|
-
</button>
|
|
470
|
-
</template>
|
|
471
|
-
</SaveSnippetBeside>
|
|
472
|
-
</div>
|
|
417
|
+
<slot
|
|
418
|
+
v-else-if="message.role === 'activity'"
|
|
419
|
+
:name="getActivitySlotName(message.activityType)"
|
|
420
|
+
:activity-type="message.activityType"
|
|
421
|
+
:content="message.content"
|
|
422
|
+
:message="message"
|
|
423
|
+
:agent="resolvedThreadAgent"
|
|
424
|
+
>
|
|
425
|
+
<slot
|
|
426
|
+
name="activity-message"
|
|
427
|
+
:activity-type="message.activityType"
|
|
428
|
+
:content="message.content"
|
|
429
|
+
:message="message"
|
|
430
|
+
:agent="resolvedThreadAgent"
|
|
431
|
+
>
|
|
432
|
+
<component
|
|
433
|
+
v-if="resolveActivityRenderer(message)"
|
|
434
|
+
:is="resolveActivityRenderer(message)!.renderer"
|
|
435
|
+
v-bind="resolveActivityRenderer(message)!.props"
|
|
436
|
+
/>
|
|
437
|
+
</slot>
|
|
438
|
+
</slot>
|
|
473
439
|
|
|
474
440
|
<slot
|
|
475
441
|
v-if="componentSlots['message-after']"
|