@springbrand/chat-client 0.1.3-alpha.29 → 0.1.3-alpha.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springbrand/chat-client",
3
- "version": "0.1.3-alpha.29",
3
+ "version": "0.1.3-alpha.30",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src",
@@ -25,7 +25,7 @@
25
25
  "@types/react-dom": "^19.2.3",
26
26
  "react-dom": "^19.2.7",
27
27
  "typescript": "^7.0.2",
28
- "@springbrand/agent-runtime": "0.2.0-alpha.38"
28
+ "@springbrand/agent-runtime": "0.2.0-alpha.41"
29
29
  },
30
30
  "scripts": {
31
31
  "typecheck": "tsc --noEmit"
@@ -396,6 +396,7 @@ export function useUniversalAgentChat(): ChatRuntime {
396
396
  isStreaming,
397
397
  error,
398
398
  clearError,
399
+ stop: stopChat,
399
400
  // autonomous responses 纪律(CF 文档采纳 2026-07-05):框架已提供三个流态标志,
400
401
  // 透出供 UI 区分「服务端主动流 vs 用户发起流」+「恢复态」(与 stall 看门狗配套)。
401
402
  isServerStreaming,
@@ -792,6 +793,7 @@ export function useUniversalAgentChat(): ChatRuntime {
792
793
  type: MessageType.CF_AGENT_CHAT_REQUEST_CANCEL,
793
794
  id: requestId,
794
795
  }));
796
+ await stopChat();
795
797
  return;
796
798
  }
797
799
  await (submissionId
@@ -811,6 +813,7 @@ export function useUniversalAgentChat(): ChatRuntime {
811
813
  }, [
812
814
  authoritativeTurn?.activeRequestId,
813
815
  authoritativeTurn?.activeSubmissionId,
816
+ stopChat,
814
817
  ]);
815
818
 
816
819
  const retry = useCallback(() => {