@copilotkit/vue 2.0.0-rc.20 → 2.0.0-rc.21
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 +13 -13
- package/dist/use-render-activity-message-BAhbpSDh.js +16200 -0
- package/dist/use-render-activity-message-BAhbpSDh.js.map +1 -0
- package/dist/use-render-activity-message-DJ6q1qHV.cjs +114 -0
- package/dist/use-render-activity-message-DJ6q1qHV.cjs.map +1 -0
- package/dist/v2/components/A2UIMessageRenderer.d.ts +14 -0
- package/dist/v2/components/A2UIMessageRenderer.d.ts.map +1 -1
- package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts +10 -3
- package/dist/v2/components/A2UISurfaceActivityRenderer.vue.d.ts.map +1 -1
- package/dist/v2/components/CopilotKitInspector.vue.d.ts +5 -1
- package/dist/v2/components/CopilotKitInspector.vue.d.ts.map +1 -1
- package/dist/v2/components/MCPAppsActivityRenderer.d.ts.map +1 -1
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts +7 -21
- package/dist/v2/components/OpenGenerativeUIRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts +0 -5
- package/dist/v2/components/a2ui/A2UIBuiltInToolCallRenderer.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts +10 -15
- package/dist/v2/components/a2ui/A2UICatalogContext.d.ts.map +1 -1
- package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts +14 -138
- package/dist/v2/components/a2ui/A2UIRecoveryStates.d.ts.map +1 -1
- package/dist/v2/components/a2ui/catalog.d.ts.map +1 -1
- package/dist/v2/components/a2ui/utils.d.ts +3 -15
- package/dist/v2/components/a2ui/utils.d.ts.map +1 -1
- package/dist/v2/components/a2ui.d.ts +6 -1
- package/dist/v2/components/a2ui.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChat.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAttachmentQueue.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts +4 -8
- package/dist/v2/components/chat/CopilotChatAudioRecorder.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatInput.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatLightbox.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatMessageView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallGroup.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallItem.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatToolCallsView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts +1 -1
- package/dist/v2/components/chat/CopilotChatView.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotPopupViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotSidebarView.vue.d.ts +1 -1
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts +1 -1
- package/dist/v2/components/chat/CopilotSidebarViewInternal.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotThreadsDrawer.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/StreamingMarkdownDefault.vue.d.ts +1 -0
- package/dist/v2/components/chat/StreamingMarkdownDefault.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/audioRecorder.d.ts +3 -4
- package/dist/v2/components/chat/audioRecorder.d.ts.map +1 -1
- package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts +3 -2
- package/dist/v2/components/chat/copilotChatToolCallItemRender.d.ts.map +1 -1
- package/dist/v2/components/chat/index.d.ts +6 -6
- package/dist/v2/components/chat/tool-call-display-context.d.ts +3 -1
- package/dist/v2/components/chat/tool-call-display-context.d.ts.map +1 -1
- package/dist/v2/components/chat/tool-call-group-parts.d.ts.map +1 -1
- package/dist/v2/components/chat/types.d.ts +1 -1
- package/dist/v2/components/chat/types.d.ts.map +1 -1
- package/dist/v2/components/chat/use-lightbox.d.ts.map +1 -1
- package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts +1 -1
- package/dist/v2/components/ui/CopilotDropdownMenuContent.vue.d.ts.map +1 -1
- package/dist/v2/hooks/use-agent-context.d.ts +2 -3
- package/dist/v2/hooks/use-agent-context.d.ts.map +1 -1
- package/dist/v2/hooks/use-agent.d.ts +4 -1
- package/dist/v2/hooks/use-agent.d.ts.map +1 -1
- package/dist/v2/hooks/use-attachments.d.ts +7 -0
- package/dist/v2/hooks/use-attachments.d.ts.map +1 -1
- package/dist/v2/hooks/use-capabilities.d.ts.map +1 -1
- package/dist/v2/hooks/use-component.d.ts +1 -0
- package/dist/v2/hooks/use-component.d.ts.map +1 -1
- package/dist/v2/hooks/use-configure-suggestions.d.ts +4 -9
- package/dist/v2/hooks/use-configure-suggestions.d.ts.map +1 -1
- package/dist/v2/hooks/use-default-render-tool.d.ts.map +1 -1
- package/dist/v2/hooks/use-human-in-the-loop.d.ts +2 -1
- package/dist/v2/hooks/use-human-in-the-loop.d.ts.map +1 -1
- package/dist/v2/hooks/use-interrupt.d.ts +0 -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/hooks/use-render-custom-messages.d.ts.map +1 -1
- package/dist/v2/hooks/use-suggestions.d.ts.map +1 -1
- package/dist/v2/hooks/use-threads.d.ts +0 -8
- package/dist/v2/hooks/use-threads.d.ts.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/lib/vue-core.d.ts +12 -11
- package/dist/v2/lib/vue-core.d.ts.map +1 -1
- package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/CopilotKitProvider.types.d.ts +9 -124
- package/dist/v2/providers/CopilotKitProvider.types.d.ts.map +1 -1
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts +9 -10
- package/dist/v2/providers/CopilotKitProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/chat-configuration-store-key.d.ts +8 -0
- package/dist/v2/providers/chat-configuration-store-key.d.ts.map +1 -0
- package/dist/v2/providers/markdown-renderer.d.ts +3 -1
- package/dist/v2/providers/markdown-renderer.d.ts.map +1 -1
- package/dist/v2/providers/use-inspector-thread-override.d.ts +5 -0
- package/dist/v2/providers/use-inspector-thread-override.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/v2/__tests__/exports.test.ts +10 -0
- package/src/v2/__tests__/mocks/web-inspector.ts +6 -0
- package/src/v2/__tests__/utils/test-helpers.ts +34 -4
- package/src/v2/components/A2UIMessageRenderer.ts +98 -68
- package/src/v2/components/A2UISurfaceActivityRenderer.vue +68 -103
- package/src/v2/components/CopilotKitInspector.vue +104 -51
- package/src/v2/components/MCPAppsActivityRenderer.ts +75 -201
- package/src/v2/components/OpenGenerativeUIRenderer.ts +78 -80
- package/src/v2/components/__tests__/A2UIMessageRenderer.test.ts +171 -8
- package/src/v2/components/__tests__/CopilotKitInspector.test.ts +42 -0
- package/src/v2/components/__tests__/OpenGenerativeUIRenderer.test.ts +9 -2
- package/src/v2/components/__tests__/OpenGenerativeUIToolRenderer.test.ts +38 -0
- package/src/v2/components/a2ui/A2UIBuiltInToolCallRenderer.ts +1 -6
- package/src/v2/components/a2ui/A2UICatalogContext.ts +27 -93
- package/src/v2/components/a2ui/A2UIRecoveryStates.ts +127 -327
- package/src/v2/components/a2ui/catalog.ts +2 -3
- package/src/v2/components/a2ui/utils.ts +13 -67
- package/src/v2/components/a2ui.ts +14 -21
- package/src/v2/components/chat/CopilotChat.vue +136 -324
- package/src/v2/components/chat/CopilotChatAttachmentQueue.vue +22 -45
- package/src/v2/components/chat/CopilotChatAudioRecorder.vue +19 -246
- package/src/v2/components/chat/CopilotChatInput.vue +69 -407
- package/src/v2/components/chat/CopilotChatLightbox.vue +10 -31
- package/src/v2/components/chat/CopilotChatMessageView.vue +52 -112
- package/src/v2/components/chat/CopilotChatToolCallGroup.vue +14 -45
- package/src/v2/components/chat/CopilotChatToolCallItem.vue +6 -4
- package/src/v2/components/chat/CopilotChatToolCallsView.vue +16 -19
- package/src/v2/components/chat/CopilotChatView.vue +28 -23
- package/src/v2/components/chat/CopilotPopupViewInternal.vue +21 -97
- package/src/v2/components/chat/CopilotSidebarViewInternal.vue +24 -25
- package/src/v2/components/chat/CopilotThreadsDrawer.vue +37 -102
- package/src/v2/components/chat/StreamingMarkdownDefault.vue +13 -26
- package/src/v2/components/chat/__tests__/CopilotChat.test.ts +12 -10
- package/src/v2/components/chat/__tests__/CopilotChatAttachmentQueue.test.ts +28 -0
- package/src/v2/components/chat/__tests__/CopilotChatInput.test.ts +56 -0
- package/src/v2/components/chat/__tests__/CopilotPopupView.test.ts +19 -0
- package/src/v2/components/chat/__tests__/CopilotSidebarView.position.test.ts +32 -8
- package/src/v2/components/chat/__tests__/CopilotSidebarView.test.ts +2 -1
- package/src/v2/components/chat/__tests__/StreamingMarkdownDefault.test.ts +54 -0
- package/src/v2/components/chat/audioRecorder.ts +4 -7
- package/src/v2/components/chat/copilotChatToolCallItemRender.ts +22 -71
- package/src/v2/components/chat/tool-call-display-context.ts +6 -1
- package/src/v2/components/chat/tool-call-group-parts.ts +13 -33
- package/src/v2/components/chat/types.ts +1 -1
- package/src/v2/components/chat/use-lightbox.ts +15 -33
- package/src/v2/hooks/__tests__/use-agent-error-state.test.ts +5 -3
- package/src/v2/hooks/__tests__/use-agent-stability.test.ts +25 -4
- package/src/v2/hooks/__tests__/use-agent-throttle.test.ts +5 -1
- package/src/v2/hooks/__tests__/use-agent.test.ts +6 -3
- package/src/v2/hooks/__tests__/use-component.test.ts +21 -0
- package/src/v2/hooks/__tests__/use-configure-suggestions.test.ts +30 -1
- package/src/v2/hooks/__tests__/use-default-render-tool.test.ts +10 -10
- package/src/v2/hooks/__tests__/use-frontend-tool.e2e.test.ts +4 -0
- package/src/v2/hooks/__tests__/use-human-in-the-loop.e2e.test.ts +6 -1
- package/src/v2/hooks/__tests__/use-human-in-the-loop.test.ts +187 -12
- package/src/v2/hooks/__tests__/use-interrupt.test.ts +97 -0
- package/src/v2/hooks/__tests__/use-render-activity-message.test.ts +2 -1
- package/src/v2/hooks/__tests__/use-threads.test.ts +48 -6
- package/src/v2/hooks/use-agent-context.ts +4 -10
- package/src/v2/hooks/use-agent.ts +86 -290
- package/src/v2/hooks/use-attachments.ts +42 -166
- package/src/v2/hooks/use-capabilities.ts +2 -7
- package/src/v2/hooks/use-component.ts +7 -4
- package/src/v2/hooks/use-configure-suggestions.ts +28 -218
- package/src/v2/hooks/use-default-render-tool.ts +34 -94
- package/src/v2/hooks/use-human-in-the-loop.ts +11 -80
- package/src/v2/hooks/use-interrupt.ts +29 -308
- package/src/v2/hooks/use-render-activity-message.ts +17 -20
- package/src/v2/hooks/use-render-custom-messages.ts +20 -63
- package/src/v2/hooks/use-suggestions.ts +9 -33
- package/src/v2/hooks/use-threads.ts +43 -273
- package/src/v2/lib/__tests__/vue-core-renderers.test.ts +42 -0
- package/src/v2/lib/vue-core.ts +67 -72
- package/src/v2/providers/CopilotChatConfigurationProvider.vue +48 -186
- package/src/v2/providers/CopilotKitProvider.types.ts +12 -127
- package/src/v2/providers/CopilotKitProvider.vue +188 -402
- package/src/v2/providers/__tests__/CopilotChatConfigurationProvider.test.ts +22 -2
- package/src/v2/providers/__tests__/CopilotKitProvider.a2ui.test.ts +19 -1
- package/src/v2/providers/__tests__/CopilotKitProvider.config.test.ts +124 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.sandboxFunctions.test.ts +4 -1
- package/src/v2/providers/__tests__/CopilotKitProvider.test.ts +45 -2
- package/src/v2/providers/chat-configuration-store-key.ts +9 -0
- package/src/v2/providers/markdown-renderer.ts +7 -1
- package/src/v2/providers/use-inspector-thread-override.ts +22 -80
- package/vite.config.ts +5 -1
- package/vitest.config.ts +12 -7
- package/dist/use-render-activity-message-CsWYyd6r.cjs +0 -91
- package/dist/use-render-activity-message-CsWYyd6r.cjs.map +0 -1
- package/dist/use-render-activity-message-DntKKNdd.js +0 -17418
- package/dist/use-render-activity-message-DntKKNdd.js.map +0 -1
- package/dist/v2/components/chat/normalize-auto-scroll.d.ts +0 -3
- package/dist/v2/components/chat/normalize-auto-scroll.d.ts.map +0 -1
- package/dist/v2/lib/is-mobile-viewport.d.ts +0 -2
- package/dist/v2/lib/is-mobile-viewport.d.ts.map +0 -1
- package/src/v2/components/__tests__/A2UICatalogContext.test.ts +0 -63
- package/src/v2/components/a2ui/__tests__/A2UIRecoveryStates.test.ts +0 -175
- package/src/v2/components/chat/normalize-auto-scroll.ts +0 -3
- package/src/v2/lib/is-mobile-viewport.ts +0 -5
|
@@ -16,30 +16,31 @@ export interface CopilotKitCoreVueSubscriber extends CopilotKitCoreSubscriber {
|
|
|
16
16
|
copilotkit: CopilotKitCoreVue;
|
|
17
17
|
renderCustomMessages: VueCustomMessageRenderer[];
|
|
18
18
|
}) => void | Promise<void>;
|
|
19
|
+
onRenderActivityMessagesChanged?: (event: {
|
|
20
|
+
copilotkit: CopilotKitCoreVue;
|
|
21
|
+
renderActivityMessages: VueActivityMessageRenderer<unknown>[];
|
|
22
|
+
}) => void | Promise<void>;
|
|
19
23
|
onInterruptStateChanged?: (event: {
|
|
20
24
|
copilotkit: CopilotKitCoreVue;
|
|
21
25
|
interruptState: InterruptRenderProps<unknown, unknown> | null;
|
|
22
26
|
}) => void | Promise<void>;
|
|
23
27
|
}
|
|
24
28
|
export declare class CopilotKitCoreVue extends CopilotKitCore {
|
|
25
|
-
private
|
|
26
|
-
private _hookRenderToolCalls;
|
|
27
|
-
private _cachedMergedRenderToolCalls;
|
|
28
|
-
private _renderCustomMessages;
|
|
29
|
-
private _renderActivityMessages;
|
|
30
|
-
private _interruptState;
|
|
29
|
+
private readonly _renderers;
|
|
31
30
|
constructor(config: CopilotKitCoreVueConfig);
|
|
32
|
-
get renderCustomMessages():
|
|
33
|
-
get renderActivityMessages():
|
|
31
|
+
get renderCustomMessages(): readonly VueCustomMessageRenderer[];
|
|
32
|
+
get renderActivityMessages(): readonly VueActivityMessageRenderer<unknown>[];
|
|
34
33
|
setRenderActivityMessages(renderers: VueActivityMessageRenderer<unknown>[]): void;
|
|
35
34
|
setRenderCustomMessages(renderers: VueCustomMessageRenderer[]): void;
|
|
36
|
-
|
|
37
|
-
get
|
|
35
|
+
/** The renderers the provider was given, without hook renderers. */
|
|
36
|
+
get propRenderToolCalls(): readonly VueToolCallRenderer<unknown>[];
|
|
37
|
+
/** Prop and hook renderers merged; a hook renderer wins over a prop one. */
|
|
38
|
+
get renderToolCalls(): readonly VueToolCallRenderer<unknown>[];
|
|
38
39
|
get interruptState(): InterruptRenderProps<unknown, unknown> | null;
|
|
39
40
|
setRenderToolCalls(renderToolCalls: VueToolCallRenderer<unknown>[]): void;
|
|
40
41
|
addHookRenderToolCall(entry: VueToolCallRenderer<unknown>): void;
|
|
41
42
|
removeHookRenderToolCall(name: string, agentId?: string): void;
|
|
42
|
-
private
|
|
43
|
+
private notifyRenderersChanged;
|
|
43
44
|
setInterruptState(interruptState: InterruptRenderProps<unknown, unknown> | null): void;
|
|
44
45
|
subscribe(subscriber: CopilotKitCoreVueSubscriber): CopilotKitCoreSubscription;
|
|
45
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-core.d.ts","sourceRoot":"","sources":["../../../src/v2/lib/vue-core.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"vue-core.d.ts","sourceRoot":"","sources":["../../../src/v2/lib/vue-core.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAqB,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE,eAAe,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;IACjD,sBAAsB,CAAC,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/D,oBAAoB,CAAC,EAAE,wBAAwB,EAAE,CAAC;CACnD;AAED,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;IAC3E,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE;QACjC,UAAU,EAAE,iBAAiB,CAAC;QAC9B,eAAe,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;KACjD,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,6BAA6B,CAAC,EAAE,CAAC,KAAK,EAAE;QACtC,UAAU,EAAE,iBAAiB,CAAC;QAC9B,oBAAoB,EAAE,wBAAwB,EAAE,CAAC;KAClD,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,+BAA+B,CAAC,EAAE,CAAC,KAAK,EAAE;QACxC,UAAU,EAAE,iBAAiB,CAAC;QAC9B,sBAAsB,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAAE,CAAC;KAC/D,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE;QAChC,UAAU,EAAE,iBAAiB,CAAC;QAC9B,cAAc,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;KAC/D,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,qBAAa,iBAAkB,SAAQ,cAAc;IACnD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAIzB;gBAEU,MAAM,EAAE,uBAAuB;IAuB3C,IAAI,oBAAoB,wCAEvB;IAED,IAAI,sBAAsB,mDAEzB;IAED,yBAAyB,CACvB,SAAS,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAAE,GAC/C,IAAI;IAIP,uBAAuB,CAAC,SAAS,EAAE,wBAAwB,EAAE,GAAG,IAAI;IAIpE,oEAAoE;IACpE,IAAI,mBAAmB,4CAEtB;IAED,4EAA4E;IAC5E,IAAI,eAAe,4CAElB;IAED,IAAI,cAAc,IAAI,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAI,CAKlE;IAED,kBAAkB,CAAC,eAAe,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI;IAIzE,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,IAAI;IAIhE,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI9D,OAAO,CAAC,sBAAsB;IAuB9B,iBAAiB,CACf,cAAc,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAI,GAC5D,IAAI;IAIP,SAAS,CACP,UAAU,EAAE,2BAA2B,GACtC,0BAA0B;CAG9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotChatConfigurationProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotChatConfigurationProvider.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotChatConfigurationProvider.vue.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotChatConfigurationProvider.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AA8FtG,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;AAmB/C,QAAA,MAAM,eAAe;;;6EAOnB,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,19 +1,9 @@
|
|
|
1
1
|
import type { A2UIRecoveryRendererOptions } from "../components/a2ui/A2UIRecoveryStates";
|
|
2
|
-
import type {
|
|
3
|
-
import type { CopilotKitCoreErrorCode, CopilotKitHeadersSource, CopilotKitMessageFilter, LearningConfig } from "@copilotkit/core";
|
|
4
|
-
import type { DebugConfig } from "@copilotkit/shared";
|
|
2
|
+
import type { ɵA2UIActionInterceptor, ɵA2UIBaseOptions, ɵCopilotKitLearningOptions, ɵCopilotKitProviderBaseOptions } from "@copilotkit/core";
|
|
5
3
|
import type { A2UITheme, SandboxFunction, VueActivityMessageRenderer, VueCustomMessageRenderer, VueFrontendTool, VueHumanInTheLoop, VueToolCallRenderer } from "../types";
|
|
6
4
|
import type { Component } from "vue";
|
|
7
5
|
import type { MarkdownRendererValue } from "./markdown-renderer";
|
|
8
|
-
export interface CopilotKitProviderProps {
|
|
9
|
-
runtimeUrl?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Headers sent with every request. A record, or a sync or async builder
|
|
12
|
-
* that runs when each request is sent. An inline arrow is fine. The builder
|
|
13
|
-
* should be cheap; cache tokens in it.
|
|
14
|
-
*/
|
|
15
|
-
headers?: CopilotKitHeadersSource;
|
|
16
|
-
credentials?: RequestCredentials;
|
|
6
|
+
export interface CopilotKitProviderProps extends ɵCopilotKitProviderBaseOptions {
|
|
17
7
|
/**
|
|
18
8
|
* CSP nonce for the `<style>` tag CopilotKit adds. Set it when your
|
|
19
9
|
* Content-Security-Policy limits `style-src` to a nonce.
|
|
@@ -25,42 +15,6 @@ export interface CopilotKitProviderProps {
|
|
|
25
15
|
* @default true
|
|
26
16
|
*/
|
|
27
17
|
injectStyles?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Rewrites the message list sent to runtime agents on every run.
|
|
30
|
-
*
|
|
31
|
-
* CopilotKit sends the whole thread each time. When your agent already
|
|
32
|
-
* stores the conversation, most of that payload is waste, and an agent that
|
|
33
|
-
* merges the inbound list with its own store can show the model every turn
|
|
34
|
-
* twice. Return the messages to send:
|
|
35
|
-
*
|
|
36
|
-
* ```vue
|
|
37
|
-
* <CopilotKitProvider
|
|
38
|
-
* runtime-url="/api/copilotkit"
|
|
39
|
-
* :message-filter="(messages) => messages.slice(-1)"
|
|
40
|
-
* />
|
|
41
|
-
* ```
|
|
42
|
-
*
|
|
43
|
-
* The filter changes the request body only. The transcript the UI renders is
|
|
44
|
-
* untouched. Broken tool-call pairs are repaired before the request is sent,
|
|
45
|
-
* so a filter this blunt cannot strand a tool result mid-HITL.
|
|
46
|
-
*
|
|
47
|
-
* Agents reached through your CopilotRuntime honor this. An agent your app
|
|
48
|
-
* passes in directly does not, and neither Intelligence runs nor suggestion
|
|
49
|
-
* runs are ever filtered.
|
|
50
|
-
*/
|
|
51
|
-
messageFilter?: CopilotKitMessageFilter;
|
|
52
|
-
defaultThrottleMs?: number;
|
|
53
|
-
publicApiKey?: string;
|
|
54
|
-
publicLicenseKey?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Signed license token for offline verification of CopilotKit Intelligence features.
|
|
57
|
-
* Obtain from https://dashboard.operations.copilotkit.ai.
|
|
58
|
-
*/
|
|
59
|
-
licenseToken?: string;
|
|
60
|
-
properties?: Record<string, unknown>;
|
|
61
|
-
useSingleEndpoint?: boolean;
|
|
62
|
-
agents__unsafe_dev_only?: Record<string, AbstractAgent>;
|
|
63
|
-
selfManagedAgents?: Record<string, AbstractAgent>;
|
|
64
18
|
renderToolCalls?: VueToolCallRenderer<any>[];
|
|
65
19
|
renderActivityMessages?: VueActivityMessageRenderer<unknown>[];
|
|
66
20
|
renderCustomMessages?: VueCustomMessageRenderer[];
|
|
@@ -76,49 +30,23 @@ export interface CopilotKitProviderProps {
|
|
|
76
30
|
* always disabled in production and during server rendering.
|
|
77
31
|
*/
|
|
78
32
|
enableInspector?: boolean;
|
|
79
|
-
|
|
80
|
-
error: Error;
|
|
81
|
-
code: CopilotKitCoreErrorCode;
|
|
82
|
-
context: Record<string, any>;
|
|
83
|
-
}) => void | Promise<void>;
|
|
84
|
-
a2ui?: {
|
|
33
|
+
a2ui?: ɵA2UIBaseOptions & {
|
|
85
34
|
theme?: A2UITheme;
|
|
86
35
|
catalog?: any;
|
|
87
36
|
loadingComponent?: Component;
|
|
88
|
-
/**
|
|
89
|
-
* When true (the default), the full component schemas from the catalog are
|
|
90
|
-
* sent as agent context so the agent knows what components and props are
|
|
91
|
-
* available. The A2UI middleware can overwrite this with a server-side
|
|
92
|
-
* schema if configured.
|
|
93
|
-
*
|
|
94
|
-
* When false, the agent context still describes the catalog, but only by its
|
|
95
|
-
* catalog ID and the names of its custom components, without their JSON
|
|
96
|
-
* schemas. The component schema entry and the A2UI generation and design
|
|
97
|
-
* guidelines are not sent. With the CopilotKit LangGraph middleware's
|
|
98
|
-
* injected A2UI tool, the A2UI subagent then gets the component names only;
|
|
99
|
-
* a host can still give it a composition guide through the middleware's
|
|
100
|
-
* guidelines (`a2uiParams.guidelines.compositionGuide` in TypeScript,
|
|
101
|
-
* `a2ui_params["guidelines"]["composition_guide"]` in Python).
|
|
102
|
-
*/
|
|
103
|
-
includeSchema?: boolean;
|
|
104
37
|
/**
|
|
105
38
|
* Options for the A2UI error-recovery status UI: how long before the
|
|
106
39
|
* transient "Retrying…" hint appears, after how many attempts, and how
|
|
107
40
|
* much retry/debug detail to surface. When omitted, defaults apply.
|
|
108
41
|
*/
|
|
109
42
|
recovery?: A2UIRecoveryRendererOptions;
|
|
110
|
-
};
|
|
111
|
-
/** Configuration for the built-in MCP Apps renderer. */
|
|
112
|
-
mcpApps?: {
|
|
113
43
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
* Only set it for widgets you wrote and trust that need `localStorage`,
|
|
119
|
-
* `IndexedDB` or cookies. By default widgets get an opaque origin.
|
|
44
|
+
* Intercept A2UI user actions before they reach the agent: return `null`
|
|
45
|
+
* to handle an action client-side (e.g. a `navigate` event), return an
|
|
46
|
+
* action to forward that one instead, or return nothing to forward it
|
|
47
|
+
* unchanged.
|
|
120
48
|
*/
|
|
121
|
-
|
|
49
|
+
onAction?: ɵA2UIActionInterceptor;
|
|
122
50
|
};
|
|
123
51
|
/**
|
|
124
52
|
* Global markdown renderer for assistant/reasoning messages. Either a Vue
|
|
@@ -129,50 +57,7 @@ export interface CopilotKitProviderProps {
|
|
|
129
57
|
* a per-message slot still wins.
|
|
130
58
|
*/
|
|
131
59
|
markdownRenderer?: MarkdownRendererValue;
|
|
132
|
-
/**
|
|
133
|
-
* Enable debug logging for the client-side event pipeline.
|
|
134
|
-
*
|
|
135
|
-
* Accepts:
|
|
136
|
-
* - `true` / `false` to toggle events + lifecycle logging (verbose off).
|
|
137
|
-
* - `{ events?: boolean; lifecycle?: boolean; verbose?: boolean }` for granular control.
|
|
138
|
-
*/
|
|
139
|
-
debug?: DebugConfig;
|
|
140
|
-
/**
|
|
141
|
-
* Turns on interaction capture (`@copilotkit/learning`). `learning` (short
|
|
142
|
-
* for `:learning="true"`) records with the default options; pass an object
|
|
143
|
-
* for options. `false` or omitting the prop turns capture off and cancels
|
|
144
|
-
* startup. Without a sink, Core authenticates with the runtime and sends
|
|
145
|
-
* browser events to Intelligence; a custom sink keeps the standalone
|
|
146
|
-
* collector behavior. Updated settings apply to the next Trajectory.
|
|
147
|
-
*
|
|
148
|
-
* Capture starts after mount. Set `trajectoryId` to use your own ID;
|
|
149
|
-
* otherwise the provider generates one. The generated ID stays the same
|
|
150
|
-
* across rerenders, reconnects and option changes; turning capture off,
|
|
151
|
-
* setting `autoStart: false` or supplying a `trajectoryId` ends it, and the
|
|
152
|
-
* next generated Trajectory gets a new ID. Read the active ID from
|
|
153
|
-
* `copilotkit.trajectoryId`.
|
|
154
|
-
*
|
|
155
|
-
* Set `autoStart: false` to start capture yourself with `startTrajectory()`.
|
|
156
|
-
* Capture stops on unmount, including manually started Trajectories.
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
* <CopilotKitProvider runtime-url="/api/copilotkit" learning>
|
|
160
|
-
*/
|
|
161
|
-
learning?: boolean | CopilotKitLearningOptions;
|
|
162
60
|
}
|
|
163
61
|
/** The object form of the `learning` prop. */
|
|
164
|
-
export type CopilotKitLearningOptions =
|
|
165
|
-
/**
|
|
166
|
-
* Starts a Trajectory after mount. Defaults to `true`; set `false` to call
|
|
167
|
-
* `startTrajectory()` yourself.
|
|
168
|
-
*/
|
|
169
|
-
autoStart?: boolean;
|
|
170
|
-
trajectoryId?: string;
|
|
171
|
-
/**
|
|
172
|
-
* Used only by explicit custom sinks. Authenticated capture warns and ignores
|
|
173
|
-
* this option; assign Learning Spaces on the server with
|
|
174
|
-
* `getTrajectoryLearningContainerIds` on `CopilotKitIntelligence`.
|
|
175
|
-
*/
|
|
176
|
-
learningContainerIds?: string[];
|
|
177
|
-
};
|
|
62
|
+
export type CopilotKitLearningOptions = ɵCopilotKitLearningOptions;
|
|
178
63
|
//# sourceMappingURL=CopilotKitProvider.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotKitProvider.types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"CopilotKitProvider.types.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/CopilotKitProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,0BAA0B,EAC1B,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,0BAA0B,EAC1B,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,WAAW,uBAAwB,SAAQ,8BAA8B;IAC7E;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;IAC7C,sBAAsB,CAAC,EAAE,0BAA0B,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/D,oBAAoB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAClD,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE;QACjB,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;QACrC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE,gBAAgB,GAAG;QACxB,KAAK,CAAC,EAAE,SAAS,CAAC;QAClB,OAAO,CAAC,EAAE,GAAG,CAAC;QACd,gBAAgB,CAAC,EAAE,SAAS,CAAC;QAC7B;;;;WAIG;QACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;QACvC;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;KACnC,CAAC;IACF;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;CAC1C;AAED,8CAA8C;AAC9C,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Component } from "vue";
|
|
2
|
-
import type { AbstractAgent } from "@ag-ui/client";
|
|
3
2
|
import type { CopilotKitHeadersSource } from "@copilotkit/core";
|
|
4
|
-
import type {
|
|
3
|
+
import type { CopilotKitProviderProps } from "./CopilotKitProvider.types";
|
|
5
4
|
import type { SandboxFunction, VueActivityMessageRenderer, VueFrontendTool } from "../types";
|
|
6
5
|
declare var __VLS_1: {};
|
|
7
6
|
type __VLS_Slots = {} & {
|
|
@@ -10,13 +9,8 @@ type __VLS_Slots = {} & {
|
|
|
10
9
|
declare const __VLS_component: import("vue").DefineComponent<CopilotKitProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CopilotKitProviderProps> & Readonly<{}>, {
|
|
11
10
|
renderActivityMessages: VueActivityMessageRenderer<unknown>[];
|
|
12
11
|
renderCustomMessages: import("..").VueCustomMessageRenderer[];
|
|
13
|
-
headers: CopilotKitHeadersSource;
|
|
14
12
|
nonce: string;
|
|
15
13
|
injectStyles: boolean;
|
|
16
|
-
properties: Record<string, unknown>;
|
|
17
|
-
useSingleEndpoint: boolean;
|
|
18
|
-
agents__unsafe_dev_only: Record<string, AbstractAgent>;
|
|
19
|
-
selfManagedAgents: Record<string, AbstractAgent>;
|
|
20
14
|
frontendTools: VueFrontendTool[];
|
|
21
15
|
humanInTheLoop: import("..").VueHumanInTheLoop[];
|
|
22
16
|
openGenerativeUI: {
|
|
@@ -24,17 +18,22 @@ declare const __VLS_component: import("vue").DefineComponent<CopilotKitProviderP
|
|
|
24
18
|
designSkill?: string;
|
|
25
19
|
};
|
|
26
20
|
enableInspector: boolean;
|
|
27
|
-
a2ui: {
|
|
21
|
+
a2ui: import("@copilotkit/core").ɵA2UIBaseOptions & {
|
|
28
22
|
theme?: import("..").A2UITheme;
|
|
29
23
|
catalog?: any;
|
|
30
24
|
loadingComponent?: Component;
|
|
31
|
-
includeSchema?: boolean;
|
|
32
25
|
recovery?: import("..").A2UIRecoveryRendererOptions;
|
|
26
|
+
onAction?: import("@copilotkit/core").ɵA2UIActionInterceptor;
|
|
33
27
|
};
|
|
28
|
+
headers: CopilotKitHeadersSource;
|
|
29
|
+
properties: Record<string, unknown>;
|
|
30
|
+
useSingleEndpoint: boolean;
|
|
31
|
+
agents__unsafe_dev_only: Record<string, import("@ag-ui/client").AbstractAgent>;
|
|
32
|
+
selfManagedAgents: Record<string, import("@ag-ui/client").AbstractAgent>;
|
|
34
33
|
mcpApps: {
|
|
35
34
|
allowSameOriginFallback?: boolean;
|
|
36
35
|
};
|
|
37
|
-
learning: boolean | CopilotKitLearningOptions;
|
|
36
|
+
learning: boolean | import("@copilotkit/core").ɵCopilotKitLearningOptions;
|
|
38
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
38
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
40
39
|
export default _default;
|
|
@@ -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":"AAgtBA,OAAO,KAAK,EAAE,SAAS,EAAuB,MAAM,KAAK,CAAC;AAQ1D,OAAO,KAAK,EACV,uBAAuB,EAGxB,MAAM,kBAAkB,CAAC;AAwC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1B,eAAe,EAGhB,MAAM,UAAU,CAAC;AA4qBlB,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;AA0B/C,QAAA,MAAM,eAAe;;;;;;;;wBAhxBrB,CAtpBe;mBAspBf,CArpBgB;;;;aAqpBhB,CA3oBc;eA2oBd,CA1oBsB;wBA0oBtB,CAxoBQ;gBAwoBR,CAnoB8D;gBAmoB9D,CA1nBO;;;;;;;;+BAs6C22+D,CAAC;;;6EArBj3+D,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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InjectionKey } from "vue";
|
|
2
|
+
import type { ɵChatConfigurationStore } from "@copilotkit/core";
|
|
3
|
+
/**
|
|
4
|
+
* The nearest `CopilotChatConfigurationProvider`'s core store, so a nested
|
|
5
|
+
* provider can link its own store to it.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ChatConfigurationStoreKey: InjectionKey<ɵChatConfigurationStore>;
|
|
8
|
+
//# sourceMappingURL=chat-configuration-store-key.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-configuration-store-key.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/chat-configuration-store-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACxC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,uBAAuB,CACnC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Component, InjectionKey } from "vue";
|
|
2
|
-
import type { VueStreamingMarkdownNodeRenderers } from "@copilotkit/markdown/vue";
|
|
2
|
+
import type { VueStreamingMarkdownCitationClickHandler, VueStreamingMarkdownLinkClickHandler, VueStreamingMarkdownNodeRenderers } from "@copilotkit/markdown/vue";
|
|
3
3
|
import type { StreamingMarkdownParserOptions } from "@copilotkit/markdown";
|
|
4
4
|
/** Config for the built-in Vue default renderer (pass instead of a component). */
|
|
5
5
|
export interface DefaultMarkdownRendererProps {
|
|
@@ -7,6 +7,8 @@ export interface DefaultMarkdownRendererProps {
|
|
|
7
7
|
caret?: boolean;
|
|
8
8
|
options?: Partial<StreamingMarkdownParserOptions>;
|
|
9
9
|
class?: string;
|
|
10
|
+
onLinkClick?: VueStreamingMarkdownLinkClickHandler;
|
|
11
|
+
onCitationClick?: VueStreamingMarkdownCitationClickHandler;
|
|
10
12
|
}
|
|
11
13
|
export type MarkdownRendererValue = Component | DefaultMarkdownRendererProps;
|
|
12
14
|
/** Injection key for a global markdown renderer component (or `undefined`). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/markdown-renderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"markdown-renderer.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/markdown-renderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,KAAK,EACV,wCAAwC,EACxC,oCAAoC,EACpC,iCAAiC,EAClC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAE3E,kFAAkF;AAClF,MAAM,WAAW,4BAA4B;IAC3C,aAAa,CAAC,EAAE,iCAAiC,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,oCAAoC,CAAC;IACnD,eAAe,CAAC,EAAE,wCAAwC,CAAC;CAC5D;AAED,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,4BAA4B,CAAC;AAE7E,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAC9C,qBAAqB,GAAG,SAAS,CACO,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,qBAAqB,GAAG,SAAS,CAEvE;AAED,yFAAyF;AACzF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAOzE"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { Ref } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* Apply the Inspector's "view this thread" requests to a chat. Core's
|
|
4
|
+
* `ɵInspectorThreadOverride` owns the state machine; this composable binds it
|
|
5
|
+
* to the component's lifetime and Vue reactivity.
|
|
6
|
+
*/
|
|
2
7
|
export declare function useInspectorThreadOverride(args: {
|
|
3
8
|
agentId: Ref<string>;
|
|
4
9
|
baseThreadId: Ref<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-inspector-thread-override.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/use-inspector-thread-override.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"use-inspector-thread-override.d.ts","sourceRoot":"","sources":["../../../src/v2/providers/use-inspector-thread-override.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG/B;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE;IAC/C,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B,GAAG;IACF,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,kBAAkB,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvC,qBAAqB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD,CAwBA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/vue",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vue 3 components and composables for CopilotKit",
|
|
6
6
|
"keywords": [
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"@a2ui/web_core": "0.10.4",
|
|
62
62
|
"@ag-ui/client": "1.0.2",
|
|
63
63
|
"@ag-ui/core": "1.0.2",
|
|
64
|
-
"@copilotkit/a2ui-renderer": "2.0.0-rc.
|
|
65
|
-
"@copilotkit/core": "2.0.0-rc.
|
|
66
|
-
"@copilotkit/markdown": "2.0.0-rc.
|
|
67
|
-
"@copilotkit/mcp-apps-renderer": "2.0.0-rc.
|
|
68
|
-
"@copilotkit/shared": "2.0.0-rc.
|
|
69
|
-
"@copilotkit/web-components": "2.0.0-rc.
|
|
70
|
-
"@copilotkit/web-inspector": "2.0.0-rc.
|
|
64
|
+
"@copilotkit/a2ui-renderer": "2.0.0-rc.21",
|
|
65
|
+
"@copilotkit/core": "2.0.0-rc.21",
|
|
66
|
+
"@copilotkit/markdown": "2.0.0-rc.21",
|
|
67
|
+
"@copilotkit/mcp-apps-renderer": "2.0.0-rc.21",
|
|
68
|
+
"@copilotkit/shared": "2.0.0-rc.21",
|
|
69
|
+
"@copilotkit/web-components": "2.0.0-rc.21",
|
|
70
|
+
"@copilotkit/web-inspector": "2.0.0-rc.21",
|
|
71
71
|
"zod": "^4.2.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
@@ -24,6 +24,16 @@ describe("package exports", () => {
|
|
|
24
24
|
expect(typeof VuePackage.MCPAppsActivityRenderer).toBe("object");
|
|
25
25
|
expect(VuePackage.A2UISurfaceActivityType).toBe("a2ui-surface");
|
|
26
26
|
expect(typeof VuePackage.A2UISurfaceActivityRenderer).toBe("object");
|
|
27
|
+
expect(
|
|
28
|
+
VuePackage.getOperationSurfaceId({ createSurface: { surfaceId: "s" } }),
|
|
29
|
+
).toBe("s");
|
|
30
|
+
// Standard Schemas since 2.0 (see the generative UI migration guide).
|
|
31
|
+
expect(VuePackage.OpenGenerativeUIContentSchema["~standard"].vendor).toBe(
|
|
32
|
+
"copilotkit",
|
|
33
|
+
);
|
|
34
|
+
expect(VuePackage.GenerateSandboxedUiArgsSchema["~standard"].vendor).toBe(
|
|
35
|
+
"copilotkit",
|
|
36
|
+
);
|
|
27
37
|
});
|
|
28
38
|
|
|
29
39
|
it("exports the default A2UI catalog for the catalog-on-provider path", () => {
|
|
@@ -12,6 +12,12 @@ export class WebInspectorElement extends HTMLElement {
|
|
|
12
12
|
connectedCallback() {
|
|
13
13
|
this.autoAttachCoreAtConnection = this.autoAttachCore;
|
|
14
14
|
this.coreAtConnection = this.core;
|
|
15
|
+
// The real element reports that it is shown after its first render.
|
|
16
|
+
this.dispatchEvent(
|
|
17
|
+
new CustomEvent("cpk-inspector-visibility-change", {
|
|
18
|
+
detail: { visible: true },
|
|
19
|
+
}),
|
|
20
|
+
);
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
|
|
@@ -178,11 +178,26 @@ export class MockStepwiseAgent extends AbstractAgent {
|
|
|
178
178
|
|
|
179
179
|
run(_input: RunAgentInput): Observable<BaseEvent> {
|
|
180
180
|
return new Observable<BaseEvent>((observer) => {
|
|
181
|
-
|
|
181
|
+
// Finish each run at its terminal event, as a real agent does, while
|
|
182
|
+
// keeping the shared subject for the next run in a multi-turn test. A
|
|
183
|
+
// send waits for the run in flight, so a run that never ends would hold
|
|
184
|
+
// every later send.
|
|
185
|
+
const deliver = (event: BaseEvent) => {
|
|
186
|
+
observer.next(event);
|
|
187
|
+
const isTerminal =
|
|
188
|
+
event.type === EventType.RUN_FINISHED ||
|
|
189
|
+
event.type === EventType.RUN_ERROR;
|
|
190
|
+
if (isTerminal) observer.complete();
|
|
191
|
+
};
|
|
192
|
+
const subscription = this.subject.subscribe({
|
|
193
|
+
next: deliver,
|
|
194
|
+
error: (error: unknown) => observer.error(error),
|
|
195
|
+
complete: () => observer.complete(),
|
|
196
|
+
});
|
|
182
197
|
void this.enqueueDelivery(async () => {
|
|
183
198
|
if (this.bufferedEvents.length > 0) {
|
|
184
199
|
for (const event of this.bufferedEvents) {
|
|
185
|
-
|
|
200
|
+
deliver(event);
|
|
186
201
|
}
|
|
187
202
|
this.bufferedEvents = [];
|
|
188
203
|
}
|
|
@@ -386,11 +401,26 @@ export class MockReconnectableAgent extends AbstractAgent {
|
|
|
386
401
|
|
|
387
402
|
run(_input: RunAgentInput): Observable<BaseEvent> {
|
|
388
403
|
return new Observable<BaseEvent>((observer) => {
|
|
389
|
-
|
|
404
|
+
// Finish each run at its terminal event, as a real agent does, while
|
|
405
|
+
// keeping the shared subject for the next run in a multi-turn test. A
|
|
406
|
+
// send waits for the run in flight, so a run that never ends would hold
|
|
407
|
+
// every later send.
|
|
408
|
+
const deliver = (event: BaseEvent) => {
|
|
409
|
+
observer.next(event);
|
|
410
|
+
const isTerminal =
|
|
411
|
+
event.type === EventType.RUN_FINISHED ||
|
|
412
|
+
event.type === EventType.RUN_ERROR;
|
|
413
|
+
if (isTerminal) observer.complete();
|
|
414
|
+
};
|
|
415
|
+
const subscription = this.subject.subscribe({
|
|
416
|
+
next: deliver,
|
|
417
|
+
error: (error: unknown) => observer.error(error),
|
|
418
|
+
complete: () => observer.complete(),
|
|
419
|
+
});
|
|
390
420
|
void this.enqueueDelivery(async () => {
|
|
391
421
|
if (this.bufferedEvents.length > 0) {
|
|
392
422
|
for (const event of this.bufferedEvents) {
|
|
393
|
-
|
|
423
|
+
deliver(event);
|
|
394
424
|
}
|
|
395
425
|
this.bufferedEvents = [];
|
|
396
426
|
}
|