@yourgpt/copilot-sdk 2.1.5-alpha.8 → 2.1.7
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-KYVWKMUT.js → chunk-H3LX6FTP.js} +3 -3
- package/dist/{chunk-KYVWKMUT.js.map → chunk-H3LX6FTP.js.map} +1 -1
- package/dist/{chunk-JV2L3WZS.cjs → chunk-IDAQU3FP.cjs} +18 -3
- package/dist/chunk-IDAQU3FP.cjs.map +1 -0
- package/dist/{chunk-FDZVDGNR.js → chunk-ISOMZAYN.js} +18 -3
- package/dist/chunk-ISOMZAYN.js.map +1 -0
- package/dist/{chunk-KLSKP6AZ.cjs → chunk-JFVTY757.cjs} +16 -16
- package/dist/{chunk-KLSKP6AZ.cjs.map → chunk-JFVTY757.cjs.map} +1 -1
- 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 +4 -0
- package/dist/react/index.d.ts +4 -0
- package/dist/react/index.js +2 -2
- package/dist/styles.css +21 -0
- package/dist/ui/index.cjs +5 -5
- package/dist/ui/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-FDZVDGNR.js.map +0 -1
- package/dist/chunk-JV2L3WZS.cjs.map +0 -1
|
@@ -2217,7 +2217,7 @@ ${this.dynamicContext}`.trim() : this.config.systemPrompt;
|
|
|
2217
2217
|
this.handleError(error);
|
|
2218
2218
|
return;
|
|
2219
2219
|
}
|
|
2220
|
-
if (chunk.type === "message:end" && this.streamState?.
|
|
2220
|
+
if (chunk.type === "message:end" && this.streamState !== null && (this.streamState.content || (this.streamState.toolResults?.size ?? 0) > 0)) {
|
|
2221
2221
|
this.debug("message:end mid-stream", {
|
|
2222
2222
|
messageId: this.streamState.messageId,
|
|
2223
2223
|
contentLength: this.streamState.content.length,
|
|
@@ -2292,6 +2292,12 @@ ${this.dynamicContext}`.trim() : this.config.systemPrompt;
|
|
|
2292
2292
|
continue;
|
|
2293
2293
|
}
|
|
2294
2294
|
if (msg.role === "assistant" && !msg.tool_calls?.length) continue;
|
|
2295
|
+
if (msg.role === "assistant" && msg.tool_calls?.length && msg.tool_calls.every(
|
|
2296
|
+
(tc) => !pendingIds.has(tc?.id ?? "")
|
|
2297
|
+
))
|
|
2298
|
+
continue;
|
|
2299
|
+
if (msg.role === "tool" && msg.tool_call_id && pendingIds.has(msg.tool_call_id))
|
|
2300
|
+
continue;
|
|
2295
2301
|
messagesToInsert.push({
|
|
2296
2302
|
id: generateMessageId(),
|
|
2297
2303
|
role: msg.role,
|
|
@@ -2409,6 +2415,15 @@ ${this.dynamicContext}`.trim() : this.config.systemPrompt;
|
|
|
2409
2415
|
if (chunk.type === "message:delta") {
|
|
2410
2416
|
this.callbacks.onMessageDelta?.(assistantMessage.id, chunk.content);
|
|
2411
2417
|
}
|
|
2418
|
+
if (chunk.type === "thread:created") {
|
|
2419
|
+
const serverThreadId = chunk.threadId;
|
|
2420
|
+
if (!this.config.threadId || this.config.threadId !== serverThreadId) {
|
|
2421
|
+
this.config.threadId = serverThreadId;
|
|
2422
|
+
this.sessionInitPromise = null;
|
|
2423
|
+
this.setSessionStatus("ready");
|
|
2424
|
+
this.callbacks.onThreadChange?.(serverThreadId);
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2412
2427
|
if (isStreamDone(chunk)) {
|
|
2413
2428
|
this.debug("streamDone", {
|
|
2414
2429
|
chunkType: chunk.type,
|
|
@@ -5969,5 +5984,5 @@ exports.useMessageHistoryContext = useMessageHistoryContext;
|
|
|
5969
5984
|
exports.useSkillContext = useSkillContext;
|
|
5970
5985
|
exports.useTool = useTool;
|
|
5971
5986
|
exports.useTools = useTools;
|
|
5972
|
-
//# sourceMappingURL=chunk-
|
|
5973
|
-
//# sourceMappingURL=chunk-
|
|
5987
|
+
//# sourceMappingURL=chunk-IDAQU3FP.cjs.map
|
|
5988
|
+
//# sourceMappingURL=chunk-IDAQU3FP.cjs.map
|