@yourgpt/copilot-sdk 2.5.0 → 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.
@@ -5684,11 +5684,14 @@ function CopilotProvider(props) {
5684
5684
  async (content, attachments) => {
5685
5685
  debugLog("Sending message:", content);
5686
5686
  setAgentIteration(0);
5687
+ setWasStopped(false);
5687
5688
  await chatRef.current?.sendMessage(content, attachments);
5688
5689
  },
5689
5690
  [debugLog]
5690
5691
  );
5692
+ const [wasStopped, setWasStopped] = useState(false);
5691
5693
  const stop = useCallback(() => {
5694
+ setWasStopped(true);
5692
5695
  chatRef.current?.stop();
5693
5696
  }, []);
5694
5697
  const clearMessages = useCallback(() => {
@@ -5765,6 +5768,7 @@ function CopilotProvider(props) {
5765
5768
  status,
5766
5769
  error,
5767
5770
  isLoading,
5771
+ wasStopped,
5768
5772
  // Chat actions
5769
5773
  sendMessage,
5770
5774
  stop,
@@ -5815,6 +5819,7 @@ function CopilotProvider(props) {
5815
5819
  status,
5816
5820
  error,
5817
5821
  isLoading,
5822
+ wasStopped,
5818
5823
  sendMessage,
5819
5824
  stop,
5820
5825
  clearMessages,
@@ -5953,5 +5958,5 @@ function useMCPTools(config) {
5953
5958
  }
5954
5959
 
5955
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 };
5956
- //# sourceMappingURL=chunk-SOS25KUI.js.map
5957
- //# sourceMappingURL=chunk-SOS25KUI.js.map
5961
+ //# sourceMappingURL=chunk-JPUKXFR4.js.map
5962
+ //# sourceMappingURL=chunk-JPUKXFR4.js.map