@yourgpt/copilot-sdk 2.1.8 → 2.5.1-beta.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.
- package/dist/{chunk-JFVTY757.cjs → chunk-6R63NBNP.cjs} +16 -16
- package/dist/{chunk-JFVTY757.cjs.map → chunk-6R63NBNP.cjs.map} +1 -1
- package/dist/{chunk-ISOMZAYN.js → chunk-JPUKXFR4.js} +8 -4
- package/dist/chunk-JPUKXFR4.js.map +1 -0
- package/dist/{chunk-H3LX6FTP.js → chunk-YYLTWY5R.js} +3 -3
- package/dist/{chunk-H3LX6FTP.js.map → chunk-YYLTWY5R.js.map} +1 -1
- package/dist/{chunk-IDAQU3FP.cjs → chunk-ZYLHGNIG.cjs} +8 -4
- package/dist/chunk-ZYLHGNIG.cjs.map +1 -0
- package/dist/experimental/index.cjs +2 -2
- package/dist/experimental/index.js +1 -1
- package/dist/react/index.cjs +62 -62
- package/dist/react/index.d.cts +2 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +2 -2
- package/dist/ui/index.cjs +26 -11
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +6 -1
- package/dist/ui/index.d.ts +6 -1
- package/dist/ui/index.js +23 -8
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-IDAQU3FP.cjs.map +0 -1
- package/dist/chunk-ISOMZAYN.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk5EGBIQYS_cjs = require('../chunk-5EGBIQYS.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkZYLHGNIG_cjs = require('../chunk-ZYLHGNIG.cjs');
|
|
5
5
|
require('../chunk-7GWEW2DU.cjs');
|
|
6
6
|
require('../chunk-JGPDQDY4.cjs');
|
|
7
7
|
require('../chunk-BJYA5NDL.cjs');
|
|
@@ -530,7 +530,7 @@ function useGenerativeUI(config = {}) {
|
|
|
530
530
|
const toolName = config.name ?? "render_ui";
|
|
531
531
|
const configRef = React__namespace.useRef(config);
|
|
532
532
|
configRef.current = config;
|
|
533
|
-
|
|
533
|
+
chunkZYLHGNIG_cjs.useTool({
|
|
534
534
|
name: toolName,
|
|
535
535
|
description: "Renders a rich UI component inline in the chat. Handled automatically by the SDK.",
|
|
536
536
|
inputSchema: RENDER_UI_SCHEMA,
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunk6R63NBNP_cjs = require('../chunk-6R63NBNP.cjs');
|
|
4
|
+
var chunkZYLHGNIG_cjs = require('../chunk-ZYLHGNIG.cjs');
|
|
5
5
|
var chunk7GWEW2DU_cjs = require('../chunk-7GWEW2DU.cjs');
|
|
6
6
|
require('../chunk-JGPDQDY4.cjs');
|
|
7
7
|
require('../chunk-BJYA5NDL.cjs');
|
|
@@ -22,243 +22,243 @@ require('../chunk-JEQ2X3Z6.cjs');
|
|
|
22
22
|
|
|
23
23
|
Object.defineProperty(exports, "ReactChat", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk6R63NBNP_cjs.ReactChat; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "ReactThreadManager", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk6R63NBNP_cjs.ReactThreadManager; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "ReactThreadManagerState", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk6R63NBNP_cjs.ReactThreadManagerState; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "createMessageIntentHandler", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunk6R63NBNP_cjs.createMessageIntentHandler; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "createPermissionStorage", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunk6R63NBNP_cjs.createPermissionStorage; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "createReactChat", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunk6R63NBNP_cjs.createReactChat; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "createReactThreadManager", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunk6R63NBNP_cjs.createReactThreadManager; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "createReactThreadManagerState", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunk6R63NBNP_cjs.createReactThreadManagerState; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "createSessionPermissionCache", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk6R63NBNP_cjs.createSessionPermissionCache; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "createToolIntentHandler", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk6R63NBNP_cjs.createToolIntentHandler; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "defineSkill", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunk6R63NBNP_cjs.defineSkill; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "formatKnowledgeResultsForAI", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunk6R63NBNP_cjs.formatKnowledgeResultsForAI; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "searchKnowledgeBase", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunk6R63NBNP_cjs.searchKnowledgeBase; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "useAIAction", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunk6R63NBNP_cjs.useAIAction; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "useAIActions", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunk6R63NBNP_cjs.useAIActions; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "useAITools", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunk6R63NBNP_cjs.useAITools; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "useAgent", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunk6R63NBNP_cjs.useAgent; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "useCapabilities", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunk6R63NBNP_cjs.useCapabilities; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "useChat", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunk6R63NBNP_cjs.useChat; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "useContextStats", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunk6R63NBNP_cjs.useContextStats; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "useCopilotEvent", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunk6R63NBNP_cjs.useCopilotEvent; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "useDevLogger", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunk6R63NBNP_cjs.useDevLogger; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "useFeatureSupport", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunk6R63NBNP_cjs.useFeatureSupport; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "useKnowledgeBase", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunk6R63NBNP_cjs.useKnowledgeBase; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "useMCPUIIntents", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunk6R63NBNP_cjs.useMCPUIIntents; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "useMessageCheckpoints", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunk6R63NBNP_cjs.useMessageCheckpoints; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "useMessageMeta", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunk6R63NBNP_cjs.useMessageMeta; }
|
|
130
130
|
});
|
|
131
131
|
Object.defineProperty(exports, "useSkill", {
|
|
132
132
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunk6R63NBNP_cjs.useSkill; }
|
|
134
134
|
});
|
|
135
135
|
Object.defineProperty(exports, "useSkillStatus", {
|
|
136
136
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunk6R63NBNP_cjs.useSkillStatus; }
|
|
138
138
|
});
|
|
139
139
|
Object.defineProperty(exports, "useSuggestions", {
|
|
140
140
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunk6R63NBNP_cjs.useSuggestions; }
|
|
142
142
|
});
|
|
143
143
|
Object.defineProperty(exports, "useSupportedMediaTypes", {
|
|
144
144
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunk6R63NBNP_cjs.useSupportedMediaTypes; }
|
|
146
146
|
});
|
|
147
147
|
Object.defineProperty(exports, "useThread", {
|
|
148
148
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunk6R63NBNP_cjs.useThread; }
|
|
150
150
|
});
|
|
151
151
|
Object.defineProperty(exports, "useThreadManager", {
|
|
152
152
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunk6R63NBNP_cjs.useThreadManager; }
|
|
154
154
|
});
|
|
155
155
|
Object.defineProperty(exports, "useToolExecutor", {
|
|
156
156
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunk6R63NBNP_cjs.useToolExecutor; }
|
|
158
158
|
});
|
|
159
159
|
Object.defineProperty(exports, "useToolWithSchema", {
|
|
160
160
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunk6R63NBNP_cjs.useToolWithSchema; }
|
|
162
162
|
});
|
|
163
163
|
Object.defineProperty(exports, "useToolsWithSchema", {
|
|
164
164
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunk6R63NBNP_cjs.useToolsWithSchema; }
|
|
166
166
|
});
|
|
167
167
|
Object.defineProperty(exports, "AbstractAgentLoop", {
|
|
168
168
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkZYLHGNIG_cjs.AbstractAgentLoop; }
|
|
170
170
|
});
|
|
171
171
|
Object.defineProperty(exports, "AbstractChat", {
|
|
172
172
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkZYLHGNIG_cjs.AbstractChat; }
|
|
174
174
|
});
|
|
175
175
|
Object.defineProperty(exports, "CopilotProvider", {
|
|
176
176
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunkZYLHGNIG_cjs.CopilotProvider; }
|
|
178
178
|
});
|
|
179
179
|
Object.defineProperty(exports, "MessageHistoryContext", {
|
|
180
180
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
181
|
+
get: function () { return chunkZYLHGNIG_cjs.MessageHistoryContext; }
|
|
182
182
|
});
|
|
183
183
|
Object.defineProperty(exports, "MessageTree", {
|
|
184
184
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
185
|
+
get: function () { return chunkZYLHGNIG_cjs.MessageTree; }
|
|
186
186
|
});
|
|
187
187
|
Object.defineProperty(exports, "ReactChatState", {
|
|
188
188
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
189
|
+
get: function () { return chunkZYLHGNIG_cjs.ReactChatState; }
|
|
190
190
|
});
|
|
191
191
|
Object.defineProperty(exports, "SkillProvider", {
|
|
192
192
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
193
|
+
get: function () { return chunkZYLHGNIG_cjs.SkillProvider; }
|
|
194
194
|
});
|
|
195
195
|
Object.defineProperty(exports, "createReactChatState", {
|
|
196
196
|
enumerable: true,
|
|
197
|
-
get: function () { return
|
|
197
|
+
get: function () { return chunkZYLHGNIG_cjs.createReactChatState; }
|
|
198
198
|
});
|
|
199
199
|
Object.defineProperty(exports, "defaultMessageHistoryConfig", {
|
|
200
200
|
enumerable: true,
|
|
201
|
-
get: function () { return
|
|
201
|
+
get: function () { return chunkZYLHGNIG_cjs.defaultMessageHistoryConfig; }
|
|
202
202
|
});
|
|
203
203
|
Object.defineProperty(exports, "initialAgentLoopState", {
|
|
204
204
|
enumerable: true,
|
|
205
|
-
get: function () { return
|
|
205
|
+
get: function () { return chunkZYLHGNIG_cjs.initialAgentLoopState; }
|
|
206
206
|
});
|
|
207
207
|
Object.defineProperty(exports, "isCompactionMarker", {
|
|
208
208
|
enumerable: true,
|
|
209
|
-
get: function () { return
|
|
209
|
+
get: function () { return chunkZYLHGNIG_cjs.isCompactionMarker; }
|
|
210
210
|
});
|
|
211
211
|
Object.defineProperty(exports, "keepToolPairsAtomic", {
|
|
212
212
|
enumerable: true,
|
|
213
|
-
get: function () { return
|
|
213
|
+
get: function () { return chunkZYLHGNIG_cjs.keepToolPairsAtomic; }
|
|
214
214
|
});
|
|
215
215
|
Object.defineProperty(exports, "toDisplayMessage", {
|
|
216
216
|
enumerable: true,
|
|
217
|
-
get: function () { return
|
|
217
|
+
get: function () { return chunkZYLHGNIG_cjs.toDisplayMessage; }
|
|
218
218
|
});
|
|
219
219
|
Object.defineProperty(exports, "toLLMMessage", {
|
|
220
220
|
enumerable: true,
|
|
221
|
-
get: function () { return
|
|
221
|
+
get: function () { return chunkZYLHGNIG_cjs.toLLMMessage; }
|
|
222
222
|
});
|
|
223
223
|
Object.defineProperty(exports, "toLLMMessages", {
|
|
224
224
|
enumerable: true,
|
|
225
|
-
get: function () { return
|
|
225
|
+
get: function () { return chunkZYLHGNIG_cjs.toLLMMessages; }
|
|
226
226
|
});
|
|
227
227
|
Object.defineProperty(exports, "useAIContext", {
|
|
228
228
|
enumerable: true,
|
|
229
|
-
get: function () { return
|
|
229
|
+
get: function () { return chunkZYLHGNIG_cjs.useAIContext; }
|
|
230
230
|
});
|
|
231
231
|
Object.defineProperty(exports, "useAIContexts", {
|
|
232
232
|
enumerable: true,
|
|
233
|
-
get: function () { return
|
|
233
|
+
get: function () { return chunkZYLHGNIG_cjs.useAIContexts; }
|
|
234
234
|
});
|
|
235
235
|
Object.defineProperty(exports, "useCopilot", {
|
|
236
236
|
enumerable: true,
|
|
237
|
-
get: function () { return
|
|
237
|
+
get: function () { return chunkZYLHGNIG_cjs.useCopilot; }
|
|
238
238
|
});
|
|
239
239
|
Object.defineProperty(exports, "useMCPClient", {
|
|
240
240
|
enumerable: true,
|
|
241
|
-
get: function () { return
|
|
241
|
+
get: function () { return chunkZYLHGNIG_cjs.useMCPClient; }
|
|
242
242
|
});
|
|
243
243
|
Object.defineProperty(exports, "useMCPTools", {
|
|
244
244
|
enumerable: true,
|
|
245
|
-
get: function () { return
|
|
245
|
+
get: function () { return chunkZYLHGNIG_cjs.useMCPTools; }
|
|
246
246
|
});
|
|
247
247
|
Object.defineProperty(exports, "useMessageHistory", {
|
|
248
248
|
enumerable: true,
|
|
249
|
-
get: function () { return
|
|
249
|
+
get: function () { return chunkZYLHGNIG_cjs.useMessageHistory; }
|
|
250
250
|
});
|
|
251
251
|
Object.defineProperty(exports, "useMessageHistoryContext", {
|
|
252
252
|
enumerable: true,
|
|
253
|
-
get: function () { return
|
|
253
|
+
get: function () { return chunkZYLHGNIG_cjs.useMessageHistoryContext; }
|
|
254
254
|
});
|
|
255
255
|
Object.defineProperty(exports, "useTool", {
|
|
256
256
|
enumerable: true,
|
|
257
|
-
get: function () { return
|
|
257
|
+
get: function () { return chunkZYLHGNIG_cjs.useTool; }
|
|
258
258
|
});
|
|
259
259
|
Object.defineProperty(exports, "useTools", {
|
|
260
260
|
enumerable: true,
|
|
261
|
-
get: function () { return
|
|
261
|
+
get: function () { return chunkZYLHGNIG_cjs.useTools; }
|
|
262
262
|
});
|
|
263
263
|
Object.defineProperty(exports, "createLocalStorageAdapter", {
|
|
264
264
|
enumerable: true,
|
package/dist/react/index.d.cts
CHANGED
|
@@ -1542,6 +1542,8 @@ interface CopilotContextValue {
|
|
|
1542
1542
|
status: "ready" | "submitted" | "streaming" | "error";
|
|
1543
1543
|
error: Error | null;
|
|
1544
1544
|
isLoading: boolean;
|
|
1545
|
+
/** True from when stop() is called until the next sendMessage(). */
|
|
1546
|
+
wasStopped: boolean;
|
|
1545
1547
|
sendMessage: (content: string, attachments?: MessageAttachment[]) => Promise<void>;
|
|
1546
1548
|
stop: () => void;
|
|
1547
1549
|
clearMessages: () => void;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1542,6 +1542,8 @@ interface CopilotContextValue {
|
|
|
1542
1542
|
status: "ready" | "submitted" | "streaming" | "error";
|
|
1543
1543
|
error: Error | null;
|
|
1544
1544
|
isLoading: boolean;
|
|
1545
|
+
/** True from when stop() is called until the next sendMessage(). */
|
|
1546
|
+
wasStopped: boolean;
|
|
1545
1547
|
sendMessage: (content: string, attachments?: MessageAttachment[]) => Promise<void>;
|
|
1546
1548
|
stop: () => void;
|
|
1547
1549
|
clearMessages: () => void;
|
package/dist/react/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ReactChat, ReactThreadManager, ReactThreadManagerState, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, createToolIntentHandler, defineSkill, formatKnowledgeResultsForAI, searchKnowledgeBase, useAIAction, useAIActions, useAITools, useAgent, useCapabilities, useChat, useContextStats, useCopilotEvent, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPUIIntents, useMessageCheckpoints, useMessageMeta, useSkill, useSkillStatus, useSuggestions, useSupportedMediaTypes, useThread, useThreadManager, useToolExecutor, useToolWithSchema, useToolsWithSchema } from '../chunk-
|
|
2
|
-
export { AbstractAgentLoop, AbstractChat, CopilotProvider, MessageHistoryContext, MessageTree, ReactChatState, SkillProvider, createReactChatState, defaultMessageHistoryConfig, initialAgentLoopState, isCompactionMarker, keepToolPairsAtomic, toDisplayMessage, toLLMMessage, toLLMMessages, useAIContext, useAIContexts, useCopilot, useMCPClient, useMCPTools, useMessageHistory, useMessageHistoryContext, useTool, useTools } from '../chunk-
|
|
1
|
+
export { ReactChat, ReactThreadManager, ReactThreadManagerState, createMessageIntentHandler, createPermissionStorage, createReactChat, createReactThreadManager, createReactThreadManagerState, createSessionPermissionCache, createToolIntentHandler, defineSkill, formatKnowledgeResultsForAI, searchKnowledgeBase, useAIAction, useAIActions, useAITools, useAgent, useCapabilities, useChat, useContextStats, useCopilotEvent, useDevLogger, useFeatureSupport, useKnowledgeBase, useMCPUIIntents, useMessageCheckpoints, useMessageMeta, useSkill, useSkillStatus, useSuggestions, useSupportedMediaTypes, useThread, useThreadManager, useToolExecutor, useToolWithSchema, useToolsWithSchema } from '../chunk-YYLTWY5R.js';
|
|
2
|
+
export { AbstractAgentLoop, AbstractChat, CopilotProvider, MessageHistoryContext, MessageTree, ReactChatState, SkillProvider, createReactChatState, defaultMessageHistoryConfig, initialAgentLoopState, isCompactionMarker, keepToolPairsAtomic, toDisplayMessage, toLLMMessage, toLLMMessages, useAIContext, useAIContexts, useCopilot, useMCPClient, useMCPTools, useMessageHistory, useMessageHistoryContext, useTool, useTools } from '../chunk-JPUKXFR4.js';
|
|
3
3
|
export { createLocalStorageAdapter, createMemoryAdapter, createServerAdapter, generateSuggestionReason } from '../chunk-J5D3AZF6.js';
|
|
4
4
|
import '../chunk-EWVQWTNV.js';
|
|
5
5
|
import '../chunk-VNLLW3ZI.js';
|
package/dist/ui/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6R63NBNP_cjs = require('../chunk-6R63NBNP.cjs');
|
|
4
4
|
var chunkJO4BHPAD_cjs = require('../chunk-JO4BHPAD.cjs');
|
|
5
5
|
var chunk5EGBIQYS_cjs = require('../chunk-5EGBIQYS.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkZYLHGNIG_cjs = require('../chunk-ZYLHGNIG.cjs');
|
|
7
7
|
var chunk7GWEW2DU_cjs = require('../chunk-7GWEW2DU.cjs');
|
|
8
8
|
require('../chunk-JGPDQDY4.cjs');
|
|
9
9
|
require('../chunk-BJYA5NDL.cjs');
|
|
@@ -4332,7 +4332,8 @@ function FloatingActions({
|
|
|
4332
4332
|
message,
|
|
4333
4333
|
role,
|
|
4334
4334
|
align = "left",
|
|
4335
|
-
onEdit
|
|
4335
|
+
onEdit,
|
|
4336
|
+
className
|
|
4336
4337
|
}) {
|
|
4337
4338
|
const ctx = useMessageActionsContext();
|
|
4338
4339
|
const [copiedId, setCopiedId] = React19__namespace.useState(null);
|
|
@@ -4343,9 +4344,10 @@ function FloatingActions({
|
|
|
4343
4344
|
"div",
|
|
4344
4345
|
{
|
|
4345
4346
|
className: chunk5EGBIQYS_cjs.cn(
|
|
4346
|
-
"flex items-center gap-0.5
|
|
4347
|
+
"csdk-message-actions flex items-center gap-0.5",
|
|
4347
4348
|
"opacity-0 group-hover/message:opacity-100 transition-opacity duration-150",
|
|
4348
|
-
align === "right" ? "justify-end" : "justify-start"
|
|
4349
|
+
align === "right" ? "justify-end" : "justify-start",
|
|
4350
|
+
className
|
|
4349
4351
|
),
|
|
4350
4352
|
children: actions.map((action) => {
|
|
4351
4353
|
const isHidden = typeof action.hidden === "function" ? action.hidden({ message }) : action.hidden;
|
|
@@ -4358,7 +4360,9 @@ function FloatingActions({
|
|
|
4358
4360
|
title: action.tooltip,
|
|
4359
4361
|
"aria-label": action.tooltip,
|
|
4360
4362
|
className: chunk5EGBIQYS_cjs.cn(
|
|
4361
|
-
"
|
|
4363
|
+
"csdk-message-action-btn",
|
|
4364
|
+
action.id === "copy" && "csdk-copy-btn",
|
|
4365
|
+
"flex items-center justify-center size-6 rounded-md cursor-pointer",
|
|
4362
4366
|
"text-muted-foreground hover:text-foreground hover:bg-muted",
|
|
4363
4367
|
"transition-colors",
|
|
4364
4368
|
action.className
|
|
@@ -4748,7 +4752,7 @@ function DefaultMessage({
|
|
|
4748
4752
|
),
|
|
4749
4753
|
isLastMessage && isProcessing && !completedTools?.length && !pendingApprovalTools?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(chunk5EGBIQYS_cjs.Loader, { variant: "dots", size: "sm" }) }) : (
|
|
4750
4754
|
/* Show streaming loader when loading with no content and no tools */
|
|
4751
|
-
isLastMessage && isLoading && !cleanContent?.trim() && !toolsWithCustomRender?.length && !toolsWithoutCustomRender?.length && !pendingApprovalTools?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(chunk5EGBIQYS_cjs.Loader, { variant: loaderVariant, size: "sm" }) }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4755
|
+
isLastMessage && isLoading && !cleanContent?.trim() && !toolsWithCustomRender?.length && !toolsWithoutCustomRender?.length && !pendingApprovalTools?.length ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg bg-muted px-4 py-2", children: /* @__PURE__ */ jsxRuntime.jsx(chunk5EGBIQYS_cjs.Loader, { variant: loaderVariant, size: "sm" }) }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
4752
4756
|
cleanContent?.trim() && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4753
4757
|
MessageContent,
|
|
4754
4758
|
{
|
|
@@ -4949,7 +4953,15 @@ function DefaultMessage({
|
|
|
4949
4953
|
buttonClassName: followUpButtonClassName
|
|
4950
4954
|
}
|
|
4951
4955
|
),
|
|
4952
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4956
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4957
|
+
FloatingActions,
|
|
4958
|
+
{
|
|
4959
|
+
message,
|
|
4960
|
+
role: "assistant",
|
|
4961
|
+
align: "right",
|
|
4962
|
+
className: "absolute bottom-1 right-1"
|
|
4963
|
+
}
|
|
4964
|
+
)
|
|
4953
4965
|
] })
|
|
4954
4966
|
)
|
|
4955
4967
|
] })
|
|
@@ -5948,6 +5960,8 @@ function ChatComponent({
|
|
|
5948
5960
|
followUpButtonClassName,
|
|
5949
5961
|
// Citations/Sources
|
|
5950
5962
|
citations,
|
|
5963
|
+
// Message Actions
|
|
5964
|
+
allowToCopyMessage = false,
|
|
5951
5965
|
// Custom rendering
|
|
5952
5966
|
messageView,
|
|
5953
5967
|
renderMessage,
|
|
@@ -6250,6 +6264,7 @@ function ChatComponent({
|
|
|
6250
6264
|
}
|
|
6251
6265
|
)),
|
|
6252
6266
|
rootHeader,
|
|
6267
|
+
allowToCopyMessage && /* @__PURE__ */ jsxRuntime.jsx(MessageActions2, { role: "assistant", children: /* @__PURE__ */ jsxRuntime.jsx(CopyAction, {}) }),
|
|
6253
6268
|
behaviorChildren.length > 0 && behaviorChildren,
|
|
6254
6269
|
hasCustomLayout && viewChildren,
|
|
6255
6270
|
showDefaultWelcome ? (
|
|
@@ -6880,7 +6895,7 @@ function useInternalThreadManager(config = {}) {
|
|
|
6880
6895
|
} = config;
|
|
6881
6896
|
const [state, dispatch] = React19.useReducer(threadReducer, INITIAL_STATE);
|
|
6882
6897
|
const isLoadingRef = React19.useRef(false);
|
|
6883
|
-
const threadManager =
|
|
6898
|
+
const threadManager = chunk6R63NBNP_cjs.useThreadManager({
|
|
6884
6899
|
adapter,
|
|
6885
6900
|
saveDebounce,
|
|
6886
6901
|
autoRestoreLastThread
|
|
@@ -6902,7 +6917,7 @@ function useInternalThreadManager(config = {}) {
|
|
|
6902
6917
|
switchBranch,
|
|
6903
6918
|
threadId: sdkThreadId,
|
|
6904
6919
|
setActiveThread
|
|
6905
|
-
} =
|
|
6920
|
+
} = chunkZYLHGNIG_cjs.useCopilot();
|
|
6906
6921
|
React19.useEffect(() => {
|
|
6907
6922
|
if (!enabled || state.initialized || !currentThread) return;
|
|
6908
6923
|
dispatch({ type: "RESTORE_START" });
|
|
@@ -7132,7 +7147,7 @@ function CopilotChatBase(props) {
|
|
|
7132
7147
|
getBranchInfo,
|
|
7133
7148
|
editMessage,
|
|
7134
7149
|
error: chatError
|
|
7135
|
-
} =
|
|
7150
|
+
} = chunkZYLHGNIG_cjs.useCopilot();
|
|
7136
7151
|
const toolExecutions = rawToolExecutions.map(
|
|
7137
7152
|
(exec) => ({
|
|
7138
7153
|
id: exec.id,
|