@copilotkit/react-core 0.25.0-mme-cloud.3 → 0.25.0-mme-cloud.5
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/.turbo/turbo-build.log +152 -145
- package/CHANGELOG.md +42 -10
- package/dist/{chunk-MESZST5T.mjs → chunk-4NNFSZOY.mjs} +11 -1
- package/dist/chunk-4NNFSZOY.mjs.map +1 -0
- package/dist/{chunk-UNYZRMB2.mjs → chunk-5ZD5AKJF.mjs} +5 -5
- package/dist/chunk-5ZD5AKJF.mjs.map +1 -0
- package/dist/{chunk-IR5I4Q6R.mjs → chunk-72BJ3A3S.mjs} +1 -1
- package/dist/chunk-72BJ3A3S.mjs.map +1 -0
- package/dist/chunk-EYKDJBDE.mjs +1 -0
- package/dist/{chunk-NQKBX6UJ.mjs → chunk-KTUNGBJF.mjs} +1 -1
- package/dist/chunk-KTUNGBJF.mjs.map +1 -0
- package/dist/{chunk-SFV4PSJM.mjs → chunk-RFITGPPJ.mjs} +3 -3
- package/dist/{chunk-DW3HRHJB.mjs → chunk-UZXKJ4IE.mjs} +2 -2
- package/dist/chunk-ZIR7KCEA.mjs +28 -0
- package/dist/chunk-ZIR7KCEA.mjs.map +1 -0
- package/dist/{chunk-VYD7RO32.mjs → chunk-ZYQT5647.mjs} +2 -2
- package/dist/chunk-ZYQT5647.mjs.map +1 -0
- package/dist/components/copilot-provider/copilotkit-props.d.ts +6 -2
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.d.ts +1 -1
- package/dist/components/copilot-provider/copilotkit.js +1 -1
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +1 -1
- package/dist/components/copilot-provider/index.js +1 -1
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +32 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +10 -6
- package/dist/hooks/use-chat.js +10 -0
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +1 -1
- package/dist/hooks/use-copilot-action.js.map +1 -1
- package/dist/hooks/use-copilot-action.mjs +1 -1
- package/dist/hooks/use-copilot-chat.js +10 -0
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +3 -3
- package/dist/hooks/use-copilot-readable.d.ts +33 -0
- package/dist/hooks/use-copilot-readable.js +123 -0
- package/dist/hooks/use-copilot-readable.js.map +1 -0
- package/dist/hooks/use-copilot-readable.mjs +9 -0
- package/dist/hooks/use-copilot-readable.mjs.map +1 -0
- package/dist/hooks/use-make-copilot-readable.d.ts +1 -5
- package/dist/hooks/use-make-copilot-readable.js.map +1 -1
- package/dist/hooks/use-make-copilot-readable.mjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +44 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -12
- package/dist/lib/copilot-task.d.ts +7 -2
- package/dist/lib/copilot-task.js +3 -3
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +2 -2
- package/dist/lib/index.js +3 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +2 -2
- package/dist/openai-assistants/hooks/index.js.map +1 -1
- package/dist/openai-assistants/hooks/index.mjs +2 -2
- package/dist/openai-assistants/hooks/use-copilot-chat-v2.js.map +1 -1
- package/dist/openai-assistants/hooks/use-copilot-chat-v2.mjs +2 -2
- package/dist/openai-assistants/index.js.map +1 -1
- package/dist/openai-assistants/index.mjs +2 -2
- package/package.json +4 -4
- package/src/components/copilot-provider/copilotkit-props.tsx +7 -2
- package/src/components/copilot-provider/copilotkit.tsx +2 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-chat.ts +10 -0
- package/src/hooks/use-copilot-action.ts +2 -2
- package/src/hooks/use-copilot-readable.ts +60 -0
- package/src/hooks/use-make-copilot-readable.ts +1 -5
- package/src/lib/copilot-task.ts +12 -5
- package/dist/chunk-IOP6JX34.mjs +0 -1
- package/dist/chunk-IR5I4Q6R.mjs.map +0 -1
- package/dist/chunk-MESZST5T.mjs.map +0 -1
- package/dist/chunk-NQKBX6UJ.mjs.map +0 -1
- package/dist/chunk-UNYZRMB2.mjs.map +0 -1
- package/dist/chunk-VYD7RO32.mjs.map +0 -1
- /package/dist/{chunk-IOP6JX34.mjs.map → chunk-EYKDJBDE.mjs.map} +0 -0
- /package/dist/{chunk-SFV4PSJM.mjs.map → chunk-RFITGPPJ.mjs.map} +0 -0
- /package/dist/{chunk-DW3HRHJB.mjs.map → chunk-UZXKJ4IE.mjs.map} +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @copilotkit/react-core@0.25.0-mme-cloud.
|
|
2
|
+
> @copilotkit/react-core@0.25.0-mme-cloud.5 build /home/runner/work/CopilotKit/CopilotKit/CopilotKit/packages/react-core
|
|
3
3
|
> tsup --clean
|
|
4
4
|
|
|
5
|
-
[34mCLI[39m Building entry: src/index.tsx, src/components/index.ts, src/context/copilot-context.tsx, src/context/index.ts, src/hooks/index.ts, src/hooks/use-chat.ts, src/hooks/use-copilot-action.ts, src/hooks/use-copilot-chat.ts, src/hooks/use-flat-category-store.ts, src/hooks/use-make-copilot-actionable.ts, src/hooks/use-make-copilot-document-readable.ts, src/hooks/use-make-copilot-readable.ts, src/hooks/use-tree.ts, src/lib/copilot-task.ts, src/lib/index.ts, src/openai-assistants/index.ts, src/types/document-pointer.ts, src/types/frontend-action.ts, src/types/index.ts, src/types/system-message.ts, src/utils/fetch-chat-completion.ts, src/utils/utils.test.ts, src/utils/utils.ts, src/components/copilot-provider/copilotkit-props.tsx, src/components/copilot-provider/copilotkit.tsx, src/components/copilot-provider/index.ts, src/openai-assistants/hooks/index.ts, src/openai-assistants/hooks/use-assistants.ts, src/openai-assistants/hooks/use-copilot-chat-v2.ts, src/openai-assistants/utils/index.ts, src/openai-assistants/utils/process-message-stream.ts
|
|
5
|
+
[34mCLI[39m Building entry: src/index.tsx, src/components/index.ts, src/context/copilot-context.tsx, src/context/index.ts, src/hooks/index.ts, src/hooks/use-chat.ts, src/hooks/use-copilot-action.ts, src/hooks/use-copilot-chat.ts, src/hooks/use-copilot-readable.ts, src/hooks/use-flat-category-store.ts, src/hooks/use-make-copilot-actionable.ts, src/hooks/use-make-copilot-document-readable.ts, src/hooks/use-make-copilot-readable.ts, src/hooks/use-tree.ts, src/lib/copilot-task.ts, src/lib/index.ts, src/openai-assistants/index.ts, src/types/document-pointer.ts, src/types/frontend-action.ts, src/types/index.ts, src/types/system-message.ts, src/utils/fetch-chat-completion.ts, src/utils/utils.test.ts, src/utils/utils.ts, src/components/copilot-provider/copilotkit-props.tsx, src/components/copilot-provider/copilotkit.tsx, src/components/copilot-provider/index.ts, src/openai-assistants/hooks/index.ts, src/openai-assistants/hooks/use-assistants.ts, src/openai-assistants/hooks/use-copilot-chat-v2.ts, src/openai-assistants/utils/index.ts, src/openai-assistants/utils/process-message-stream.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v6.7.0
|
|
8
8
|
[34mCLI[39m Using tsup config: /home/runner/work/CopilotKit/CopilotKit/CopilotKit/packages/react-core/tsup.config.ts
|
|
@@ -10,203 +10,210 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[32mCJS[39m [1mdist/lib/copilot-task.js [22m[32m7.45 KB[39m
|
|
18
|
-
[32mCJS[39m [1mdist/openai-assistants/index.js [22m[32m9.41 KB[39m
|
|
19
|
-
[32mCJS[39m [1mdist/types/document-pointer.js [22m[32m841.00 B[39m
|
|
20
|
-
[32mCJS[39m [1mdist/utils/fetch-chat-completion.js [22m[32m5.03 KB[39m
|
|
21
|
-
[32mCJS[39m [1mdist/components/copilot-provider/copilotkit-props.js [22m[32m864.00 B[39m
|
|
22
|
-
[32mCJS[39m [1mdist/openai-assistants/hooks/index.js [22m[32m9.31 KB[39m
|
|
23
|
-
[32mCJS[39m [1mdist/openai-assistants/utils/index.js [22m[32m2.30 KB[39m
|
|
24
|
-
[32mCJS[39m [1mdist/context/index.js [22m[32m3.70 KB[39m
|
|
25
|
-
[32mCJS[39m [1mdist/hooks/use-chat.js [22m[32m11.51 KB[39m
|
|
26
|
-
[32mCJS[39m [1mdist/hooks/use-copilot-action.js [22m[32m5.00 KB[39m
|
|
27
|
-
[32mCJS[39m [1mdist/hooks/use-copilot-chat.js [22m[32m16.36 KB[39m
|
|
28
|
-
[32mCJS[39m [1mdist/hooks/use-flat-category-store.js [22m[32m2.87 KB[39m
|
|
29
|
-
[32mCJS[39m [1mdist/hooks/use-make-copilot-actionable.js [22m[32m4.68 KB[39m
|
|
30
|
-
[32mCJS[39m [1mdist/hooks/use-make-copilot-document-readable.js [22m[32m4.31 KB[39m
|
|
31
|
-
[32mCJS[39m [1mdist/hooks/use-make-copilot-readable.js [22m[32m4.19 KB[39m
|
|
32
|
-
[32mCJS[39m [1mdist/hooks/use-tree.js [22m[32m5.53 KB[39m
|
|
33
|
-
[32mCJS[39m [1mdist/lib/index.js [22m[32m7.41 KB[39m
|
|
34
|
-
[32mCJS[39m [1mdist/types/frontend-action.js [22m[32m837.00 B[39m
|
|
35
|
-
[32mCJS[39m [1mdist/types/index.js [22m[32m797.00 B[39m
|
|
36
|
-
[32mCJS[39m [1mdist/types/system-message.js [22m[32m833.00 B[39m
|
|
37
|
-
[32mCJS[39m [1mdist/utils/utils.test.js [22m[32m184.00 B[39m
|
|
38
|
-
[32mCJS[39m [1mdist/utils/utils.js [22m[32m797.00 B[39m
|
|
39
|
-
[32mCJS[39m [1mdist/components/copilot-provider/copilotkit.js [22m[32m15.85 KB[39m
|
|
40
|
-
[32mCJS[39m [1mdist/components/copilot-provider/index.js [22m[32m15.91 KB[39m
|
|
41
|
-
[32mCJS[39m [1mdist/openai-assistants/hooks/use-assistants.js [22m[32m4.81 KB[39m
|
|
42
|
-
[32mCJS[39m [1mdist/openai-assistants/hooks/use-copilot-chat-v2.js [22m[32m9.40 KB[39m
|
|
43
|
-
[32mCJS[39m [1mdist/openai-assistants/utils/process-message-stream.js [22m[32m2.33 KB[39m
|
|
44
|
-
[32mCJS[39m [1mdist/index.js.map [22m[32m75.09 KB[39m
|
|
45
|
-
[32mCJS[39m [1mdist/components/index.js.map [22m[32m28.00 KB[39m
|
|
46
|
-
[32mCJS[39m [1mdist/context/copilot-context.js.map [22m[32m5.39 KB[39m
|
|
47
|
-
[32mCJS[39m [1mdist/hooks/index.js.map [22m[32m44.93 KB[39m
|
|
48
|
-
[32mCJS[39m [1mdist/lib/copilot-task.js.map [22m[32m17.28 KB[39m
|
|
49
|
-
[32mCJS[39m [1mdist/openai-assistants/index.js.map [22m[32m21.64 KB[39m
|
|
50
|
-
[32mCJS[39m [1mdist/types/document-pointer.js.map [22m[32m292.00 B[39m
|
|
51
|
-
[32mCJS[39m [1mdist/utils/fetch-chat-completion.js.map [22m[32m4.90 KB[39m
|
|
52
|
-
[32mCJS[39m [1mdist/components/copilot-provider/copilotkit-props.js.map [22m[32m1.34 KB[39m
|
|
53
|
-
[32mCJS[39m [1mdist/openai-assistants/hooks/index.js.map [22m[32m21.94 KB[39m
|
|
54
|
-
[32mCJS[39m [1mdist/openai-assistants/utils/index.js.map [22m[32m1.44 KB[39m
|
|
55
|
-
[32mCJS[39m [1mdist/context/index.js.map [22m[32m5.62 KB[39m
|
|
56
|
-
[32mCJS[39m [1mdist/hooks/use-chat.js.map [22m[32m18.43 KB[39m
|
|
57
|
-
[32mCJS[39m [1mdist/hooks/use-copilot-action.js.map [22m[32m9.54 KB[39m
|
|
58
|
-
[32mCJS[39m [1mdist/hooks/use-copilot-chat.js.map [22m[32m35.53 KB[39m
|
|
59
|
-
[32mCJS[39m [1mdist/hooks/use-flat-category-store.js.map [22m[32m4.25 KB[39m
|
|
60
|
-
[32mCJS[39m [1mdist/hooks/use-make-copilot-actionable.js.map [22m[32m7.14 KB[39m
|
|
61
|
-
[32mCJS[39m [1mdist/hooks/use-make-copilot-document-readable.js.map [22m[32m6.68 KB[39m
|
|
62
|
-
[32mCJS[39m [1mdist/hooks/use-make-copilot-readable.js.map [22m[32m6.73 KB[39m
|
|
63
|
-
[32mCJS[39m [1mdist/hooks/use-tree.js.map [22m[32m8.32 KB[39m
|
|
64
|
-
[32mCJS[39m [1mdist/lib/index.js.map [22m[32m17.34 KB[39m
|
|
65
|
-
[32mCJS[39m [1mdist/types/frontend-action.js.map [22m[32m1.77 KB[39m
|
|
66
|
-
[32mCJS[39m [1mdist/types/index.js.map [22m[32m338.00 B[39m
|
|
67
|
-
[32mCJS[39m [1mdist/types/system-message.js.map [22m[32m249.00 B[39m
|
|
68
|
-
[32mCJS[39m [1mdist/utils/utils.test.js.map [22m[32m354.00 B[39m
|
|
69
|
-
[32mCJS[39m [1mdist/utils/utils.js.map [22m[32m137.00 B[39m
|
|
70
|
-
[32mCJS[39m [1mdist/components/copilot-provider/copilotkit.js.map [22m[32m27.93 KB[39m
|
|
71
|
-
[32mCJS[39m [1mdist/components/copilot-provider/index.js.map [22m[32m28.13 KB[39m
|
|
72
|
-
[32mCJS[39m [1mdist/openai-assistants/hooks/use-assistants.js.map [22m[32m5.90 KB[39m
|
|
73
|
-
[32mCJS[39m [1mdist/openai-assistants/hooks/use-copilot-chat-v2.js.map [22m[32m21.56 KB[39m
|
|
74
|
-
[32mCJS[39m [1mdist/openai-assistants/utils/process-message-stream.js.map [22m[32m1.33 KB[39m
|
|
75
|
-
[32mCJS[39m ⚡️ Build success in 181ms
|
|
76
|
-
[32mESM[39m [1mdist/components/copilot-provider/copilotkit.mjs [22m[32m331.00 B[39m
|
|
77
|
-
[32mESM[39m [1mdist/components/copilot-provider/index.mjs [22m[32m361.00 B[39m
|
|
78
|
-
[32mESM[39m [1mdist/openai-assistants/hooks/index.mjs [22m[32m513.00 B[39m
|
|
79
|
-
[32mESM[39m [1mdist/openai-assistants/hooks/use-assistants.mjs [22m[32m2.57 KB[39m
|
|
80
|
-
[32mESM[39m [1mdist/openai-assistants/hooks/use-copilot-chat-v2.mjs [22m[32m540.00 B[39m
|
|
81
|
-
[32mESM[39m [1mdist/openai-assistants/utils/index.mjs [22m[32m206.00 B[39m
|
|
82
|
-
[32mESM[39m [1mdist/openai-assistants/utils/process-message-stream.mjs [22m[32m188.00 B[39m
|
|
83
|
-
[32mESM[39m [1mdist/types/document-pointer.mjs [22m[32m45.00 B[39m
|
|
84
|
-
[32mESM[39m [1mdist/types/frontend-action.mjs [22m[32m44.00 B[39m
|
|
85
|
-
[32mESM[39m [1mdist/types/index.mjs [22m[32m66.00 B[39m
|
|
86
|
-
[32mESM[39m [1mdist/types/system-message.mjs [22m[32m43.00 B[39m
|
|
87
|
-
[32mESM[39m [1mdist/utils/fetch-chat-completion.mjs [22m[32m319.00 B[39m
|
|
88
|
-
[32mESM[39m [1mdist/utils/utils.test.mjs [22m[32m170.00 B[39m
|
|
89
|
-
[32mESM[39m [1mdist/utils/utils.mjs [22m[32m34.00 B[39m
|
|
90
|
-
[32mESM[39m [1mdist/components/copilot-provider/copilotkit-props.mjs [22m[32m45.00 B[39m
|
|
91
|
-
[32mESM[39m [1mdist/hooks/use-flat-category-store.mjs [22m[32m216.00 B[39m
|
|
92
|
-
[32mESM[39m [1mdist/hooks/use-make-copilot-actionable.mjs [22m[32m227.00 B[39m
|
|
93
|
-
[32mESM[39m [1mdist/hooks/use-make-copilot-document-readable.mjs [22m[32m246.00 B[39m
|
|
94
|
-
[32mESM[39m [1mdist/hooks/use-make-copilot-readable.mjs [22m[32m221.00 B[39m
|
|
95
|
-
[32mESM[39m [1mdist/hooks/use-tree.mjs [22m[32m171.00 B[39m
|
|
96
|
-
[32mESM[39m [1mdist/lib/copilot-task.mjs [22m[32m378.00 B[39m
|
|
97
|
-
[32mESM[39m [1mdist/lib/index.mjs [22m[32m403.00 B[39m
|
|
98
|
-
[32mESM[39m [1mdist/openai-assistants/index.mjs [22m[32m565.00 B[39m
|
|
99
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m1.58 KB[39m
|
|
100
|
-
[32mESM[39m [1mdist/chunk-EFZPSZWO.mjs [22m[32m43.00 B[39m
|
|
101
|
-
[32mESM[39m [1mdist/chunk-LUGEI4YQ.mjs [22m[32m43.00 B[39m
|
|
102
|
-
[32mESM[39m [1mdist/chunk-UNYZRMB2.mjs [22m[32m3.17 KB[39m
|
|
13
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m1.67 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist/components/index.mjs [22m[32m375.00 B[39m
|
|
15
|
+
[32mESM[39m [1mdist/context/copilot-context.mjs [22m[32m205.00 B[39m
|
|
16
|
+
[32mESM[39m [1mdist/hooks/index.mjs [22m[32m901.00 B[39m
|
|
103
17
|
[32mESM[39m [1mdist/chunk-7GFKOIO7.mjs [22m[32m43.00 B[39m
|
|
104
18
|
[32mESM[39m [1mdist/chunk-BABVSMJR.mjs [22m[32m43.00 B[39m
|
|
105
|
-
[32mESM[39m [1mdist/chunk-
|
|
19
|
+
[32mESM[39m [1mdist/chunk-UZXKJ4IE.mjs [22m[32m4.39 KB[39m
|
|
106
20
|
[32mESM[39m [1mdist/chunk-FRAKUJWH.mjs [22m[32m43.00 B[39m
|
|
107
21
|
[32mESM[39m [1mdist/chunk-MZ5UN3BY.mjs [22m[32m802.00 B[39m
|
|
108
|
-
[32mESM[39m [1mdist/
|
|
109
|
-
[32mESM[39m [1mdist/
|
|
22
|
+
[32mESM[39m [1mdist/chunk-EFZPSZWO.mjs [22m[32m43.00 B[39m
|
|
23
|
+
[32mESM[39m [1mdist/chunk-LUGEI4YQ.mjs [22m[32m43.00 B[39m
|
|
24
|
+
[32mESM[39m [1mdist/chunk-5ZD5AKJF.mjs [22m[32m3.21 KB[39m
|
|
110
25
|
[32mESM[39m [1mdist/context/index.mjs [22m[32m227.00 B[39m
|
|
111
26
|
[32mESM[39m [1mdist/chunk-VNRDQJXW.mjs [22m[32m43.00 B[39m
|
|
112
|
-
[32mESM[39m [1mdist/
|
|
113
|
-
[32mESM[39m [1mdist/chunk-
|
|
27
|
+
[32mESM[39m [1mdist/chunk-EYKDJBDE.mjs [22m[32m43.00 B[39m
|
|
28
|
+
[32mESM[39m [1mdist/chunk-ZIR7KCEA.mjs [22m[32m909.00 B[39m
|
|
114
29
|
[32mESM[39m [1mdist/chunk-6ARSX7BW.mjs [22m[32m1.06 KB[39m
|
|
115
30
|
[32mESM[39m [1mdist/chunk-PC6FY3LD.mjs [22m[32m700.00 B[39m
|
|
116
|
-
[32mESM[39m [1mdist/chunk-
|
|
31
|
+
[32mESM[39m [1mdist/chunk-KTUNGBJF.mjs [22m[32m640.00 B[39m
|
|
117
32
|
[32mESM[39m [1mdist/hooks/use-chat.mjs [22m[32m174.00 B[39m
|
|
118
33
|
[32mESM[39m [1mdist/hooks/use-copilot-action.mjs [22m[32m202.00 B[39m
|
|
119
|
-
[32mESM[39m [1mdist/chunk-
|
|
34
|
+
[32mESM[39m [1mdist/chunk-72BJ3A3S.mjs [22m[32m1.46 KB[39m
|
|
120
35
|
[32mESM[39m [1mdist/hooks/use-copilot-chat.mjs [22m[32m468.00 B[39m
|
|
121
|
-
[32mESM[39m [1mdist/chunk-
|
|
36
|
+
[32mESM[39m [1mdist/chunk-RFITGPPJ.mjs [22m[32m3.00 KB[39m
|
|
122
37
|
[32mESM[39m [1mdist/chunk-JD7BAH7U.mjs [22m[32m43.00 B[39m
|
|
123
38
|
[32mESM[39m [1mdist/chunk-SPCZTZCY.mjs [22m[32m43.00 B[39m
|
|
124
|
-
[32mESM[39m [1mdist/chunk-
|
|
39
|
+
[32mESM[39m [1mdist/chunk-ZYQT5647.mjs [22m[32m5.44 KB[39m
|
|
125
40
|
[32mESM[39m [1mdist/chunk-YULKJPY3.mjs [22m[32m1.84 KB[39m
|
|
126
41
|
[32mESM[39m [1mdist/chunk-VUY2K2DI.mjs [22m[32m3.89 KB[39m
|
|
127
|
-
[32mESM[39m [1mdist/chunk-
|
|
42
|
+
[32mESM[39m [1mdist/chunk-4NNFSZOY.mjs [22m[32m6.73 KB[39m
|
|
128
43
|
[32mESM[39m [1mdist/chunk-CGT3AVYT.mjs [22m[32m2.77 KB[39m
|
|
129
44
|
[32mESM[39m [1mdist/chunk-O35YOIHC.mjs [22m[32m1.52 KB[39m
|
|
130
45
|
[32mESM[39m [1mdist/chunk-MRXNTQOX.mjs [22m[32m1.89 KB[39m
|
|
131
|
-
[32mESM[39m [1mdist/
|
|
132
|
-
[32mESM[39m [1mdist/components/copilot-provider/
|
|
133
|
-
[32mESM[39m [1mdist/openai-assistants/
|
|
134
|
-
[32mESM[39m [1mdist/
|
|
135
|
-
[32mESM[39m [1mdist/
|
|
136
|
-
[32mESM[39m [1mdist/
|
|
137
|
-
[32mESM[39m [1mdist/
|
|
138
|
-
[32mESM[39m [1mdist/
|
|
139
|
-
[32mESM[39m [1mdist/
|
|
140
|
-
[32mESM[39m [1mdist/
|
|
141
|
-
[32mESM[39m [1mdist/
|
|
142
|
-
[32mESM[39m [1mdist/
|
|
143
|
-
[32mESM[39m [1mdist/
|
|
144
|
-
[32mESM[39m [1mdist/
|
|
145
|
-
[32mESM[39m [1mdist/
|
|
146
|
-
[32mESM[39m [1mdist/
|
|
147
|
-
[32mESM[39m [1mdist/
|
|
148
|
-
[32mESM[39m [1mdist/hooks/use-
|
|
149
|
-
[32mESM[39m [1mdist/hooks/use-
|
|
150
|
-
[32mESM[39m [1mdist/hooks/use-
|
|
151
|
-
[32mESM[39m [1mdist/
|
|
152
|
-
[32mESM[39m [1mdist/
|
|
153
|
-
[32mESM[39m [1mdist/
|
|
46
|
+
[32mESM[39m [1mdist/openai-assistants/hooks/index.mjs [22m[32m513.00 B[39m
|
|
47
|
+
[32mESM[39m [1mdist/components/copilot-provider/copilotkit-props.mjs [22m[32m45.00 B[39m
|
|
48
|
+
[32mESM[39m [1mdist/openai-assistants/utils/index.mjs [22m[32m206.00 B[39m
|
|
49
|
+
[32mESM[39m [1mdist/types/document-pointer.mjs [22m[32m45.00 B[39m
|
|
50
|
+
[32mESM[39m [1mdist/utils/fetch-chat-completion.mjs [22m[32m319.00 B[39m
|
|
51
|
+
[32mESM[39m [1mdist/lib/copilot-task.mjs [22m[32m378.00 B[39m
|
|
52
|
+
[32mESM[39m [1mdist/components/copilot-provider/copilotkit.mjs [22m[32m331.00 B[39m
|
|
53
|
+
[32mESM[39m [1mdist/components/copilot-provider/index.mjs [22m[32m361.00 B[39m
|
|
54
|
+
[32mESM[39m [1mdist/openai-assistants/hooks/use-assistants.mjs [22m[32m2.57 KB[39m
|
|
55
|
+
[32mESM[39m [1mdist/openai-assistants/hooks/use-copilot-chat-v2.mjs [22m[32m540.00 B[39m
|
|
56
|
+
[32mESM[39m [1mdist/openai-assistants/utils/process-message-stream.mjs [22m[32m188.00 B[39m
|
|
57
|
+
[32mESM[39m [1mdist/openai-assistants/index.mjs [22m[32m565.00 B[39m
|
|
58
|
+
[32mESM[39m [1mdist/types/frontend-action.mjs [22m[32m44.00 B[39m
|
|
59
|
+
[32mESM[39m [1mdist/types/index.mjs [22m[32m66.00 B[39m
|
|
60
|
+
[32mESM[39m [1mdist/types/system-message.mjs [22m[32m43.00 B[39m
|
|
61
|
+
[32mESM[39m [1mdist/utils/utils.test.mjs [22m[32m170.00 B[39m
|
|
62
|
+
[32mESM[39m [1mdist/utils/utils.mjs [22m[32m34.00 B[39m
|
|
63
|
+
[32mESM[39m [1mdist/hooks/use-copilot-readable.mjs [22m[32m208.00 B[39m
|
|
64
|
+
[32mESM[39m [1mdist/hooks/use-flat-category-store.mjs [22m[32m216.00 B[39m
|
|
65
|
+
[32mESM[39m [1mdist/hooks/use-make-copilot-actionable.mjs [22m[32m227.00 B[39m
|
|
66
|
+
[32mESM[39m [1mdist/hooks/use-make-copilot-document-readable.mjs [22m[32m246.00 B[39m
|
|
67
|
+
[32mESM[39m [1mdist/hooks/use-make-copilot-readable.mjs [22m[32m221.00 B[39m
|
|
68
|
+
[32mESM[39m [1mdist/hooks/use-tree.mjs [22m[32m171.00 B[39m
|
|
69
|
+
[32mESM[39m [1mdist/lib/index.mjs [22m[32m403.00 B[39m
|
|
154
70
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m71.00 B[39m
|
|
155
|
-
[32mESM[39m [1mdist/
|
|
156
|
-
[32mESM[39m [1mdist/
|
|
157
|
-
[32mESM[39m [1mdist/
|
|
71
|
+
[32mESM[39m [1mdist/components/index.mjs.map [22m[32m71.00 B[39m
|
|
72
|
+
[32mESM[39m [1mdist/context/copilot-context.mjs.map [22m[32m71.00 B[39m
|
|
73
|
+
[32mESM[39m [1mdist/hooks/index.mjs.map [22m[32m71.00 B[39m
|
|
158
74
|
[32mESM[39m [1mdist/chunk-7GFKOIO7.mjs.map [22m[32m71.00 B[39m
|
|
159
75
|
[32mESM[39m [1mdist/chunk-BABVSMJR.mjs.map [22m[32m71.00 B[39m
|
|
160
|
-
[32mESM[39m [1mdist/chunk-
|
|
76
|
+
[32mESM[39m [1mdist/chunk-UZXKJ4IE.mjs.map [22m[32m7.90 KB[39m
|
|
161
77
|
[32mESM[39m [1mdist/chunk-FRAKUJWH.mjs.map [22m[32m71.00 B[39m
|
|
162
78
|
[32mESM[39m [1mdist/chunk-MZ5UN3BY.mjs.map [22m[32m1.26 KB[39m
|
|
163
|
-
[32mESM[39m [1mdist/
|
|
164
|
-
[32mESM[39m [1mdist/
|
|
79
|
+
[32mESM[39m [1mdist/chunk-EFZPSZWO.mjs.map [22m[32m71.00 B[39m
|
|
80
|
+
[32mESM[39m [1mdist/chunk-LUGEI4YQ.mjs.map [22m[32m71.00 B[39m
|
|
81
|
+
[32mESM[39m [1mdist/chunk-5ZD5AKJF.mjs.map [22m[32m5.81 KB[39m
|
|
165
82
|
[32mESM[39m [1mdist/context/index.mjs.map [22m[32m71.00 B[39m
|
|
166
83
|
[32mESM[39m [1mdist/chunk-VNRDQJXW.mjs.map [22m[32m71.00 B[39m
|
|
167
|
-
[32mESM[39m [1mdist/
|
|
168
|
-
[32mESM[39m [1mdist/chunk-
|
|
84
|
+
[32mESM[39m [1mdist/chunk-EYKDJBDE.mjs.map [22m[32m71.00 B[39m
|
|
85
|
+
[32mESM[39m [1mdist/chunk-ZIR7KCEA.mjs.map [22m[32m2.38 KB[39m
|
|
169
86
|
[32mESM[39m [1mdist/chunk-6ARSX7BW.mjs.map [22m[32m1.87 KB[39m
|
|
170
87
|
[32mESM[39m [1mdist/chunk-PC6FY3LD.mjs.map [22m[32m1.40 KB[39m
|
|
171
|
-
[32mESM[39m [1mdist/chunk-
|
|
88
|
+
[32mESM[39m [1mdist/chunk-KTUNGBJF.mjs.map [22m[32m1.08 KB[39m
|
|
172
89
|
[32mESM[39m [1mdist/hooks/use-chat.mjs.map [22m[32m71.00 B[39m
|
|
173
90
|
[32mESM[39m [1mdist/hooks/use-copilot-action.mjs.map [22m[32m71.00 B[39m
|
|
174
|
-
[32mESM[39m [1mdist/chunk-
|
|
91
|
+
[32mESM[39m [1mdist/chunk-72BJ3A3S.mjs.map [22m[32m4.28 KB[39m
|
|
175
92
|
[32mESM[39m [1mdist/hooks/use-copilot-chat.mjs.map [22m[32m71.00 B[39m
|
|
176
|
-
[32mESM[39m [1mdist/chunk-
|
|
93
|
+
[32mESM[39m [1mdist/chunk-RFITGPPJ.mjs.map [22m[32m4.77 KB[39m
|
|
177
94
|
[32mESM[39m [1mdist/chunk-JD7BAH7U.mjs.map [22m[32m71.00 B[39m
|
|
178
95
|
[32mESM[39m [1mdist/chunk-SPCZTZCY.mjs.map [22m[32m71.00 B[39m
|
|
179
|
-
[32mESM[39m [1mdist/chunk-
|
|
96
|
+
[32mESM[39m [1mdist/chunk-ZYQT5647.mjs.map [22m[32m10.26 KB[39m
|
|
180
97
|
[32mESM[39m [1mdist/chunk-YULKJPY3.mjs.map [22m[32m4.21 KB[39m
|
|
181
98
|
[32mESM[39m [1mdist/chunk-VUY2K2DI.mjs.map [22m[32m8.27 KB[39m
|
|
182
|
-
[32mESM[39m [1mdist/chunk-
|
|
99
|
+
[32mESM[39m [1mdist/chunk-4NNFSZOY.mjs.map [22m[32m14.23 KB[39m
|
|
183
100
|
[32mESM[39m [1mdist/chunk-CGT3AVYT.mjs.map [22m[32m4.86 KB[39m
|
|
184
101
|
[32mESM[39m [1mdist/chunk-O35YOIHC.mjs.map [22m[32m5.30 KB[39m
|
|
185
102
|
[32mESM[39m [1mdist/chunk-MRXNTQOX.mjs.map [22m[32m71.00 B[39m
|
|
186
|
-
[32mESM[39m
|
|
103
|
+
[32mESM[39m [1mdist/openai-assistants/hooks/index.mjs.map [22m[32m71.00 B[39m
|
|
104
|
+
[32mESM[39m [1mdist/components/copilot-provider/copilotkit-props.mjs.map [22m[32m71.00 B[39m
|
|
105
|
+
[32mESM[39m [1mdist/openai-assistants/utils/index.mjs.map [22m[32m71.00 B[39m
|
|
106
|
+
[32mESM[39m [1mdist/types/document-pointer.mjs.map [22m[32m71.00 B[39m
|
|
107
|
+
[32mESM[39m [1mdist/utils/fetch-chat-completion.mjs.map [22m[32m71.00 B[39m
|
|
108
|
+
[32mESM[39m [1mdist/lib/copilot-task.mjs.map [22m[32m71.00 B[39m
|
|
109
|
+
[32mESM[39m [1mdist/components/copilot-provider/copilotkit.mjs.map [22m[32m71.00 B[39m
|
|
110
|
+
[32mESM[39m [1mdist/components/copilot-provider/index.mjs.map [22m[32m71.00 B[39m
|
|
111
|
+
[32mESM[39m [1mdist/openai-assistants/hooks/use-assistants.mjs.map [22m[32m4.65 KB[39m
|
|
112
|
+
[32mESM[39m [1mdist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map [22m[32m71.00 B[39m
|
|
113
|
+
[32mESM[39m [1mdist/openai-assistants/utils/process-message-stream.mjs.map [22m[32m71.00 B[39m
|
|
114
|
+
[32mESM[39m [1mdist/openai-assistants/index.mjs.map [22m[32m71.00 B[39m
|
|
115
|
+
[32mESM[39m [1mdist/types/frontend-action.mjs.map [22m[32m71.00 B[39m
|
|
116
|
+
[32mESM[39m [1mdist/types/index.mjs.map [22m[32m71.00 B[39m
|
|
117
|
+
[32mESM[39m [1mdist/types/system-message.mjs.map [22m[32m71.00 B[39m
|
|
118
|
+
[32mESM[39m [1mdist/utils/utils.test.mjs.map [22m[32m352.00 B[39m
|
|
119
|
+
[32mESM[39m [1mdist/utils/utils.mjs.map [22m[32m71.00 B[39m
|
|
120
|
+
[32mESM[39m [1mdist/hooks/use-copilot-readable.mjs.map [22m[32m71.00 B[39m
|
|
121
|
+
[32mESM[39m [1mdist/hooks/use-flat-category-store.mjs.map [22m[32m71.00 B[39m
|
|
122
|
+
[32mESM[39m [1mdist/hooks/use-make-copilot-actionable.mjs.map [22m[32m71.00 B[39m
|
|
123
|
+
[32mESM[39m [1mdist/hooks/use-make-copilot-document-readable.mjs.map [22m[32m71.00 B[39m
|
|
124
|
+
[32mESM[39m [1mdist/hooks/use-make-copilot-readable.mjs.map [22m[32m71.00 B[39m
|
|
125
|
+
[32mESM[39m [1mdist/hooks/use-tree.mjs.map [22m[32m71.00 B[39m
|
|
126
|
+
[32mESM[39m [1mdist/lib/index.mjs.map [22m[32m71.00 B[39m
|
|
127
|
+
[32mESM[39m ⚡️ Build success in 139ms
|
|
128
|
+
[32mCJS[39m [1mdist/index.js [22m[32m41.24 KB[39m
|
|
129
|
+
[32mCJS[39m [1mdist/components/index.js [22m[32m15.89 KB[39m
|
|
130
|
+
[32mCJS[39m [1mdist/context/copilot-context.js [22m[32m3.71 KB[39m
|
|
131
|
+
[32mCJS[39m [1mdist/context/index.js [22m[32m3.70 KB[39m
|
|
132
|
+
[32mCJS[39m [1mdist/hooks/index.js [22m[32m21.23 KB[39m
|
|
133
|
+
[32mCJS[39m [1mdist/hooks/use-chat.js [22m[32m11.76 KB[39m
|
|
134
|
+
[32mCJS[39m [1mdist/hooks/use-copilot-action.js [22m[32m5.00 KB[39m
|
|
135
|
+
[32mCJS[39m [1mdist/hooks/use-copilot-chat.js [22m[32m16.61 KB[39m
|
|
136
|
+
[32mCJS[39m [1mdist/hooks/use-copilot-readable.js [22m[32m4.42 KB[39m
|
|
137
|
+
[32mCJS[39m [1mdist/hooks/use-flat-category-store.js [22m[32m2.87 KB[39m
|
|
138
|
+
[32mCJS[39m [1mdist/hooks/use-make-copilot-actionable.js [22m[32m4.68 KB[39m
|
|
139
|
+
[32mCJS[39m [1mdist/hooks/use-make-copilot-document-readable.js [22m[32m4.31 KB[39m
|
|
140
|
+
[32mCJS[39m [1mdist/hooks/use-make-copilot-readable.js [22m[32m4.19 KB[39m
|
|
141
|
+
[32mCJS[39m [1mdist/hooks/use-tree.js [22m[32m5.53 KB[39m
|
|
142
|
+
[32mCJS[39m [1mdist/lib/copilot-task.js [22m[32m7.49 KB[39m
|
|
143
|
+
[32mCJS[39m [1mdist/lib/index.js [22m[32m7.45 KB[39m
|
|
144
|
+
[32mCJS[39m [1mdist/openai-assistants/index.js [22m[32m9.41 KB[39m
|
|
145
|
+
[32mCJS[39m [1mdist/types/document-pointer.js [22m[32m841.00 B[39m
|
|
146
|
+
[32mCJS[39m [1mdist/types/frontend-action.js [22m[32m837.00 B[39m
|
|
147
|
+
[32mCJS[39m [1mdist/types/index.js [22m[32m797.00 B[39m
|
|
148
|
+
[32mCJS[39m [1mdist/types/system-message.js [22m[32m833.00 B[39m
|
|
149
|
+
[32mCJS[39m [1mdist/utils/fetch-chat-completion.js [22m[32m5.03 KB[39m
|
|
150
|
+
[32mCJS[39m [1mdist/utils/utils.test.js [22m[32m184.00 B[39m
|
|
151
|
+
[32mCJS[39m [1mdist/utils/utils.js [22m[32m797.00 B[39m
|
|
152
|
+
[32mCJS[39m [1mdist/components/copilot-provider/copilotkit-props.js [22m[32m864.00 B[39m
|
|
153
|
+
[32mCJS[39m [1mdist/components/copilot-provider/copilotkit.js [22m[32m15.87 KB[39m
|
|
154
|
+
[32mCJS[39m [1mdist/components/copilot-provider/index.js [22m[32m15.93 KB[39m
|
|
155
|
+
[32mCJS[39m [1mdist/openai-assistants/hooks/index.js [22m[32m9.31 KB[39m
|
|
156
|
+
[32mCJS[39m [1mdist/openai-assistants/hooks/use-assistants.js [22m[32m4.81 KB[39m
|
|
157
|
+
[32mCJS[39m [1mdist/openai-assistants/hooks/use-copilot-chat-v2.js [22m[32m9.40 KB[39m
|
|
158
|
+
[32mCJS[39m [1mdist/openai-assistants/utils/index.js [22m[32m2.30 KB[39m
|
|
159
|
+
[32mCJS[39m [1mdist/openai-assistants/utils/process-message-stream.js [22m[32m2.33 KB[39m
|
|
160
|
+
[32mCJS[39m [1mdist/components/index.js.map [22m[32m28.02 KB[39m
|
|
161
|
+
[32mCJS[39m [1mdist/context/copilot-context.js.map [22m[32m5.39 KB[39m
|
|
162
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m77.73 KB[39m
|
|
163
|
+
[32mCJS[39m [1mdist/context/index.js.map [22m[32m5.62 KB[39m
|
|
164
|
+
[32mCJS[39m [1mdist/hooks/index.js.map [22m[32m47.39 KB[39m
|
|
165
|
+
[32mCJS[39m [1mdist/hooks/use-chat.js.map [22m[32m18.82 KB[39m
|
|
166
|
+
[32mCJS[39m [1mdist/hooks/use-copilot-action.js.map [22m[32m9.56 KB[39m
|
|
167
|
+
[32mCJS[39m [1mdist/hooks/use-copilot-chat.js.map [22m[32m35.94 KB[39m
|
|
168
|
+
[32mCJS[39m [1mdist/hooks/use-copilot-readable.js.map [22m[32m7.66 KB[39m
|
|
169
|
+
[32mCJS[39m [1mdist/hooks/use-flat-category-store.js.map [22m[32m4.25 KB[39m
|
|
170
|
+
[32mCJS[39m [1mdist/hooks/use-make-copilot-actionable.js.map [22m[32m7.14 KB[39m
|
|
171
|
+
[32mCJS[39m [1mdist/hooks/use-make-copilot-document-readable.js.map [22m[32m6.68 KB[39m
|
|
172
|
+
[32mCJS[39m [1mdist/hooks/use-make-copilot-readable.js.map [22m[32m6.36 KB[39m
|
|
173
|
+
[32mCJS[39m [1mdist/hooks/use-tree.js.map [22m[32m8.32 KB[39m
|
|
174
|
+
[32mCJS[39m [1mdist/lib/copilot-task.js.map [22m[32m17.54 KB[39m
|
|
175
|
+
[32mCJS[39m [1mdist/lib/index.js.map [22m[32m17.60 KB[39m
|
|
176
|
+
[32mCJS[39m [1mdist/openai-assistants/index.js.map [22m[32m21.66 KB[39m
|
|
177
|
+
[32mCJS[39m [1mdist/types/frontend-action.js.map [22m[32m1.77 KB[39m
|
|
178
|
+
[32mCJS[39m [1mdist/types/document-pointer.js.map [22m[32m292.00 B[39m
|
|
179
|
+
[32mCJS[39m [1mdist/types/index.js.map [22m[32m338.00 B[39m
|
|
180
|
+
[32mCJS[39m [1mdist/types/system-message.js.map [22m[32m249.00 B[39m
|
|
181
|
+
[32mCJS[39m [1mdist/utils/fetch-chat-completion.js.map [22m[32m4.90 KB[39m
|
|
182
|
+
[32mCJS[39m [1mdist/utils/utils.test.js.map [22m[32m354.00 B[39m
|
|
183
|
+
[32mCJS[39m [1mdist/utils/utils.js.map [22m[32m137.00 B[39m
|
|
184
|
+
[32mCJS[39m [1mdist/components/copilot-provider/copilotkit-props.js.map [22m[32m1.44 KB[39m
|
|
185
|
+
[32mCJS[39m [1mdist/components/copilot-provider/copilotkit.js.map [22m[32m27.96 KB[39m
|
|
186
|
+
[32mCJS[39m [1mdist/components/copilot-provider/index.js.map [22m[32m28.16 KB[39m
|
|
187
|
+
[32mCJS[39m [1mdist/openai-assistants/hooks/index.js.map [22m[32m21.96 KB[39m
|
|
188
|
+
[32mCJS[39m [1mdist/openai-assistants/hooks/use-assistants.js.map [22m[32m5.90 KB[39m
|
|
189
|
+
[32mCJS[39m [1mdist/openai-assistants/hooks/use-copilot-chat-v2.js.map [22m[32m21.58 KB[39m
|
|
190
|
+
[32mCJS[39m [1mdist/openai-assistants/utils/index.js.map [22m[32m1.44 KB[39m
|
|
191
|
+
[32mCJS[39m [1mdist/openai-assistants/utils/process-message-stream.js.map [22m[32m1.33 KB[39m
|
|
192
|
+
[32mCJS[39m ⚡️ Build success in 142ms
|
|
187
193
|
[34mDTS[39m Build start
|
|
188
|
-
[32mDTS[39m ⚡️ Build success in
|
|
189
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.
|
|
194
|
+
[32mDTS[39m ⚡️ Build success in 5949ms
|
|
195
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.63 KB[39m
|
|
190
196
|
[32mDTS[39m [1mdist/components/copilot-provider/copilotkit.d.ts [22m[32m1017.00 B[39m
|
|
191
|
-
[32mDTS[39m [1mdist/components/copilot-provider/copilotkit-props.d.ts [22m[32m1.
|
|
197
|
+
[32mDTS[39m [1mdist/components/copilot-provider/copilotkit-props.d.ts [22m[32m1.33 KB[39m
|
|
192
198
|
[32mDTS[39m [1mdist/context/copilot-context.d.ts [22m[32m2.83 KB[39m
|
|
193
199
|
[32mDTS[39m [1mdist/hooks/use-copilot-chat.d.ts [22m[32m1.05 KB[39m
|
|
194
200
|
[32mDTS[39m [1mdist/hooks/use-make-copilot-actionable.d.ts [22m[32m309.00 B[39m
|
|
195
201
|
[32mDTS[39m [1mdist/hooks/use-copilot-action.d.ts [22m[32m286.00 B[39m
|
|
196
|
-
[32mDTS[39m [1mdist/hooks/use-make-copilot-readable.d.ts [22m[
|
|
202
|
+
[32mDTS[39m [1mdist/hooks/use-make-copilot-readable.d.ts [22m[32m228.00 B[39m
|
|
197
203
|
[32mDTS[39m [1mdist/hooks/use-make-copilot-document-readable.d.ts [22m[32m516.00 B[39m
|
|
198
204
|
[32mDTS[39m [1mdist/hooks/use-chat.d.ts [22m[32m2.90 KB[39m
|
|
205
|
+
[32mDTS[39m [1mdist/hooks/use-copilot-readable.d.ts [22m[32m1.10 KB[39m
|
|
199
206
|
[32mDTS[39m [1mdist/types/document-pointer.d.ts [22m[32m181.00 B[39m
|
|
200
207
|
[32mDTS[39m [1mdist/types/system-message.d.ts [22m[32m132.00 B[39m
|
|
201
208
|
[32mDTS[39m [1mdist/types/frontend-action.d.ts [22m[32m1.62 KB[39m
|
|
202
209
|
[32mDTS[39m [1mdist/openai-assistants/hooks/use-copilot-chat-v2.d.ts [22m[32m1.41 KB[39m
|
|
203
210
|
[32mDTS[39m [1mdist/openai-assistants/utils/process-message-stream.d.ts [22m[32m196.00 B[39m
|
|
204
|
-
[32mDTS[39m [1mdist/lib/copilot-task.d.ts [22m[32m1.
|
|
211
|
+
[32mDTS[39m [1mdist/lib/copilot-task.d.ts [22m[32m1.21 KB[39m
|
|
205
212
|
[32mDTS[39m [1mdist/utils/fetch-chat-completion.d.ts [22m[32m1.38 KB[39m
|
|
206
213
|
[32mDTS[39m [1mdist/hooks/use-tree.d.ts [22m[32m543.00 B[39m
|
|
207
214
|
[32mDTS[39m [1mdist/components/index.d.ts [22m[32m186.00 B[39m
|
|
208
215
|
[32mDTS[39m [1mdist/context/index.d.ts [22m[32m267.00 B[39m
|
|
209
|
-
[32mDTS[39m [1mdist/hooks/index.d.ts [22m[
|
|
216
|
+
[32mDTS[39m [1mdist/hooks/index.d.ts [22m[32m736.00 B[39m
|
|
210
217
|
[32mDTS[39m [1mdist/hooks/use-flat-category-store.d.ts [22m[32m424.00 B[39m
|
|
211
218
|
[32mDTS[39m [1mdist/lib/index.d.ts [22m[32m261.00 B[39m
|
|
212
219
|
[32mDTS[39m [1mdist/openai-assistants/index.d.ts [22m[32m262.00 B[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,48 +1,80 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 0.25.0-mme-cloud.5
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Update comments
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @copilotkit/shared@0.9.0-mme-cloud.5
|
|
13
|
+
|
|
14
|
+
## 0.25.0-mme-cloud.4
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- Update comments
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @copilotkit/shared@0.9.0-mme-cloud.4
|
|
24
|
+
|
|
3
25
|
## 0.25.0-mme-cloud.3
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
|
6
28
|
|
|
7
|
-
-
|
|
29
|
+
- 85c029b: streamline cloud configuration
|
|
30
|
+
- Rename
|
|
31
|
+
- a5ade3b: Support input guardrails (cloud)
|
|
32
|
+
- 12ff590: Unify api key handling
|
|
33
|
+
- f0c4745: Include reason in guardrails response
|
|
34
|
+
- 17f4b1b: Retrieve public API key
|
|
8
35
|
|
|
9
36
|
### Patch Changes
|
|
10
37
|
|
|
38
|
+
- Updated dependencies [85c029b]
|
|
11
39
|
- Updated dependencies
|
|
40
|
+
- Updated dependencies [a5ade3b]
|
|
41
|
+
- Updated dependencies [12ff590]
|
|
42
|
+
- Updated dependencies [f0c4745]
|
|
43
|
+
- Updated dependencies [17f4b1b]
|
|
12
44
|
- @copilotkit/shared@0.9.0-mme-cloud.3
|
|
13
45
|
|
|
14
|
-
## 0.25.0-
|
|
46
|
+
## 0.25.0-function-calling-fixes.2
|
|
15
47
|
|
|
16
48
|
### Minor Changes
|
|
17
49
|
|
|
18
|
-
-
|
|
50
|
+
- fix backend function calling return values
|
|
19
51
|
|
|
20
52
|
### Patch Changes
|
|
21
53
|
|
|
22
54
|
- Updated dependencies
|
|
23
|
-
- @copilotkit/shared@0.9.0-
|
|
55
|
+
- @copilotkit/shared@0.9.0-function-calling-fixes.2
|
|
24
56
|
|
|
25
|
-
## 0.25.0-
|
|
57
|
+
## 0.25.0-function-calling-fixes.1
|
|
26
58
|
|
|
27
59
|
### Minor Changes
|
|
28
60
|
|
|
29
|
-
-
|
|
61
|
+
- gpt-4-turbo-april-2024 function calling fixes
|
|
30
62
|
|
|
31
63
|
### Patch Changes
|
|
32
64
|
|
|
33
65
|
- Updated dependencies
|
|
34
|
-
- @copilotkit/shared@0.9.0-
|
|
66
|
+
- @copilotkit/shared@0.9.0-function-calling-fixes.1
|
|
35
67
|
|
|
36
|
-
## 0.25.0-
|
|
68
|
+
## 0.25.0-alpha.0
|
|
37
69
|
|
|
38
70
|
### Minor Changes
|
|
39
71
|
|
|
40
|
-
-
|
|
72
|
+
- gpt-4-turbo-april-2024
|
|
41
73
|
|
|
42
74
|
### Patch Changes
|
|
43
75
|
|
|
44
76
|
- Updated dependencies
|
|
45
|
-
- @copilotkit/shared@0.9.0-
|
|
77
|
+
- @copilotkit/shared@0.9.0-alpha.0
|
|
46
78
|
|
|
47
79
|
## 0.24.0
|
|
48
80
|
|
|
@@ -59,6 +59,16 @@ function useChat(options) {
|
|
|
59
59
|
runIdRef.current = response.headers.get("runid");
|
|
60
60
|
}
|
|
61
61
|
if (!response.events) {
|
|
62
|
+
setMessages([
|
|
63
|
+
...messages2,
|
|
64
|
+
{
|
|
65
|
+
id: nanoid(),
|
|
66
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
67
|
+
content: response.statusText,
|
|
68
|
+
role: "assistant"
|
|
69
|
+
}
|
|
70
|
+
]);
|
|
71
|
+
setIsLoading(false);
|
|
62
72
|
throw new Error("Failed to fetch chat completion");
|
|
63
73
|
}
|
|
64
74
|
const reader = response.events.getReader();
|
|
@@ -194,4 +204,4 @@ function useChat(options) {
|
|
|
194
204
|
export {
|
|
195
205
|
useChat
|
|
196
206
|
};
|
|
197
|
-
//# sourceMappingURL=chunk-
|
|
207
|
+
//# sourceMappingURL=chunk-4NNFSZOY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-chat.ts"],"sourcesContent":["import { useRef, useState } from \"react\";\nimport {\n Message,\n ToolDefinition,\n FunctionCallHandler,\n encodeResult,\n FunctionCall,\n COPILOT_CLOUD_PUBLIC_API_KEY_HEADER,\n} from \"@copilotkit/shared\";\n\nimport { nanoid } from \"nanoid\";\nimport { fetchAndDecodeChatCompletion } from \"../utils/fetch-chat-completion\";\nimport { CopilotApiConfig } from \"../context\";\nimport untruncateJson from \"untruncate-json\";\n\nexport type UseChatOptions = {\n /**\n * The API endpoint that accepts a `{ messages: Message[] }` object and returns\n * a stream of tokens of the AI chat response. Defaults to `/api/chat`.\n */\n api?: string;\n /**\n * A unique identifier for the chat. If not provided, a random one will be\n * generated. When provided, the `useChat` hook with the same `id` will\n * have shared states across components.\n */\n id?: string;\n /**\n * System messages of the chat. Defaults to an empty array.\n */\n initialMessages?: Message[];\n /**\n * Callback function to be called when a function call is received.\n * If the function returns a `ChatRequest` object, the request will be sent\n * automatically to the API and will be used to update the chat.\n */\n onFunctionCall?: FunctionCallHandler;\n /**\n * HTTP headers to be sent with the API request.\n */\n headers?: Record<string, string> | Headers;\n /**\n * Extra body object to be sent with the API request.\n * @example\n * Send a `sessionId` to the API along with the messages.\n * ```js\n * useChat({\n * body: {\n * sessionId: '123',\n * }\n * })\n * ```\n */\n body?: object;\n /**\n * Function definitions to be sent to the API.\n */\n tools?: ToolDefinition[];\n};\n\nexport type UseChatHelpers = {\n /**\n * Append a user message to the chat list. This triggers the API call to fetch\n * the assistant's response.\n * @param message The message to append\n */\n append: (message: Message) => Promise<void>;\n /**\n * Reload the last AI chat response for the given chat history. If the last\n * message isn't from the assistant, it will request the API to generate a\n * new response.\n */\n reload: () => Promise<void>;\n /**\n * Abort the current request immediately, keep the generated tokens if any.\n */\n stop: () => void;\n /** The current value of the input */\n input: string;\n /** setState-powered method to update the input value */\n setInput: React.Dispatch<React.SetStateAction<string>>;\n /** Whether the API request is in progress */\n isLoading: boolean;\n};\n\nexport type UseChatOptionsWithCopilotConfig = UseChatOptions & {\n copilotConfig: CopilotApiConfig;\n /**\n * The current list of messages in the chat.\n */\n messages: Message[];\n /**\n * The setState-powered method to update the chat messages.\n */\n setMessages: React.Dispatch<React.SetStateAction<Message[]>>;\n};\n\nexport function useChat(options: UseChatOptionsWithCopilotConfig): UseChatHelpers {\n const { messages, setMessages } = options;\n const [input, setInput] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n const abortControllerRef = useRef<AbortController>();\n const threadIdRef = useRef<string | null>(null);\n const runIdRef = useRef<string | null>(null);\n const publicApiKey = options.copilotConfig.publicApiKey;\n const headers = {\n ...(options.headers || {}),\n ...(publicApiKey ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {}),\n };\n\n const runChatCompletion = async (messages: Message[]): Promise<Message[]> => {\n setIsLoading(true);\n\n const newMessages: Message[] = [\n {\n id: nanoid(),\n createdAt: new Date(),\n content: \"\",\n role: \"assistant\",\n },\n ];\n const abortController = new AbortController();\n abortControllerRef.current = abortController;\n\n setMessages([...messages, ...newMessages]);\n\n // add threadId and runId to the body if it exists\n const copilotConfigBody = options.copilotConfig.body || {};\n if (threadIdRef.current) {\n copilotConfigBody.threadId = threadIdRef.current;\n }\n if (runIdRef.current) {\n copilotConfigBody.runId = runIdRef.current;\n }\n\n const messagesWithContext = [...(options.initialMessages || []), ...messages];\n const response = await fetchAndDecodeChatCompletion({\n copilotConfig: { ...options.copilotConfig, body: copilotConfigBody },\n messages: messagesWithContext,\n tools: options.tools,\n headers: headers,\n signal: abortController.signal,\n });\n\n if (response.headers.get(\"threadid\")) {\n threadIdRef.current = response.headers.get(\"threadid\");\n }\n\n if (response.headers.get(\"runid\")) {\n runIdRef.current = response.headers.get(\"runid\");\n }\n\n if (!response.events) {\n setMessages([\n ...messages,\n {\n id: nanoid(),\n createdAt: new Date(),\n content: response.statusText,\n role: \"assistant\",\n },\n ]);\n setIsLoading(false);\n throw new Error(\"Failed to fetch chat completion\");\n }\n\n const reader = response.events.getReader();\n\n // Whether to feed back the new messages to GPT\n let feedback = false;\n\n try {\n while (true) {\n const { done, value } = await reader.read();\n\n if (done) {\n break;\n }\n\n let currentMessage = Object.assign({}, newMessages[newMessages.length - 1]);\n\n if (value.type === \"content\") {\n if (currentMessage.function_call || currentMessage.role === \"function\") {\n // Create a new message if the previous one is a function call or result\n currentMessage = {\n id: nanoid(),\n createdAt: new Date(),\n content: \"\",\n role: \"assistant\",\n };\n newMessages.push(currentMessage);\n }\n currentMessage.content += value.content;\n newMessages[newMessages.length - 1] = currentMessage;\n setMessages([...messages, ...newMessages]);\n } else if (value.type === \"result\") {\n // When we get a result message, it is already complete\n currentMessage = {\n id: nanoid(),\n role: \"function\",\n content: value.content,\n name: value.name,\n };\n newMessages.push(currentMessage);\n setMessages([...messages, ...newMessages]);\n\n // After receiving a result, feed back the new messages to GPT\n feedback = true;\n } else if (value.type === \"function\" || value.type === \"partial\") {\n // Create a new message if the previous one is not empty\n if (\n currentMessage.content != \"\" ||\n currentMessage.function_call ||\n currentMessage.role == \"function\"\n ) {\n currentMessage = {\n id: nanoid(),\n createdAt: new Date(),\n content: \"\",\n role: \"assistant\",\n };\n newMessages.push(currentMessage);\n }\n if (value.type === \"function\") {\n currentMessage.function_call = {\n name: value.name,\n arguments: JSON.stringify(value.arguments),\n scope: value.scope,\n };\n } else if (value.type === \"partial\") {\n let partialArguments: any = {};\n try {\n partialArguments = JSON.parse(untruncateJson(value.arguments));\n } catch (e) {}\n\n currentMessage.partialFunctionCall = {\n name: value.name,\n arguments: partialArguments,\n };\n }\n\n newMessages[newMessages.length - 1] = currentMessage;\n setMessages([...messages, ...newMessages]);\n\n if (value.type === \"function\") {\n // Execute the function call\n try {\n if (options.onFunctionCall && value.scope === \"client\") {\n const result = await options.onFunctionCall(\n messages,\n currentMessage.function_call as FunctionCall,\n );\n\n currentMessage = {\n id: nanoid(),\n role: \"function\",\n content: encodeResult(result),\n name: (currentMessage.function_call! as FunctionCall).name!,\n };\n newMessages.push(currentMessage);\n setMessages([...messages, ...newMessages]);\n\n // After a function call, feed back the new messages to GPT\n feedback = true;\n }\n } catch (error) {\n console.error(\"Failed to execute function call\", error);\n // TODO: Handle error\n // this should go to the message itself\n }\n }\n }\n }\n\n // If we want feedback, run the completion again and return the results\n if (feedback) {\n return await runChatCompletion([...messages, ...newMessages]);\n }\n // otherwise, return the new messages\n else {\n return newMessages.slice();\n }\n } finally {\n setIsLoading(false);\n }\n };\n\n const runChatCompletionAndHandleFunctionCall = async (messages: Message[]): Promise<void> => {\n await runChatCompletion(messages);\n };\n\n const append = async (message: Message): Promise<void> => {\n if (isLoading) {\n return;\n }\n const newMessages = [...messages, message];\n setMessages(newMessages);\n return runChatCompletionAndHandleFunctionCall(newMessages);\n };\n\n const reload = async (): Promise<void> => {\n if (isLoading || messages.length === 0) {\n return;\n }\n let newMessages = [...messages];\n const lastMessage = messages[messages.length - 1];\n\n if (lastMessage.role === \"assistant\") {\n newMessages = newMessages.slice(0, -1);\n }\n setMessages(newMessages);\n\n return runChatCompletionAndHandleFunctionCall(newMessages);\n };\n\n const stop = (): void => {\n abortControllerRef.current?.abort();\n };\n\n return {\n append,\n reload,\n stop,\n isLoading,\n input,\n setInput,\n };\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,QAAQ,gBAAgB;AACjC;AAAA,EAIE;AAAA,EAEA;AAAA,OACK;AAEP,SAAS,cAAc;AAGvB,OAAO,oBAAoB;AAoFpB,SAAS,QAAQ,SAA0D;AAChF,QAAM,EAAE,UAAU,YAAY,IAAI;AAClC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,EAAE;AACrC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,qBAAqB,OAAwB;AACnD,QAAM,cAAc,OAAsB,IAAI;AAC9C,QAAM,WAAW,OAAsB,IAAI;AAC3C,QAAM,eAAe,QAAQ,cAAc;AAC3C,QAAM,UAAU,kCACV,QAAQ,WAAW,CAAC,IACpB,eAAe,EAAE,CAAC,mCAAmC,GA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,gBAAY,WAAW;AACvB,WAAO,uCAAuC,WAAW;AAAA,EAC3D;AAEA,QAAM,SAAS,MAA2B;AACxC,QAAI,aAAa,SAAS,WAAW,GAAG;AACtC;AAAA,IACF;AACA,QAAI,cAAc,CAAC,GAAG,QAAQ;AAC9B,UAAM,cAAc,SAAS,SAAS,SAAS,CAAC;AAEhD,QAAI,YAAY,SAAS,aAAa;AACpC,oBAAc,YAAY,MAAM,GAAG,EAAE;AAAA,IACvC;AACA,gBAAY,WAAW;AAEvB,WAAO,uCAAuC,WAAW;AAAA,EAC3D;AAEA,QAAM,OAAO,MAAY;AA3T3B;AA4TI,6BAAmB,YAAnB,mBAA4B;AAAA,EAC9B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["messages"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defaultCopilotContextCategories
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZYQT5647.mjs";
|
|
4
4
|
import {
|
|
5
5
|
fetchAndDecodeChatCompletion
|
|
6
6
|
} from "./chunk-CGT3AVYT.mjs";
|
|
@@ -13,12 +13,12 @@ var CopilotTask = class {
|
|
|
13
13
|
constructor(config) {
|
|
14
14
|
this.instructions = config.instructions;
|
|
15
15
|
this.actions = config.actions || [];
|
|
16
|
-
this.includeCopilotReadable = config.includeCopilotReadable
|
|
17
|
-
this.
|
|
16
|
+
this.includeCopilotReadable = config.includeCopilotReadable !== false;
|
|
17
|
+
this.includeCopilotActions = config.includeCopilotActions !== false && config.includeCopilotActionable !== false;
|
|
18
18
|
}
|
|
19
19
|
run(context, data) {
|
|
20
20
|
return __async(this, null, function* () {
|
|
21
|
-
const entryPoints = this.
|
|
21
|
+
const entryPoints = this.includeCopilotActions ? Object.assign({}, context.entryPoints) : {};
|
|
22
22
|
for (const fn of this.actions) {
|
|
23
23
|
entryPoints[fn.name] = fn;
|
|
24
24
|
}
|
|
@@ -99,4 +99,4 @@ ${instructions}
|
|
|
99
99
|
export {
|
|
100
100
|
CopilotTask
|
|
101
101
|
};
|
|
102
|
-
//# sourceMappingURL=chunk-
|
|
102
|
+
//# sourceMappingURL=chunk-5ZD5AKJF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/copilot-task.ts"],"sourcesContent":["import { FunctionCall, Message } from \"@copilotkit/shared\";\nimport { FrontendAction } from \"../types/frontend-action\";\nimport { CopilotContextParams } from \"../context\";\nimport { defaultCopilotContextCategories } from \"../components\";\nimport { fetchAndDecodeChatCompletion } from \"../utils/fetch-chat-completion\";\n\nexport interface CopilotTaskConfig {\n /**\n * The instructions to be given to the assistant.\n */\n instructions: string;\n /**\n * Action definitions to be sent to the API.\n */\n actions?: FrontendAction<any>[];\n /**\n * Whether to include the copilot readable context in the task.\n */\n includeCopilotReadable?: boolean;\n\n /**\n * Whether to include actions defined via useCopilotAction in the task.\n * @deprecated Use the `includeCopilotActions` property instead.\n */\n includeCopilotActionable?: boolean;\n\n /**\n * Whether to include actions defined via useCopilotAction in the task.\n */\n includeCopilotActions?: boolean;\n}\n\nexport class CopilotTask<T = any> {\n private instructions: string;\n private actions: FrontendAction<any>[];\n private includeCopilotReadable: boolean;\n private includeCopilotActions: boolean;\n\n constructor(config: CopilotTaskConfig) {\n this.instructions = config.instructions;\n this.actions = config.actions || [];\n this.includeCopilotReadable = config.includeCopilotReadable !== false;\n this.includeCopilotActions =\n config.includeCopilotActions !== false && config.includeCopilotActionable !== false;\n }\n\n async run(context: CopilotContextParams, data?: T): Promise<void> {\n const entryPoints = this.includeCopilotActions ? Object.assign({}, context.entryPoints) : {};\n\n // merge functions into entry points\n for (const fn of this.actions) {\n entryPoints[fn.name] = fn;\n }\n\n let contextString = \"\";\n\n if (data) {\n contextString = (typeof data === \"string\" ? data : JSON.stringify(data)) + \"\\n\\n\";\n }\n\n if (this.includeCopilotReadable) {\n contextString += context.getContextString([], defaultCopilotContextCategories);\n }\n\n const systemMessage: Message = {\n id: \"system\",\n content: taskSystemMessage(contextString, this.instructions),\n role: \"system\",\n };\n\n const messages = [systemMessage];\n\n const response = await fetchAndDecodeChatCompletion({\n copilotConfig: context.copilotApiConfig,\n messages: messages,\n tools: context.getChatCompletionFunctionDescriptions(entryPoints),\n headers: context.copilotApiConfig.headers,\n body: context.copilotApiConfig.body,\n });\n\n if (!response.events) {\n throw new Error(\"Failed to execute task\");\n }\n\n const reader = response.events.getReader();\n let functionCalls: FunctionCall[] = [];\n\n while (true) {\n const { done, value } = await reader.read();\n\n if (done) {\n break;\n }\n\n if (value.type === \"function\") {\n functionCalls.push({\n name: value.name,\n arguments: JSON.stringify(value.arguments),\n });\n break;\n }\n }\n\n if (!functionCalls.length) {\n throw new Error(\"No function call occurred\");\n }\n\n const functionCallHandler = context.getFunctionCallHandler(entryPoints);\n for (const functionCall of functionCalls) {\n await functionCallHandler(messages, functionCall);\n }\n }\n}\n\nfunction taskSystemMessage(contextString: string, instructions: string): string {\n return `\nPlease act as an efficient, competent, conscientious, and industrious professional assistant.\n\nHelp the user achieve their goals, and you do so in a way that is as efficient as possible, without unnecessary fluff, but also without sacrificing professionalism.\nAlways be polite and respectful, and prefer brevity over verbosity.\n\nThe user has provided you with the following context:\n\\`\\`\\`\n${contextString}\n\\`\\`\\`\n\nThey have also provided you with functions you can call to initiate actions on their behalf.\n\nPlease assist them as best you can.\n\nThis is not a conversation, so please do not ask questions. Just call a function without saying anything else.\n\nThe user has given you the following task to complete:\n\n\\`\\`\\`\n${instructions}\n\\`\\`\\`\n`;\n}\n"],"mappings":";;;;;;;;;;;AAgCO,IAAM,cAAN,MAA2B;AAAA,EAMhC,YAAY,QAA2B;AACrC,SAAK,eAAe,OAAO;AAC3B,SAAK,UAAU,OAAO,WAAW,CAAC;AAClC,SAAK,yBAAyB,OAAO,2BAA2B;AAChE,SAAK,wBACH,OAAO,0BAA0B,SAAS,OAAO,6BAA6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,MAC7C;AAEA,YAAM,sBAAsB,QAAQ,uBAAuB,WAAW;AACtE,iBAAW,gBAAgB,eAAe;AACxC,cAAM,oBAAoB,UAAU,YAAY;AAAA,MAClD;AAAA,IACF;AAAA;AACF;AAEA,SAAS,kBAAkB,eAAuB,cAA8B;AAC9E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA;AAAA;AAAA;AAGF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-copilot-action.ts"],"sourcesContent":["import { useRef, useContext, useEffect } from \"react\";\nimport { FrontendAction } from \"../types/frontend-action\";\nimport { CopilotContext } from \"../context/copilot-context\";\nimport { nanoid } from \"nanoid\";\nimport { Parameter } from \"@copilotkit/shared\";\n\n// We implement useCopilotActionImplementation dependency handling so that\n// the developer has the option to not provide any dependencies.\n// In this case, we assume they want to update the handler on each rerender.\n// To avoid getting stuck in an infinite loop, we update the handler directly,\n// skipping React state updates.\n// This is ok in this case, because the handler is not part of any UI that\n// needs to be updated.\n// useCallback, useMemo or other memoization techniques are not suitable here,\n// because they will cause a infinite rerender loop.\nexport function useCopilotAction<const T extends Parameter[] | [] = []>(\n action: FrontendAction<T>,\n dependencies?: any[],\n): void {\n const { setEntryPoint, removeEntryPoint, entryPoints, chatComponentsCache } =\n useContext(CopilotContext);\n const idRef = useRef<string>(nanoid());\n\n // If the developer doesn't provide dependencies, we assume they want to\n // update handler and render function when the action object changes.\n // This ensures that any captured variables in the handler are up to date.\n if (dependencies === undefined) {\n if (entryPoints[idRef.current]) {\n entryPoints[idRef.current].handler = action.handler as any;\n if (typeof action.render === \"function\") {\n if (chatComponentsCache.current !== null) {\n chatComponentsCache.current[action.name] = action.render;\n }\n }\n }\n }\n\n useEffect(() => {\n setEntryPoint(idRef.current, action as any);\n if (chatComponentsCache.current !== null && action.render !== undefined) {\n chatComponentsCache.current[action.name] = action.render;\n }\n return () => {\n // NOTE: For now, we don't remove the chatComponentsCache entry when the action is removed.\n // This is because we currently don't have access to the messages array in CopilotContext.\n removeEntryPoint(idRef.current);\n };\n }, [\n setEntryPoint,\n removeEntryPoint,\n action.description,\n action.name,\n // This should be faster than deep equality checking\n // In addition, all major JS engines guarantee the order of object keys\n JSON.stringify(action.parameters),\n // include render only if it's a string\n typeof action.render === \"string\" ? action.render : undefined,\n // dependencies set by the developer\n ...(dependencies || []),\n ]);\n}\n\n// Usage Example:\n// useCopilotAction({\n// name: \"myAction\",\n// parameters: [\n// { name: \"arg1\", type: \"string\", enum: [\"option1\", \"option2\", \"option3\"], required: false },\n// { name: \"arg2\", type: \"number\" },\n// {\n// name: \"arg3\",\n// type: \"object\",\n// attributes: [\n// { name: \"nestedArg1\", type: \"boolean\" },\n// { name: \"xyz\", required: false },\n// ],\n// },\n// { name: \"arg4\", type: \"number[]\" },\n// ],\n// handler: ({ arg1, arg2, arg3, arg4 }) => {\n// const x = arg3.nestedArg1;\n// const z = arg3.xyz;\n// console.log(arg1, arg2, arg3);\n// },\n// });\n\n// useCopilotAction({\n// name: \"myAction\",\n// handler: () => {\n// console.log(\"No parameters provided.\");\n// },\n// });\n"],"mappings":";;;;;AAAA,SAAS,QAAQ,YAAY,iBAAiB;AAG9C,SAAS,cAAc;AAYhB,SAAS,iBACd,QACA,cACM;AACN,QAAM,EAAE,eAAe,kBAAkB,aAAa,oBAAoB,IACxE,WAAW,cAAc;AAC3B,QAAM,QAAQ,OAAe,OAAO,CAAC;AAKrC,MAAI,iBAAiB,QAAW;AAC9B,QAAI,YAAY,MAAM,OAAO,GAAG;AAC9B,kBAAY,MAAM,OAAO,EAAE,UAAU,OAAO;AAC5C,UAAI,OAAO,OAAO,WAAW,YAAY;AACvC,YAAI,oBAAoB,YAAY,MAAM;AACxC,8BAAoB,QAAQ,OAAO,IAAI,IAAI,OAAO;AAAA,QACpD;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,YAAU,MAAM;AACd,kBAAc,MAAM,SAAS,MAAa;AAC1C,QAAI,oBAAoB,YAAY,QAAQ,OAAO,WAAW,QAAW;AACvE,0BAAoB,QAAQ,OAAO,IAAI,IAAI,OAAO;AAAA,IACpD;AACA,WAAO,MAAM;AAGX,uBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,EACF,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA;AAAA;AAAA,IAGP,KAAK,UAAU,OAAO,UAAU;AAAA;AAAA,IAEhC,OAAO,OAAO,WAAW,WAAW,OAAO,SAAS;AAAA;AAAA,IAEpD,GAAI,gBAAgB,CAAC;AAAA,EACvB,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-EYKDJBDE.mjs.map
|