@copilotkit/vue 1.62.1 → 1.62.2-canary.1784333495
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 +70 -69
- package/dist/styles.css +1 -1
- package/dist/use-render-activity-message-CIvEoQzA.cjs +85 -0
- package/dist/use-render-activity-message-CIvEoQzA.cjs.map +1 -0
- package/dist/{use-render-activity-message-8_HyVZWc.js → use-render-activity-message-CbKeqosY.js} +3514 -3207
- package/dist/use-render-activity-message-CbKeqosY.js.map +1 -0
- package/dist/v2/components/chat/CopilotChat.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts +8 -0
- package/dist/v2/components/chat/CopilotChatAssistantMessage.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotModalHeader.vue.d.ts.map +1 -1
- package/dist/v2/components/chat/CopilotThreadsDrawer.vue.d.ts +65 -0
- package/dist/v2/components/chat/CopilotThreadsDrawer.vue.d.ts.map +1 -0
- package/dist/v2/components/chat/index.d.ts +1 -0
- package/dist/v2/components/chat/index.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/hooks/use-threads.d.ts +19 -0
- package/dist/v2/hooks/use-threads.d.ts.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +44 -43
- package/dist/v2/lib/is-mobile-viewport.d.ts +15 -0
- package/dist/v2/lib/is-mobile-viewport.d.ts.map +1 -0
- package/dist/v2/providers/CopilotChatConfigurationProvider.vue.d.ts.map +1 -1
- package/dist/v2/providers/types.d.ts +24 -0
- package/dist/v2/providers/types.d.ts.map +1 -1
- package/package.json +5 -4
- package/src/v2/components/chat/CopilotChat.vue +22 -4
- package/src/v2/components/chat/CopilotModalHeader.vue +61 -2
- package/src/v2/components/chat/CopilotThreadsDrawer.vue +335 -0
- package/src/v2/components/chat/__tests__/CopilotChat.clearOnFresh.test.ts +160 -0
- package/src/v2/components/chat/__tests__/CopilotModalHeader.drawerLauncher.test.ts +125 -0
- package/src/v2/components/chat/__tests__/CopilotThreadsDrawer.ssr.test.ts +25 -0
- package/src/v2/components/chat/__tests__/CopilotThreadsDrawer.test.ts +910 -0
- package/src/v2/components/chat/index.ts +1 -0
- package/src/v2/components/icons/index.ts +1 -0
- package/src/v2/hooks/__tests__/use-human-in-the-loop.e2e.test.ts +4 -4
- package/src/v2/hooks/__tests__/use-threads.test.ts +315 -6
- package/src/v2/hooks/use-threads.ts +148 -8
- package/src/v2/lib/__tests__/is-mobile-viewport.test.ts +48 -0
- package/src/v2/lib/is-mobile-viewport.ts +23 -0
- package/src/v2/providers/CopilotChatConfigurationProvider.vue +120 -4
- package/src/v2/providers/__tests__/CopilotChatConfigurationProvider.test.ts +105 -1
- package/src/v2/providers/types.ts +25 -0
- package/vite.config.ts +7 -0
- package/dist/use-render-activity-message-8_HyVZWc.js.map +0 -1
- package/dist/use-render-activity-message-BqgmNPCz.cjs +0 -85
- package/dist/use-render-activity-message-BqgmNPCz.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotChat.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChat.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotChat.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChat.vue"],"names":[],"mappings":"AAkzBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAiBnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,KAAK,EACV,yBAAyB,EACzB,gBAAgB,EAChB,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,SAAS,CAAC;AAcjB,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,gCAAgC,KAAK,OAAO,CAAC;IACnE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE;QACvB,QAAQ,EAAE,OAAO,EAAE,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;KACpB,KAAK,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,6BAA6B,KAAK,OAAO,CAAC;IAC9D,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,OAAO,CAAC;IACtD,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kCAAkC,KAAK,OAAO,CAAC;IAC3E,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,iCAAiC,KAAK,OAAO,CAAC;IACzE,iBAAiB,CAAC,EAAE,MAAM,OAAO,CAAC;IAElC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC;AA2yBF,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;6EAQnB,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"}
|
|
@@ -24,6 +24,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
24
24
|
role: "assistant";
|
|
25
25
|
id: string;
|
|
26
26
|
name?: string | undefined;
|
|
27
|
+
subagentId?: string | undefined;
|
|
27
28
|
content?: string | undefined;
|
|
28
29
|
encryptedValue?: string | undefined;
|
|
29
30
|
toolCalls?: {
|
|
@@ -40,6 +41,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
40
41
|
role: "assistant";
|
|
41
42
|
id: string;
|
|
42
43
|
name?: string | undefined;
|
|
44
|
+
subagentId?: string | undefined;
|
|
43
45
|
content?: string | undefined;
|
|
44
46
|
encryptedValue?: string | undefined;
|
|
45
47
|
toolCalls?: {
|
|
@@ -56,6 +58,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
56
58
|
role: "assistant";
|
|
57
59
|
id: string;
|
|
58
60
|
name?: string | undefined;
|
|
61
|
+
subagentId?: string | undefined;
|
|
59
62
|
content?: string | undefined;
|
|
60
63
|
encryptedValue?: string | undefined;
|
|
61
64
|
toolCalls?: {
|
|
@@ -72,6 +75,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
72
75
|
role: "assistant";
|
|
73
76
|
id: string;
|
|
74
77
|
name?: string | undefined;
|
|
78
|
+
subagentId?: string | undefined;
|
|
75
79
|
content?: string | undefined;
|
|
76
80
|
encryptedValue?: string | undefined;
|
|
77
81
|
toolCalls?: {
|
|
@@ -89,6 +93,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
89
93
|
role: "assistant";
|
|
90
94
|
id: string;
|
|
91
95
|
name?: string | undefined;
|
|
96
|
+
subagentId?: string | undefined;
|
|
92
97
|
content?: string | undefined;
|
|
93
98
|
encryptedValue?: string | undefined;
|
|
94
99
|
toolCalls?: {
|
|
@@ -105,6 +110,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
105
110
|
role: "assistant";
|
|
106
111
|
id: string;
|
|
107
112
|
name?: string | undefined;
|
|
113
|
+
subagentId?: string | undefined;
|
|
108
114
|
content?: string | undefined;
|
|
109
115
|
encryptedValue?: string | undefined;
|
|
110
116
|
toolCalls?: {
|
|
@@ -121,6 +127,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
121
127
|
role: "assistant";
|
|
122
128
|
id: string;
|
|
123
129
|
name?: string | undefined;
|
|
130
|
+
subagentId?: string | undefined;
|
|
124
131
|
content?: string | undefined;
|
|
125
132
|
encryptedValue?: string | undefined;
|
|
126
133
|
toolCalls?: {
|
|
@@ -137,6 +144,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}
|
|
|
137
144
|
role: "assistant";
|
|
138
145
|
id: string;
|
|
139
146
|
name?: string | undefined;
|
|
147
|
+
subagentId?: string | undefined;
|
|
140
148
|
content?: string | undefined;
|
|
141
149
|
encryptedValue?: string | undefined;
|
|
142
150
|
toolCalls?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopilotChatAssistantMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatAssistantMessage.vue"],"names":[],"mappings":"AAs4BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAc7D,OAAO,KAAK,EACV,8CAA8C,EAC9C,0CAA0C,EAC1C,mDAAmD,EACnD,mDAAmD,EACnD,oDAAoD,EACpD,oDAAoD,EACpD,kDAAkD,EAClD,iDAAiD,EACjD,2CAA2C,EAC5C,MAAM,SAAS,CAAC;AAKjB,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAUJ,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,0CAA0C,KAAK,OAAO,CAAC;IACxE,kBAAkB,CAAC,EAAE,CACnB,KAAK,EAAE,mDAAmD,KACvD,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,2CAA2C,KAAK,OAAO,CAAC;IAC1E,aAAa,CAAC,EAAE,CACd,KAAK,EAAE,8CAA8C,KAClD,OAAO,CAAC;IACb,kBAAkB,CAAC,EAAE,CACnB,KAAK,EAAE,kDAAkD,KACtD,OAAO,CAAC;IACb,oBAAoB,CAAC,EAAE,CACrB,KAAK,EAAE,oDAAoD,KACxD,OAAO,CAAC;IACb,mBAAmB,CAAC,EAAE,CACpB,KAAK,EAAE,mDAAmD,KACvD,OAAO,CAAC;IACb,mBAAmB,CAAC,EAAE,CACpB,KAAK,EAAE,oDAAoD,KACxD,OAAO,CAAC;IACb,iBAAiB,CAAC,EAAE,CAClB,KAAK,EAAE,iDAAiD,KACrD,OAAO,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC;AA07BF,QAAA,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"CopilotChatAssistantMessage.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotChatAssistantMessage.vue"],"names":[],"mappings":"AAs4BA,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAc7D,OAAO,KAAK,EACV,8CAA8C,EAC9C,0CAA0C,EAC1C,mDAAmD,EACnD,mDAAmD,EACnD,oDAAoD,EACpD,oDAAoD,EACpD,kDAAkD,EAClD,iDAAiD,EACjD,2CAA2C,EAC5C,MAAM,SAAS,CAAC;AAKjB,KAAK,WAAW,GAAG;IACf,OAAO,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAUJ,KAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,0CAA0C,KAAK,OAAO,CAAC;IACxE,kBAAkB,CAAC,EAAE,CACnB,KAAK,EAAE,mDAAmD,KACvD,OAAO,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,K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Header.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotModalHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CopilotModalHeader.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotModalHeader.vue"],"names":[],"mappings":"AA6IA,OAAO,KAAK,EACV,sCAAsC,EACtC,iCAAiC,EACjC,uBAAuB,EACvB,uCAAuC,EACxC,MAAM,SAAS,CAAC;AAOjB,KAAK,WAAW,GAAG;IACjB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,uCAAuC,KAAK,OAAO,CAAC;IAC9E,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,sCAAsC,KAAK,OAAO,CAAC;IAC5E,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,iCAAiC,KAAK,OAAO,CAAC;CAChE,CAAC;AAsNF,QAAA,MAAM,eAAe,0TAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Thread } from "../../hooks/use-threads";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
agentId?: string;
|
|
4
|
+
onThreadSelect?: (threadId: string) => void;
|
|
5
|
+
onNewThread?: () => void;
|
|
6
|
+
onLicensed?: () => void;
|
|
7
|
+
licenseUrl?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Heading rendered above the thread list (element attribute
|
|
11
|
+
* `recent-label`). Defaults to the element's own `"Recent Conversations"`
|
|
12
|
+
* when omitted.
|
|
13
|
+
*/
|
|
14
|
+
recentLabel?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the drawer offers a collapse toggle. Bound to the element's
|
|
17
|
+
* `collapsible` PROPERTY. When `false`, the drawer has no collapse toggle
|
|
18
|
+
* and is always expanded. Defaults to `true`.
|
|
19
|
+
*
|
|
20
|
+
* NOTE: this MUST carry an explicit `true` default below. Vue coerces an
|
|
21
|
+
* omitted `Boolean` prop to `false` (not `undefined`), so without the
|
|
22
|
+
* default the `!== undefined` guard would always fire and force the element
|
|
23
|
+
* to `collapsible=false` — silently disabling collapse. Defaulting to `true`
|
|
24
|
+
* restores the element's own default when the prop is omitted.
|
|
25
|
+
*/
|
|
26
|
+
collapsible?: boolean;
|
|
27
|
+
limit?: number;
|
|
28
|
+
dataTestId?: string;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_Slots = {
|
|
31
|
+
default(): unknown;
|
|
32
|
+
/**
|
|
33
|
+
* Optional per-row content. When provided, this slot is rendered as
|
|
34
|
+
* light-DOM children with `slot="row:{id}"` for EVERY thread in the list,
|
|
35
|
+
* so the element projects it in place of the default row for all rows.
|
|
36
|
+
*
|
|
37
|
+
* Unlike React's `renderRow` (which returns `ReactNode | null` and can
|
|
38
|
+
* fall back to the element's built-in row on a per-thread basis by
|
|
39
|
+
* returning `null`), Vue's scoped slot is all-or-nothing: there is no
|
|
40
|
+
* per-row escape hatch back to the element default once the slot is
|
|
41
|
+
* defined. This is an intentional Vue-idiom divergence, not a bug — if a
|
|
42
|
+
* consumer needs per-row fallback, they should replicate the default row
|
|
43
|
+
* markup themselves inside the slot for the threads they don't want to
|
|
44
|
+
* customize.
|
|
45
|
+
*/
|
|
46
|
+
row(props: {
|
|
47
|
+
thread: Thread;
|
|
48
|
+
}): unknown;
|
|
49
|
+
};
|
|
50
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
51
|
+
"collapse-change": (collapsed: boolean) => any;
|
|
52
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
53
|
+
"onCollapse-change"?: ((collapsed: boolean) => any) | undefined;
|
|
54
|
+
}>, {
|
|
55
|
+
collapsible: boolean;
|
|
56
|
+
dataTestId: string;
|
|
57
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
58
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
59
|
+
export default _default;
|
|
60
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
61
|
+
new (): {
|
|
62
|
+
$slots: S;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=CopilotThreadsDrawer.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopilotThreadsDrawer.vue.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/CopilotThreadsDrawer.vue"],"names":[],"mappings":"AA0WA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD,KAAK,WAAW,GAAG;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAgOJ,KAAK,WAAW,GAAG;IACjB,OAAO,IAAI,OAAO,CAAC;IACnB;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;CACzC,CAAC;AAgIF,QAAA,MAAM,eAAe;;;;;iBApXH,OAAO;gBAER,MAAM;6EA0XrB,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"}
|
|
@@ -11,6 +11,7 @@ export { default as CopilotChatSuggestionView } from "./CopilotChatSuggestionVie
|
|
|
11
11
|
export { default as CopilotChatToolCallsView } from "./CopilotChatToolCallsView.vue";
|
|
12
12
|
export { default as CopilotChatUserMessage } from "./CopilotChatUserMessage.vue";
|
|
13
13
|
export { default as CopilotChatView } from "./CopilotChatView.vue";
|
|
14
|
+
export { default as CopilotThreadsDrawer } from "./CopilotThreadsDrawer.vue";
|
|
14
15
|
import CopilotChatToggleButtonCloseIcon from "./CopilotChatToggleButtonCloseIcon";
|
|
15
16
|
import CopilotChatToggleButtonOpenIcon from "./CopilotChatToggleButtonOpenIcon";
|
|
16
17
|
export declare const CopilotChat: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/components/chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAGrF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE7B,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, 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, } from "lucide-vue-next";
|
|
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,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,
|
|
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"}
|
|
@@ -18,16 +18,35 @@ export interface UseThreadsInput {
|
|
|
18
18
|
agentId: MaybeRefOrGetter<string>;
|
|
19
19
|
includeArchived?: MaybeRefOrGetter<boolean | undefined>;
|
|
20
20
|
limit?: MaybeRefOrGetter<number | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* When `false`, the hook clears the store context and issues no `/threads`
|
|
23
|
+
* request — used by the drawer to skip fetching while unlicensed. Defaults
|
|
24
|
+
* to `true`.
|
|
25
|
+
*/
|
|
26
|
+
enabled?: MaybeRefOrGetter<boolean | undefined>;
|
|
21
27
|
}
|
|
22
28
|
export interface UseThreadsResult {
|
|
23
29
|
threads: Ref<Thread[]>;
|
|
24
30
|
isLoading: Ref<boolean>;
|
|
25
31
|
error: Ref<Error | null>;
|
|
32
|
+
/** Genuine list-load/mutation errors only — excludes dev/config errors. */
|
|
33
|
+
listError: Ref<Error | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Error from the most recent FAILED next-page (fetch-more) load, or `null`.
|
|
36
|
+
* Tracked separately from {@link listError} so a paginated-load failure
|
|
37
|
+
* shows an inline "couldn't load more" affordance while the loaded list
|
|
38
|
+
* stays visible. Cleared when a fetch-more is retried or succeeds.
|
|
39
|
+
*/
|
|
40
|
+
fetchMoreError: Ref<Error | null>;
|
|
26
41
|
hasMoreThreads: Ref<boolean>;
|
|
27
42
|
isFetchingMoreThreads: Ref<boolean>;
|
|
43
|
+
isMutating: Ref<boolean>;
|
|
28
44
|
fetchMoreThreads: () => void;
|
|
45
|
+
refetchThreads: () => void;
|
|
46
|
+
startNewThread: () => void;
|
|
29
47
|
renameThread: (threadId: string, name: string) => Promise<void>;
|
|
30
48
|
archiveThread: (threadId: string) => Promise<void>;
|
|
49
|
+
unarchiveThread: (threadId: string) => Promise<void>;
|
|
31
50
|
deleteThread: (threadId: string) => Promise<void>;
|
|
32
51
|
}
|
|
33
52
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-threads.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-threads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"use-threads.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/use-threads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAejD,MAAM,WAAW,MA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,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD;AAcD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAkQnE"}
|
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-CIvEoQzA.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,7 +1,7 @@
|
|
|
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
|
|
4
|
-
import { createLicenseContextValue as
|
|
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-CbKeqosY.js";
|
|
4
|
+
import { createLicenseContextValue as ye } from "@copilotkit/shared";
|
|
5
5
|
export {
|
|
6
6
|
o as A2UIActivityContentSchema,
|
|
7
7
|
i as A2UISurfaceActivityRenderer,
|
|
@@ -30,47 +30,48 @@ export {
|
|
|
30
30
|
P as CopilotModalHeader,
|
|
31
31
|
b as CopilotPopup,
|
|
32
32
|
V as CopilotPopupView,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
G as
|
|
37
|
-
L as
|
|
38
|
-
B as
|
|
33
|
+
w as CopilotSidebar,
|
|
34
|
+
K as CopilotSidebarView,
|
|
35
|
+
O as CopilotThreadsDrawer,
|
|
36
|
+
G as GenerateSandboxedUiArgsSchema,
|
|
37
|
+
L as LicenseContextKey,
|
|
38
|
+
B as MCPAppsActivityContentSchema,
|
|
39
|
+
D as MCPAppsActivityRenderer,
|
|
39
40
|
H as MCPAppsActivityType,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
41
|
+
F as OpenGenerativeUIActivityRenderer,
|
|
42
|
+
Q as OpenGenerativeUIActivityType,
|
|
43
|
+
j as OpenGenerativeUIContentSchema,
|
|
44
|
+
k as OpenGenerativeUIRenderer,
|
|
45
|
+
q as OpenGenerativeUIToolRenderer,
|
|
46
|
+
z as UseAgentUpdate,
|
|
47
|
+
E as createA2UIMessageRenderer,
|
|
48
|
+
J as createDefaultLicenseRef,
|
|
49
|
+
ye as createLicenseContextValue,
|
|
50
|
+
N as defineToolCallRenderer,
|
|
51
|
+
W as extractCompleteStyles,
|
|
52
|
+
X as getOperationSurfaceId,
|
|
53
|
+
Y as processPartialHtml,
|
|
54
|
+
Z as useAgent,
|
|
55
|
+
_ as useAgentContext,
|
|
56
|
+
$ as useAttachments,
|
|
57
|
+
ee as useCapabilities,
|
|
58
|
+
ae as useComponent,
|
|
59
|
+
te as useConfigureSuggestions,
|
|
60
|
+
se as useCopilotChatConfiguration,
|
|
61
|
+
oe as useCopilotKit,
|
|
62
|
+
ie as useDefaultRenderTool,
|
|
63
|
+
ne as useFrontendTool,
|
|
64
|
+
Ce as useHumanInTheLoop,
|
|
65
|
+
re as useInterrupt,
|
|
66
|
+
pe as useKatexStyles,
|
|
67
|
+
le as useKeyboardHeight,
|
|
68
|
+
ue as useLicenseContext,
|
|
69
|
+
ce as useRenderActivityMessage,
|
|
70
|
+
ge as useRenderCustomMessages,
|
|
71
|
+
de as useRenderTool,
|
|
72
|
+
he as useSandboxFunctions,
|
|
73
|
+
Ae as useSuggestions,
|
|
74
|
+
ve as useThreads,
|
|
75
|
+
Se as vueBasicCatalog
|
|
75
76
|
};
|
|
76
77
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media query for the mobile breakpoint, shared so the string literal isn't
|
|
3
|
+
* duplicated across call sites within this package (e.g. `CopilotModalHeader`,
|
|
4
|
+
* which needs a live `matchMedia` change-listener and so can't call
|
|
5
|
+
* `isMobileViewport()` directly).
|
|
6
|
+
*/
|
|
7
|
+
export declare const MOBILE_MAX_WIDTH_QUERY = "(max-width: 767px)";
|
|
8
|
+
/**
|
|
9
|
+
* Reports whether the viewport is in the mobile range (`<768px`), where the
|
|
10
|
+
* drawer and chat modal are mutually exclusive. SSR-safe (returns `false`
|
|
11
|
+
* when `window` is absent) and guards environments where `window` exists but
|
|
12
|
+
* `window.matchMedia` does not (some test runners, embedded webviews).
|
|
13
|
+
*/
|
|
14
|
+
export declare function isMobileViewport(): boolean;
|
|
15
|
+
//# sourceMappingURL=is-mobile-viewport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-mobile-viewport.d.ts","sourceRoot":"","sources":["../../../src/v2/lib/is-mobile-viewport.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,uBAAuB,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAQ1C"}
|
|
@@ -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":"AAyNA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AAsNtG,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"}
|
|
@@ -34,5 +34,29 @@ export interface CopilotChatConfigurationValue {
|
|
|
34
34
|
hasExplicitThreadId: boolean;
|
|
35
35
|
isModalOpen?: boolean;
|
|
36
36
|
setModalOpen?: (open: boolean) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Switches the active thread to `threadId`. `explicit` (default `true`)
|
|
39
|
+
* marks it a caller-driven choice so the welcome screen is suppressed.
|
|
40
|
+
* No-op when the provider's `threadId` prop is caller-authoritative.
|
|
41
|
+
*/
|
|
42
|
+
setActiveThreadId: (threadId: string, options?: {
|
|
43
|
+
explicit?: boolean;
|
|
44
|
+
}) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Switches to a freshly-minted, non-explicit thread (welcome screen shows).
|
|
47
|
+
* No-op when the provider's `threadId` prop is caller-authoritative.
|
|
48
|
+
*/
|
|
49
|
+
startNewThread: () => void;
|
|
50
|
+
/** Whether the mobile off-canvas drawer overlay is open. */
|
|
51
|
+
drawerOpen: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Toggles the drawer. On mobile (`<=767px`) opening the drawer closes the
|
|
54
|
+
* chat modal (mutual-exclusion). Desktop imposes no constraint.
|
|
55
|
+
*/
|
|
56
|
+
setDrawerOpen: (open: boolean) => void;
|
|
57
|
+
/** True when at least one drawer has registered (gates the header launcher). */
|
|
58
|
+
drawerRegistered: boolean;
|
|
59
|
+
/** Announces drawer presence; returns a cleanup that de-registers it. */
|
|
60
|
+
registerDrawer: () => () => void;
|
|
37
61
|
}
|
|
38
62
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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.62.
|
|
3
|
+
"version": "1.62.2-canary.1784333495",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Vue 3 components and composables for CopilotKit",
|
|
6
6
|
"keywords": [
|
|
@@ -70,9 +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.62.
|
|
74
|
-
"@copilotkit/shared": "1.62.
|
|
75
|
-
"@copilotkit/web-
|
|
73
|
+
"@copilotkit/core": "1.62.2-canary.1784333495",
|
|
74
|
+
"@copilotkit/shared": "1.62.2-canary.1784333495",
|
|
75
|
+
"@copilotkit/web-components": "1.62.2-canary.1784333495",
|
|
76
|
+
"@copilotkit/web-inspector": "1.62.2-canary.1784333495"
|
|
76
77
|
},
|
|
77
78
|
"devDependencies": {
|
|
78
79
|
"@eslint/js": "^9.39.2",
|
|
@@ -35,10 +35,8 @@ import {
|
|
|
35
35
|
TranscriptionError,
|
|
36
36
|
} from "../../lib/transcription-client";
|
|
37
37
|
import CopilotChatView from "./CopilotChatView.vue";
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
type LastUserMessageState,
|
|
41
|
-
} from "./last-user-message-context";
|
|
38
|
+
import { LastUserMessageKey } from "./last-user-message-context";
|
|
39
|
+
import type { LastUserMessageState } from "./last-user-message-context";
|
|
42
40
|
import type { Message } from "@ag-ui/core";
|
|
43
41
|
import type { InputContent } from "@copilotkit/shared";
|
|
44
42
|
import type {
|
|
@@ -425,6 +423,26 @@ watch(
|
|
|
425
423
|
{ immediate: true },
|
|
426
424
|
);
|
|
427
425
|
|
|
426
|
+
// Clear stale messages when the active thread switches to a fresh,
|
|
427
|
+
// non-explicit thread (e.g. a "+ New" reset). Explicit thread switches
|
|
428
|
+
// replay their history via the /connect cycle above, and the very first
|
|
429
|
+
// resolution (mount) or an agent-store swap that keeps the same thread id
|
|
430
|
+
// must never clear — only a real fresh-thread transition does.
|
|
431
|
+
const lastFreshThreadId = ref<string | undefined>(undefined);
|
|
432
|
+
watch(
|
|
433
|
+
[resolvedThreadId, hasExplicitThreadId, () => agent.value],
|
|
434
|
+
([threadId, isExplicit, currentAgent]) => {
|
|
435
|
+
const previous = lastFreshThreadId.value;
|
|
436
|
+
lastFreshThreadId.value = threadId;
|
|
437
|
+
if (!currentAgent) return;
|
|
438
|
+
if (isExplicit) return;
|
|
439
|
+
if (previous === undefined) return;
|
|
440
|
+
if (threadId === previous) return;
|
|
441
|
+
currentAgent.setMessages([]);
|
|
442
|
+
},
|
|
443
|
+
{ immediate: true },
|
|
444
|
+
);
|
|
445
|
+
|
|
428
446
|
onBeforeUnmount(() => {
|
|
429
447
|
isUnmounting.value = true;
|
|
430
448
|
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { computed, useAttrs } from "vue";
|
|
2
|
+
import { computed, onBeforeUnmount, onMounted, ref, useAttrs } from "vue";
|
|
3
3
|
import { useCopilotChatConfiguration } from "../../providers/useCopilotChatConfiguration";
|
|
4
4
|
import { CopilotChatDefaultLabels } from "../../providers/types";
|
|
5
|
+
import { MOBILE_MAX_WIDTH_QUERY } from "../../lib/is-mobile-viewport";
|
|
5
6
|
import CopilotModalHeaderCloseButton from "./CopilotModalHeaderCloseButton";
|
|
6
7
|
import CopilotModalHeaderTitle from "./CopilotModalHeaderTitle";
|
|
8
|
+
import { IconPanelLeftOpen } from "../icons";
|
|
7
9
|
import type {
|
|
8
10
|
CopilotModalHeaderCloseButtonSlotProps,
|
|
9
11
|
CopilotModalHeaderLayoutSlotProps,
|
|
@@ -43,6 +45,50 @@ const headerAttrs = computed(() => {
|
|
|
43
45
|
function handleClose() {
|
|
44
46
|
config.value?.setModalOpen?.(false);
|
|
45
47
|
}
|
|
48
|
+
|
|
49
|
+
// Tracks whether the viewport is in the mobile range (MOBILE_MAX_WIDTH_QUERY) — the same
|
|
50
|
+
// breakpoint the drawer + chat coordination use. SSR-safe: starts `false`
|
|
51
|
+
// (desktop) so the server render and first client render agree, then syncs
|
|
52
|
+
// on mount and on viewport changes.
|
|
53
|
+
const isMobile = ref(false);
|
|
54
|
+
let mobileMediaQuery: MediaQueryList | null = null;
|
|
55
|
+
|
|
56
|
+
function syncIsMobile() {
|
|
57
|
+
if (mobileMediaQuery) {
|
|
58
|
+
isMobile.value = mobileMediaQuery.matches;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
onMounted(() => {
|
|
63
|
+
if (
|
|
64
|
+
typeof window === "undefined" ||
|
|
65
|
+
typeof window.matchMedia !== "function"
|
|
66
|
+
) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
mobileMediaQuery = window.matchMedia(MOBILE_MAX_WIDTH_QUERY);
|
|
70
|
+
mobileMediaQuery.addEventListener("change", syncIsMobile);
|
|
71
|
+
syncIsMobile();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
onBeforeUnmount(() => {
|
|
75
|
+
mobileMediaQuery?.removeEventListener("change", syncIsMobile);
|
|
76
|
+
mobileMediaQuery = null;
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// The thread-list launcher renders ONLY when a <CopilotThreadsDrawer> wrapper
|
|
80
|
+
// has registered with the chat configuration AND the viewport is mobile. On
|
|
81
|
+
// desktop the drawer is an in-flow, persistent panel (it ignores `open`), so
|
|
82
|
+
// an "open the drawer" launcher there is a dead no-op — it only does
|
|
83
|
+
// anything for the mobile off-canvas drawer. Chats with no drawer get no
|
|
84
|
+
// launcher and no behavior change.
|
|
85
|
+
const showDrawerLauncher = computed(
|
|
86
|
+
() => (config.value?.drawerRegistered ?? false) && isMobile.value,
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
function toggleDrawer() {
|
|
90
|
+
config.value?.setDrawerOpen?.(!config.value?.drawerOpen);
|
|
91
|
+
}
|
|
46
92
|
</script>
|
|
47
93
|
|
|
48
94
|
<template>
|
|
@@ -54,7 +100,20 @@ function handleClose() {
|
|
|
54
100
|
>
|
|
55
101
|
<slot name="layout" :title="resolvedTitle" :on-close="handleClose">
|
|
56
102
|
<div class="cpk:flex cpk:w-full cpk:items-center cpk:gap-2">
|
|
57
|
-
<div class="cpk:flex cpk:flex-1
|
|
103
|
+
<div class="cpk:flex cpk:flex-1 cpk:justify-start">
|
|
104
|
+
<button
|
|
105
|
+
v-if="showDrawerLauncher"
|
|
106
|
+
type="button"
|
|
107
|
+
data-testid="drawer-launcher"
|
|
108
|
+
class="cpk:inline-flex cpk:size-8 cpk:items-center cpk:justify-center cpk:rounded-full cpk:text-muted-foreground cpk:transition cpk:cursor-pointer cpk:hover:bg-muted cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring"
|
|
109
|
+
:aria-expanded="config?.drawerOpen ?? false"
|
|
110
|
+
aria-label="Open threads"
|
|
111
|
+
@click="toggleDrawer"
|
|
112
|
+
>
|
|
113
|
+
<IconPanelLeftOpen class="cpk:h-4 cpk:w-4" aria-hidden="true" />
|
|
114
|
+
</button>
|
|
115
|
+
<span v-else aria-hidden="true" />
|
|
116
|
+
</div>
|
|
58
117
|
<div class="cpk:flex cpk:flex-1 cpk:justify-center cpk:text-center">
|
|
59
118
|
<slot name="title-content" :title="resolvedTitle">
|
|
60
119
|
<CopilotModalHeaderTitle>
|