@paymanai/payman-ask-sdk 4.0.17 → 4.0.18
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/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -0
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.js +960 -24
- package/dist/index.native.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -873,6 +873,17 @@ function useStreamManagerV2(config, callbacks, setMessages, setIsWaitingForRespo
|
|
|
873
873
|
signal: abortController.signal,
|
|
874
874
|
onEvent: (event) => {
|
|
875
875
|
if (abortController.signal.aborted) return;
|
|
876
|
+
try {
|
|
877
|
+
const et = event?.eventType;
|
|
878
|
+
if (et === "RUN_IN_PROGRESS" || et === "INTENT_PROGRESS" || et === "THINKING_DELTA") {
|
|
879
|
+
const len = (event.partialText ?? event.text ?? "").length;
|
|
880
|
+
console.log(`[stream] ${et} (+${len} chars)`);
|
|
881
|
+
} else {
|
|
882
|
+
console.log(`[stream] ${et ?? "?"}:`, JSON.stringify(event));
|
|
883
|
+
}
|
|
884
|
+
} catch {
|
|
885
|
+
console.log("[stream] (unserializable event)", event?.eventType);
|
|
886
|
+
}
|
|
876
887
|
processStreamEventV2(event, state);
|
|
877
888
|
if (state.lastUserAction) {
|
|
878
889
|
callbacksRef.current.onUserActionRequired?.(state.lastUserAction);
|