@copilotkit/react-core 0.17.1-alpha.1 → 0.18.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,8 @@
1
- Debugger attached.
2
1
 
3
- > @copilotkit/react-core@0.17.1-alpha.0 build /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-core
2
+ > @copilotkit/react-core@0.17.1 build /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-core
4
3
  > tsup --treeshake
5
4
 
6
- Debugger attached.
7
- CLI 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-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/openai/chat-completion-client.ts, src/openai/chat-completion-stream.ts, src/openai/chat-completion-transport.ts, src/openai/index.tsx, src/openai-assistants/index.ts, src/types/annotated-function.ts, src/types/base.ts, src/types/document-pointer.ts, src/types/index.ts, src/types/message.ts, src/utils/utils.test.ts, src/utils/utils.ts, src/components/copilot-provider/copilot-provider-props.tsx, src/components/copilot-provider/copilot-provider.tsx, src/components/copilot-provider/index.ts, src/components/copilot-provider/standard-copilot-api-config.tsx, 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
+ CLI Building entry: src/index.tsx, src/context/copilot-context.tsx, src/context/index.ts, src/components/index.ts, src/hooks/index.ts, src/hooks/use-chat.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/openai/chat-completion-client.ts, src/openai/chat-completion-stream.ts, src/openai/chat-completion-transport.ts, src/openai/index.tsx, src/openai-assistants/index.ts, src/types/annotated-function.ts, src/types/base.ts, src/types/document-pointer.ts, src/types/index.ts, src/types/message.ts, src/utils/utils.test.ts, src/utils/utils.ts, src/components/copilot-provider/copilot-provider-props.tsx, src/components/copilot-provider/copilot-provider.tsx, src/components/copilot-provider/index.ts, src/components/copilot-provider/standard-copilot-api-config.tsx, 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
8
6
  CLI Using tsconfig: tsconfig.json
9
7
  CLI tsup v6.7.0
10
8
  CLI Using tsup config: /Users/ataibarkai/LocalGit/Recursively.ai/CopilotKit/CopilotKit/packages/react-core/tsup.config.ts
@@ -33,125 +31,125 @@ Generated an empty chunk: "chunk-VNRDQJXW".
33
31
  Generated an empty chunk: "chunk-5UGLWBZJ".
34
32
  Generated an empty chunk: "chunk-JD7BAH7U".
35
33
  Generated an empty chunk: "chunk-SPCZTZCY".
36
- ESM dist/components/copilot-provider/copilot-provider-props.mjs 84.00 B
37
- ESM dist/types/annotated-function.mjs 80.00 B
38
- ESM dist/types/base.mjs 66.00 B
39
- ESM dist/types/message.mjs 69.00 B
40
- ESM dist/utils/utils.test.mjs 202.00 B
41
- ESM dist/types/document-pointer.mjs 78.00 B
42
- ESM dist/utils/utils.mjs 67.00 B
34
+ ESM dist/chunk-7GFKOIO7.mjs 76.00 B
35
+ ESM dist/openai-assistants/index.mjs 570.00 B
36
+ ESM dist/openai/chat-completion-client.mjs 209.00 B
37
+ ESM dist/context/copilot-context.mjs 164.00 B
38
+ ESM dist/components/index.mjs 380.00 B
39
+ ESM dist/types/index.mjs 98.00 B
40
+ ESM dist/hooks/use-make-copilot-actionable.mjs 218.00 B
43
41
  ESM dist/chunk-BABVSMJR.mjs 76.00 B
42
+ ESM dist/chunk-PUFR5OAI.mjs 76.00 B
44
43
  ESM dist/chunk-FRAKUJWH.mjs 76.00 B
44
+ ESM dist/chunk-EFZPSZWO.mjs 76.00 B
45
45
  ESM dist/chunk-VNRDQJXW.mjs 76.00 B
46
46
  ESM dist/chunk-5UGLWBZJ.mjs 76.00 B
47
- ESM dist/chunk-PUFR5OAI.mjs 76.00 B
48
47
  ESM dist/chunk-JD7BAH7U.mjs 76.00 B
49
48
  ESM dist/chunk-SPCZTZCY.mjs 76.00 B
50
49
  ESM dist/chunk-MRXNTQOX.mjs 1.92 KB
51
50
  ESM dist/chunk-F2JIAPZQ.mjs 435.00 B
52
- ESM dist/chunk-EFZPSZWO.mjs 76.00 B
53
- ESM dist/openai-assistants/utils/process-message-stream.mjs 183.00 B
54
- ESM dist/components/copilot-provider/index.mjs 369.00 B
55
- ESM dist/components/copilot-provider/standard-copilot-api-config.mjs 192.00 B
56
- ESM dist/components/copilot-provider/copilot-provider.mjs 345.00 B
57
- ESM dist/openai-assistants/utils/index.mjs 201.00 B
58
- ESM dist/openai-assistants/index.mjs 570.00 B
59
- ESM dist/chunk-7GFKOIO7.mjs 76.00 B
60
- ESM dist/types/index.mjs 98.00 B
61
- ESM dist/hooks/use-make-copilot-actionable.mjs 218.00 B
62
- ESM dist/hooks/use-make-copilot-readable.mjs 214.00 B
63
51
  ESM dist/hooks/use-make-copilot-document-readable.mjs 231.00 B
64
- ESM dist/openai-assistants/hooks/index.mjs 547.00 B
65
- ESM dist/hooks/use-tree.mjs 170.00 B
66
- ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 548.00 B
52
+ ESM dist/hooks/use-make-copilot-readable.mjs 214.00 B
67
53
  ESM dist/openai/chat-completion-stream.mjs 209.00 B
68
- ESM dist/openai/chat-completion-transport.mjs 183.00 B
69
- ESM dist/openai/chat-completion-client.mjs 209.00 B
70
- ESM dist/openai/index.mjs 224.00 B
71
- ESM dist/index.mjs 1.11 KB
72
54
  ESM dist/chunk-TU4DNDO7.mjs 4.33 KB
55
+ ESM dist/index.mjs 1.11 KB
73
56
  ESM dist/chunk-MZ5UN3BY.mjs 830.00 B
74
57
  ESM dist/chunk-6SOQYBNX.mjs 1.24 KB
75
- ESM dist/components/index.mjs 380.00 B
76
- ESM dist/context/copilot-context.mjs 164.00 B
77
- ESM dist/context/index.mjs 186.00 B
78
- ESM dist/hooks/index.mjs 708.00 B
79
58
  ESM dist/chunk-FP4EXCGS.mjs 954.00 B
59
+ ESM dist/hooks/use-tree.mjs 170.00 B
80
60
  ESM dist/chunk-7P4OYNP3.mjs 677.00 B
81
61
  ESM dist/chunk-HW5IH6PV.mjs 626.00 B
82
62
  ESM dist/hooks/use-chat.mjs 214.00 B
83
- ESM dist/chunk-R75NEA76.mjs 2.71 KB
63
+ ESM dist/chunk-SFQOMKM2.mjs 2.71 KB
84
64
  ESM dist/chunk-QTET3FBV.mjs 5.18 KB
85
- ESM dist/hooks/use-copilot-chat.mjs 507.00 B
86
- ESM dist/chunk-VUY2K2DI.mjs 3.89 KB
87
- ESM dist/chunk-R2WOR4SW.mjs 3.69 KB
65
+ ESM dist/chunk-6A4PCNMZ.mjs 1.30 KB
66
+ ESM dist/context/index.mjs 186.00 B
67
+ ESM dist/chunk-LMZN4NSM.mjs 3.69 KB
88
68
  ESM dist/chunk-TKXPMMND.mjs 5.33 KB
69
+ ESM dist/chunk-VK25FIML.mjs 4.48 KB
89
70
  ESM dist/hooks/use-flat-category-store.mjs 200.00 B
90
71
  ESM dist/chunk-YULKJPY3.mjs 1.87 KB
91
- ESM dist/chunk-VK25FIML.mjs 4.48 KB
92
- ESM dist/chunk-6A4PCNMZ.mjs 1.30 KB
72
+ ESM dist/hooks/use-copilot-chat.mjs 507.00 B
73
+ ESM dist/chunk-VUY2K2DI.mjs 3.89 KB
74
+ ESM dist/hooks/index.mjs 708.00 B
75
+ ESM dist/openai/chat-completion-transport.mjs 183.00 B
76
+ ESM dist/openai/index.mjs 224.00 B
77
+ ESM dist/utils/utils.test.mjs 202.00 B
78
+ ESM dist/components/copilot-provider/copilot-provider-props.mjs 84.00 B
79
+ ESM dist/openai-assistants/utils/process-message-stream.mjs 183.00 B
80
+ ESM dist/openai-assistants/hooks/index.mjs 547.00 B
81
+ ESM dist/types/annotated-function.mjs 80.00 B
82
+ ESM dist/types/message.mjs 69.00 B
83
+ ESM dist/utils/utils.mjs 67.00 B
84
+ ESM dist/types/base.mjs 66.00 B
85
+ ESM dist/components/copilot-provider/copilot-provider.mjs 345.00 B
86
+ ESM dist/components/copilot-provider/standard-copilot-api-config.mjs 192.00 B
87
+ ESM dist/types/document-pointer.mjs 78.00 B
88
+ ESM dist/components/copilot-provider/index.mjs 369.00 B
89
+ ESM dist/openai-assistants/utils/index.mjs 201.00 B
93
90
  ESM dist/openai-assistants/hooks/use-assistants.mjs 2.55 KB
94
- ESM dist/components/copilot-provider/copilot-provider-props.mjs.map 51.00 B
95
- ESM dist/utils/utils.test.mjs.map 351.00 B
96
- ESM dist/types/annotated-function.mjs.map 51.00 B
97
- ESM dist/utils/utils.mjs.map 51.00 B
98
- ESM dist/types/base.mjs.map 51.00 B
91
+ ESM dist/chunk-7GFKOIO7.mjs.map 51.00 B
92
+ ESM dist/openai/chat-completion-client.mjs.map 51.00 B
93
+ ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs 548.00 B
94
+ ESM dist/openai-assistants/index.mjs.map 51.00 B
95
+ ESM dist/context/copilot-context.mjs.map 51.00 B
96
+ ESM dist/components/index.mjs.map 51.00 B
97
+ ESM dist/hooks/use-make-copilot-actionable.mjs.map 51.00 B
99
98
  ESM dist/chunk-BABVSMJR.mjs.map 51.00 B
99
+ ESM dist/chunk-PUFR5OAI.mjs.map 51.00 B
100
100
  ESM dist/chunk-FRAKUJWH.mjs.map 51.00 B
101
+ ESM dist/chunk-EFZPSZWO.mjs.map 51.00 B
101
102
  ESM dist/chunk-VNRDQJXW.mjs.map 51.00 B
102
- ESM dist/chunk-PUFR5OAI.mjs.map 51.00 B
103
- ESM dist/chunk-JD7BAH7U.mjs.map 51.00 B
103
+ ESM dist/chunk-5UGLWBZJ.mjs.map 51.00 B
104
+ ESM dist/chunk-SPCZTZCY.mjs.map 51.00 B
104
105
  ESM dist/chunk-F2JIAPZQ.mjs.map 1.12 KB
105
- ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
106
- ESM dist/chunk-EFZPSZWO.mjs.map 51.00 B
107
- ESM dist/openai-assistants/utils/process-message-stream.mjs.map 51.00 B
108
- ESM dist/components/copilot-provider/index.mjs.map 51.00 B
109
- ESM dist/components/copilot-provider/standard-copilot-api-config.mjs.map 51.00 B
110
- ESM dist/components/copilot-provider/copilot-provider.mjs.map 51.00 B
111
- ESM dist/openai-assistants/index.mjs.map 51.00 B
112
- ESM dist/chunk-7GFKOIO7.mjs.map 51.00 B
113
- ESM dist/types/index.mjs.map 51.00 B
114
- ESM dist/hooks/use-make-copilot-actionable.mjs.map 51.00 B
115
106
  ESM dist/hooks/use-make-copilot-readable.mjs.map 51.00 B
116
- ESM dist/hooks/use-make-copilot-document-readable.mjs.map 51.00 B
117
- ESM dist/openai-assistants/hooks/index.mjs.map 51.00 B
118
- ESM dist/hooks/use-tree.mjs.map 51.00 B
119
- ESM dist/types/message.mjs.map 51.00 B
120
- ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 51.00 B
121
107
  ESM dist/openai/chat-completion-stream.mjs.map 51.00 B
122
- ESM dist/types/document-pointer.mjs.map 51.00 B
123
- ESM dist/openai/chat-completion-transport.mjs.map 51.00 B
124
- ESM dist/openai/chat-completion-client.mjs.map 51.00 B
125
- ESM dist/chunk-5UGLWBZJ.mjs.map 51.00 B
126
- ESM dist/index.mjs.map 51.00 B
127
- ESM dist/chunk-SPCZTZCY.mjs.map 51.00 B
128
- ESM dist/openai/index.mjs.map 51.00 B
129
108
  ESM dist/chunk-TU4DNDO7.mjs.map 7.90 KB
109
+ ESM dist/index.mjs.map 51.00 B
130
110
  ESM dist/chunk-MZ5UN3BY.mjs.map 1.26 KB
131
111
  ESM dist/chunk-6SOQYBNX.mjs.map 2.07 KB
132
- ESM dist/components/index.mjs.map 51.00 B
133
- ESM dist/context/copilot-context.mjs.map 51.00 B
134
- ESM dist/context/index.mjs.map 51.00 B
135
112
  ESM dist/chunk-FP4EXCGS.mjs.map 1.67 KB
136
- ESM dist/hooks/index.mjs.map 51.00 B
137
- ESM dist/chunk-HW5IH6PV.mjs.map 1.47 KB
113
+ ESM dist/chunk-7P4OYNP3.mjs.map 1.42 KB
138
114
  ESM dist/hooks/use-chat.mjs.map 51.00 B
139
- ESM dist/chunk-R75NEA76.mjs.map 4.37 KB
140
- ESM dist/openai-assistants/utils/index.mjs.map 51.00 B
141
- ESM dist/hooks/use-copilot-chat.mjs.map 51.00 B
142
- ESM dist/chunk-R2WOR4SW.mjs.map 8.47 KB
115
+ ESM dist/hooks/use-tree.mjs.map 51.00 B
116
+ ESM dist/chunk-SFQOMKM2.mjs.map 4.37 KB
117
+ ESM dist/chunk-QTET3FBV.mjs.map 11.03 KB
118
+ ESM dist/context/index.mjs.map 51.00 B
119
+ ESM dist/chunk-LMZN4NSM.mjs.map 8.47 KB
143
120
  ESM dist/chunk-TKXPMMND.mjs.map 9.93 KB
121
+ ESM dist/chunk-VK25FIML.mjs.map 7.84 KB
144
122
  ESM dist/hooks/use-flat-category-store.mjs.map 51.00 B
145
123
  ESM dist/chunk-YULKJPY3.mjs.map 4.21 KB
146
- ESM dist/chunk-VK25FIML.mjs.map 7.84 KB
124
+ ESM dist/types/index.mjs.map 51.00 B
125
+ ESM dist/hooks/use-copilot-chat.mjs.map 51.00 B
126
+ ESM dist/hooks/use-make-copilot-document-readable.mjs.map 51.00 B
147
127
  ESM dist/chunk-VUY2K2DI.mjs.map 8.27 KB
128
+ ESM dist/chunk-MRXNTQOX.mjs.map 71.00 B
129
+ ESM dist/hooks/index.mjs.map 51.00 B
148
130
  ESM dist/chunk-6A4PCNMZ.mjs.map 4.26 KB
131
+ ESM dist/openai/chat-completion-transport.mjs.map 51.00 B
132
+ ESM dist/chunk-HW5IH6PV.mjs.map 1.47 KB
133
+ ESM dist/openai/index.mjs.map 51.00 B
134
+ ESM dist/utils/utils.test.mjs.map 351.00 B
135
+ ESM dist/components/copilot-provider/copilot-provider-props.mjs.map 51.00 B
136
+ ESM dist/openai-assistants/utils/process-message-stream.mjs.map 51.00 B
137
+ ESM dist/chunk-JD7BAH7U.mjs.map 51.00 B
138
+ ESM dist/types/annotated-function.mjs.map 51.00 B
139
+ ESM dist/types/message.mjs.map 51.00 B
140
+ ESM dist/utils/utils.mjs.map 51.00 B
141
+ ESM dist/types/base.mjs.map 51.00 B
142
+ ESM dist/components/copilot-provider/copilot-provider.mjs.map 51.00 B
143
+ ESM dist/components/copilot-provider/standard-copilot-api-config.mjs.map 51.00 B
144
+ ESM dist/types/document-pointer.mjs.map 51.00 B
145
+ ESM dist/openai-assistants/utils/index.mjs.map 51.00 B
149
146
  ESM dist/openai-assistants/hooks/use-assistants.mjs.map 4.67 KB
150
- ESM dist/chunk-7P4OYNP3.mjs.map 1.42 KB
151
- ESM dist/chunk-QTET3FBV.mjs.map 11.03 KB
152
- ESM ⚡️ Build success in 405ms
147
+ ESM dist/openai-assistants/hooks/index.mjs.map 51.00 B
148
+ ESM dist/openai-assistants/hooks/use-copilot-chat-v2.mjs.map 51.00 B
149
+ ESM dist/components/copilot-provider/index.mjs.map 51.00 B
150
+ ESM ⚡️ Build success in 149ms
153
151
  DTS Build start
154
- DTS ⚡️ Build success in 3554ms
152
+ DTS ⚡️ Build success in 2992ms
155
153
  DTS dist/index.d.ts 1.61 KB
156
154
  DTS dist/components/copilot-provider/copilot-provider.d.ts 1.55 KB
157
155
  DTS dist/components/copilot-provider/copilot-provider-props.d.ts 1.52 KB
@@ -169,8 +167,8 @@ DTS dist/openai-assistants/utils/process-message-stream.d.ts 196.00 B
169
167
  DTS dist/openai/chat-completion-stream.d.ts 694.00 B
170
168
  DTS dist/openai/chat-completion-transport.d.ts 1.26 KB
171
169
  DTS dist/hooks/use-tree.d.ts 543.00 B
172
- DTS dist/components/index.d.ts 482.00 B
173
170
  DTS dist/context/index.d.ts 281.00 B
171
+ DTS dist/components/index.d.ts 482.00 B
174
172
  DTS dist/hooks/index.d.ts 608.00 B
175
173
  DTS dist/hooks/use-flat-category-store.d.ts 424.00 B
176
174
  DTS dist/openai/chat-completion-client.d.ts 1.44 KB
@@ -185,5 +183,3 @@ DTS dist/components/copilot-provider/standard-copilot-api-config.d.ts 911.00 B
185
183
  DTS dist/openai-assistants/hooks/index.d.ts 182.00 B
186
184
  DTS dist/openai-assistants/hooks/use-assistants.d.ts 551.00 B
187
185
  DTS dist/openai-assistants/utils/index.d.ts 68.00 B
188
- Waiting for the debugger to disconnect...
189
- Waiting for the debugger to disconnect...
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # ui
2
2
 
3
+ ## 0.18.0-alpha.0
4
+
5
+ ### Minor Changes
6
+
7
+ - propagate makeSystemMessage through CopilotSidebarUIProvider
8
+
9
+ ## 0.17.1
10
+
11
+ ### Patch Changes
12
+
13
+ - stop generating button working
14
+ - aa6bc5a: fix stop generate
15
+ - cf0bde6: change order of operations on stop cleanup
16
+ - Updated dependencies
17
+ - Updated dependencies [aa6bc5a]
18
+ - Updated dependencies [cf0bde6]
19
+ - @copilotkit/shared@0.1.1
20
+
3
21
  ## 0.17.1-alpha.1
4
22
 
5
23
  ### Patch Changes
@@ -30,8 +30,8 @@ function useChat(options) {
30
30
  abortControllerRef.current = void 0;
31
31
  };
32
32
  abortController.signal.addEventListener("abort", () => {
33
- cleanup();
34
33
  setIsLoading(false);
34
+ cleanup();
35
35
  reject(new DOMException("Aborted", "AbortError"));
36
36
  });
37
37
  client.on("content", (content) => {
@@ -110,4 +110,4 @@ function useChat(options) {
110
110
 
111
111
  export { useChat };
112
112
  //# sourceMappingURL=out.js.map
113
- //# sourceMappingURL=chunk-R2WOR4SW.mjs.map
113
+ //# source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AY,MAAM,GAAG,EAAE;AAAA,IACvC;AACA,gBAAY,WAAW;AAEvB,WAAO,uCAAuC,WAAW;AAAA,EAC3D;AAEA,QAAM,OAAO,MAAY;AAlM3B;AAmMI,6BAAmB,YAAnB,mBAA4B;AAAA,EAC9B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF","sourcesContent":["import { useRef, useState } from \"react\";\nimport { Message, Function, FunctionCallHandler } from \"../types\";\nimport { nanoid } from \"nanoid\";\nimport { ChatCompletionClient } from \"../openai/chat-completion-client\";\nimport { CopilotApiConfig } from \"../context\";\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 functions?: Function[];\n};\n\nexport type UseChatHelpers = {\n /** Current messages in the chat */\n messages: Message[];\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\nexport function useChat(options: UseChatOptionsWithCopilotConfig): UseChatHelpers {\n const [messages, setMessages] = useState<Message[]>([]);\n const [input, setInput] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n const abortControllerRef = useRef<AbortController>();\n\n const runChatCompletion = async (messages: Message[]): Promise<Message> => {\n return new Promise<Message>((resolve, reject) => {\n setIsLoading(true);\n\n const abortController = new AbortController();\n abortControllerRef.current = abortController;\n\n const assistantMessage: Message = {\n id: nanoid(),\n createdAt: new Date(),\n content: \"\",\n role: \"assistant\",\n };\n\n // Assistant messages are always copied when using setState\n setMessages([...messages, { ...assistantMessage }]);\n\n const messagesWithContext = [...(options.initialMessages || []), ...messages];\n\n const client = new ChatCompletionClient({});\n\n const cleanup = () => {\n client.off(\"content\");\n client.off(\"end\");\n client.off(\"error\");\n client.off(\"function\");\n\n abortControllerRef.current = undefined;\n };\n\n abortController.signal.addEventListener(\"abort\", () => {\n cleanup();\n setIsLoading(false);\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n });\n\n client.on(\"content\", (content) => {\n assistantMessage.content += content;\n setMessages([...messages, { ...assistantMessage }]);\n });\n\n client.on(\"end\", () => {\n setIsLoading(false);\n cleanup();\n resolve({ ...assistantMessage });\n });\n\n client.on(\"error\", (error) => {\n setIsLoading(false);\n cleanup();\n reject(error);\n });\n\n client.on(\"function\", async (functionCall) => {\n assistantMessage.function_call = {\n name: functionCall.name,\n arguments: JSON.stringify(functionCall.arguments),\n };\n setMessages([...messages, { ...assistantMessage }]);\n // quit early if we get a function call\n setIsLoading(false);\n cleanup();\n resolve({ ...assistantMessage });\n });\n\n client.fetch({\n copilotConfig: options.copilotConfig,\n messages: messagesWithContext,\n functions: options.functions,\n headers: options.headers,\n signal: abortController.signal,\n });\n });\n };\n\n const runChatCompletionAndHandleFunctionCall = async (messages: Message[]): Promise<void> => {\n const message = await runChatCompletion(messages);\n if (message.function_call && options.onFunctionCall) {\n await options.onFunctionCall(messages, message.function_call);\n }\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 messages,\n append,\n reload,\n stop,\n isLoading,\n input,\n setInput,\n };\n}\n"]}
1
+ {"version":3,"sources":["../src/hooks/use-chat.ts"],"names":["messages"],"mappings":";;;;;;;;;AAAA,SAAS,QAAQ,gBAAgB;AAEjC,SAAS,cAAc;AAgFhB,SAAS,QAAQ,SAA0D;AAChF,QAAM,CAAC,UAAU,WAAW,IAAI,SAAoB,CAAC,CAAC;AACtD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,EAAE;AACrC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,qBAAqB,OAAwB;AAEnD,QAAM,oBAAoB,CAAOA,cAA0C;AACzE,WAAO,IAAI,QAAiB,CAAC,SAAS,WAAW;AAC/C,mBAAa,IAAI;AAEjB,YAAM,kBAAkB,IAAI,gBAAgB;AAC5C,yBAAmB,UAAU;AAE7B,YAAM,mBAA4B;AAAA,QAChC,IAAI,OAAO;AAAA,QACX,WAAW,oBAAI,KAAK;AAAA,QACpB,SAAS;AAAA,QACT,MAAM;AAAA,MACR;AAGA,kBAAY,CAAC,GAAGA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EACH;AAEA,QAAM,yCAAyC,CAAOA,cAAuC;AAC3F,UAAM,UAAU,MAAM,kBAAkBA,SAAQ;AAChD,QAAI,QAAQ,iBAAiB,QAAQ,gBAAgB;AACnD,YAAM,QAAQ,eAAeA,WAAU,QAAQ,aAAa;AAAA,IAC9D;AAAA,EACF;AAEA,QAAM,SAAS,CAAO,YAAoC;AACxD,QAAI,WAAW;AACb;AAAA,IACF;AACA,UAAM,cAAc,CAAC,GAAG,UAAU,OAAO;AACzC,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;AAlM3B;AAmMI,6BAAmB,YAAnB,mBAA4B;AAAA,EAC9B;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF","sourcesContent":["import { useRef, useState } from \"react\";\nimport { Message, Function, FunctionCallHandler } from \"../types\";\nimport { nanoid } from \"nanoid\";\nimport { ChatCompletionClient } from \"../openai/chat-completion-client\";\nimport { CopilotApiConfig } from \"../context\";\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 functions?: Function[];\n};\n\nexport type UseChatHelpers = {\n /** Current messages in the chat */\n messages: Message[];\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\nexport function useChat(options: UseChatOptionsWithCopilotConfig): UseChatHelpers {\n const [messages, setMessages] = useState<Message[]>([]);\n const [input, setInput] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n const abortControllerRef = useRef<AbortController>();\n\n const runChatCompletion = async (messages: Message[]): Promise<Message> => {\n return new Promise<Message>((resolve, reject) => {\n setIsLoading(true);\n\n const abortController = new AbortController();\n abortControllerRef.current = abortController;\n\n const assistantMessage: Message = {\n id: nanoid(),\n createdAt: new Date(),\n content: \"\",\n role: \"assistant\",\n };\n\n // Assistant messages are always copied when using setState\n setMessages([...messages, { ...assistantMessage }]);\n\n const messagesWithContext = [...(options.initialMessages || []), ...messages];\n\n const client = new ChatCompletionClient({});\n\n const cleanup = () => {\n client.off(\"content\");\n client.off(\"end\");\n client.off(\"error\");\n client.off(\"function\");\n\n abortControllerRef.current = undefined;\n };\n\n abortController.signal.addEventListener(\"abort\", () => {\n setIsLoading(false);\n cleanup();\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n });\n\n client.on(\"content\", (content) => {\n assistantMessage.content += content;\n setMessages([...messages, { ...assistantMessage }]);\n });\n\n client.on(\"end\", () => {\n setIsLoading(false);\n cleanup();\n resolve({ ...assistantMessage });\n });\n\n client.on(\"error\", (error) => {\n setIsLoading(false);\n cleanup();\n reject(error);\n });\n\n client.on(\"function\", async (functionCall) => {\n assistantMessage.function_call = {\n name: functionCall.name,\n arguments: JSON.stringify(functionCall.arguments),\n };\n setMessages([...messages, { ...assistantMessage }]);\n // quit early if we get a function call\n setIsLoading(false);\n cleanup();\n resolve({ ...assistantMessage });\n });\n\n client.fetch({\n copilotConfig: options.copilotConfig,\n messages: messagesWithContext,\n functions: options.functions,\n headers: options.headers,\n signal: abortController.signal,\n });\n });\n };\n\n const runChatCompletionAndHandleFunctionCall = async (messages: Message[]): Promise<void> => {\n const message = await runChatCompletion(messages);\n if (message.function_call && options.onFunctionCall) {\n await options.onFunctionCall(messages, message.function_call);\n }\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 messages,\n append,\n reload,\n stop,\n isLoading,\n input,\n setInput,\n };\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { defaultCopilotContextCategories } from './chunk-QTET3FBV.mjs';
2
2
  import { CopilotContext } from './chunk-6A4PCNMZ.mjs';
3
- import { useChat } from './chunk-R2WOR4SW.mjs';
3
+ import { useChat } from './chunk-LMZN4NSM.mjs';
4
4
  import { __objRest, __spreadProps, __spreadValues } from './chunk-MRXNTQOX.mjs';
5
5
  import { useContext, useMemo } from 'react';
6
6
 
@@ -74,4 +74,4 @@ If you would like to call a function, call it without saying anything else.
74
74
 
75
75
  export { defaultSystemMessage, useCopilotChat };
76
76
  //# sourceMappingURL=out.js.map
77
- //# sourceMappingURL=chunk-R75NEA76.mjs.map
77
+ //# sourceMappingURL=chunk-SFQOMKM2.mjs.map
@@ -2,14 +2,14 @@ import '../chunk-5UGLWBZJ.mjs';
2
2
  export { useMakeCopilotActionable } from '../chunk-FP4EXCGS.mjs';
3
3
  export { useMakeCopilotDocumentReadable } from '../chunk-7P4OYNP3.mjs';
4
4
  export { useMakeCopilotReadable } from '../chunk-HW5IH6PV.mjs';
5
- export { useCopilotChat } from '../chunk-R75NEA76.mjs';
5
+ export { useCopilotChat } from '../chunk-SFQOMKM2.mjs';
6
6
  import '../chunk-JD7BAH7U.mjs';
7
7
  import '../chunk-SPCZTZCY.mjs';
8
8
  import '../chunk-QTET3FBV.mjs';
9
9
  import '../chunk-F2JIAPZQ.mjs';
10
10
  import '../chunk-VUY2K2DI.mjs';
11
11
  import '../chunk-6A4PCNMZ.mjs';
12
- import '../chunk-R2WOR4SW.mjs';
12
+ import '../chunk-LMZN4NSM.mjs';
13
13
  import '../chunk-TKXPMMND.mjs';
14
14
  import '../chunk-VK25FIML.mjs';
15
15
  import '../chunk-YULKJPY3.mjs';
@@ -1,4 +1,4 @@
1
- export { useChat } from '../chunk-R2WOR4SW.mjs';
1
+ export { useChat } from '../chunk-LMZN4NSM.mjs';
2
2
  import '../chunk-TKXPMMND.mjs';
3
3
  import '../chunk-VK25FIML.mjs';
4
4
  import '../chunk-MRXNTQOX.mjs';
@@ -1,11 +1,11 @@
1
- export { defaultSystemMessage, useCopilotChat } from '../chunk-R75NEA76.mjs';
1
+ export { defaultSystemMessage, useCopilotChat } from '../chunk-SFQOMKM2.mjs';
2
2
  import '../chunk-JD7BAH7U.mjs';
3
3
  import '../chunk-SPCZTZCY.mjs';
4
4
  import '../chunk-QTET3FBV.mjs';
5
5
  import '../chunk-F2JIAPZQ.mjs';
6
6
  import '../chunk-VUY2K2DI.mjs';
7
7
  import '../chunk-6A4PCNMZ.mjs';
8
- import '../chunk-R2WOR4SW.mjs';
8
+ import '../chunk-LMZN4NSM.mjs';
9
9
  import '../chunk-TKXPMMND.mjs';
10
10
  import '../chunk-VK25FIML.mjs';
11
11
  import '../chunk-YULKJPY3.mjs';
package/dist/index.mjs CHANGED
@@ -11,14 +11,14 @@ import './chunk-5UGLWBZJ.mjs';
11
11
  export { useMakeCopilotActionable } from './chunk-FP4EXCGS.mjs';
12
12
  export { useMakeCopilotDocumentReadable } from './chunk-7P4OYNP3.mjs';
13
13
  export { useMakeCopilotReadable } from './chunk-HW5IH6PV.mjs';
14
- export { useCopilotChat } from './chunk-R75NEA76.mjs';
14
+ export { useCopilotChat } from './chunk-SFQOMKM2.mjs';
15
15
  import './chunk-JD7BAH7U.mjs';
16
16
  import './chunk-SPCZTZCY.mjs';
17
17
  export { CopilotProvider, defaultCopilotContextCategories } from './chunk-QTET3FBV.mjs';
18
18
  import './chunk-F2JIAPZQ.mjs';
19
19
  import './chunk-VUY2K2DI.mjs';
20
20
  export { CopilotContext } from './chunk-6A4PCNMZ.mjs';
21
- import './chunk-R2WOR4SW.mjs';
21
+ import './chunk-LMZN4NSM.mjs';
22
22
  import './chunk-TKXPMMND.mjs';
23
23
  import './chunk-VK25FIML.mjs';
24
24
  import './chunk-YULKJPY3.mjs';
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.17.1-alpha.1",
7
+ "version": "0.18.0-alpha.0",
8
8
  "sideEffects": false,
9
9
  "main": "./dist/index.js",
10
10
  "module": "./dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  "eventemitter3": "^5.0.1",
31
31
  "nanoid": "^4.0.2",
32
32
  "openai": "^4.6.0",
33
- "@copilotkit/shared": "0.1.1-alpha.1"
33
+ "@copilotkit/shared": "0.1.1"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsup --treeshake",