@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
|
@@ -2290,8 +2290,7 @@ ${this.dynamicContext}`.trim() : this.config.systemPrompt;
|
|
|
2290
2290
|
(tc) => !pendingIds.has(tc?.id ?? "")
|
|
2291
2291
|
))
|
|
2292
2292
|
continue;
|
|
2293
|
-
if (msg.role === "tool" && msg.tool_call_id
|
|
2294
|
-
continue;
|
|
2293
|
+
if (msg.role === "tool" && msg.tool_call_id) continue;
|
|
2295
2294
|
messagesToInsert.push({
|
|
2296
2295
|
id: generateMessageId(),
|
|
2297
2296
|
role: msg.role,
|
|
@@ -5685,11 +5684,14 @@ function CopilotProvider(props) {
|
|
|
5685
5684
|
async (content, attachments) => {
|
|
5686
5685
|
debugLog("Sending message:", content);
|
|
5687
5686
|
setAgentIteration(0);
|
|
5687
|
+
setWasStopped(false);
|
|
5688
5688
|
await chatRef.current?.sendMessage(content, attachments);
|
|
5689
5689
|
},
|
|
5690
5690
|
[debugLog]
|
|
5691
5691
|
);
|
|
5692
|
+
const [wasStopped, setWasStopped] = useState(false);
|
|
5692
5693
|
const stop = useCallback(() => {
|
|
5694
|
+
setWasStopped(true);
|
|
5693
5695
|
chatRef.current?.stop();
|
|
5694
5696
|
}, []);
|
|
5695
5697
|
const clearMessages = useCallback(() => {
|
|
@@ -5766,6 +5768,7 @@ function CopilotProvider(props) {
|
|
|
5766
5768
|
status,
|
|
5767
5769
|
error,
|
|
5768
5770
|
isLoading,
|
|
5771
|
+
wasStopped,
|
|
5769
5772
|
// Chat actions
|
|
5770
5773
|
sendMessage,
|
|
5771
5774
|
stop,
|
|
@@ -5816,6 +5819,7 @@ function CopilotProvider(props) {
|
|
|
5816
5819
|
status,
|
|
5817
5820
|
error,
|
|
5818
5821
|
isLoading,
|
|
5822
|
+
wasStopped,
|
|
5819
5823
|
sendMessage,
|
|
5820
5824
|
stop,
|
|
5821
5825
|
clearMessages,
|
|
@@ -5954,5 +5958,5 @@ function useMCPTools(config) {
|
|
|
5954
5958
|
}
|
|
5955
5959
|
|
|
5956
5960
|
export { AbstractAgentLoop, AbstractChat, CopilotProvider, MessageHistoryContext, MessageTree, ReactChatState, SkillProvider, createReactChatState, defaultMessageHistoryConfig, initialAgentLoopState, isCompactionMarker, keepToolPairsAtomic, toDisplayMessage, toLLMMessage, toLLMMessages, useAIContext, useAIContexts, useCopilot, useMCPClient, useMCPTools, useMessageHistory, useMessageHistoryContext, useSkillContext, useTool, useTools };
|
|
5957
|
-
//# sourceMappingURL=chunk-
|
|
5958
|
-
//# sourceMappingURL=chunk-
|
|
5961
|
+
//# sourceMappingURL=chunk-JPUKXFR4.js.map
|
|
5962
|
+
//# sourceMappingURL=chunk-JPUKXFR4.js.map
|