@eshal-bot/chat-widget 0.2.46 → 0.2.47
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/{chat-widget-MarkdownRenderer-B1kp67-G.esm.js → chat-widget-MarkdownRenderer-vumwhHph.esm.js} +1 -1
- package/dist/{chat-widget-index-BVHEE7tJ.esm.js → chat-widget-index-MI4rHyOE.esm.js} +2 -2
- package/dist/chat-widget.esm.js +1 -1
- package/dist/chat-widget.js +22 -5
- package/dist/chat-widget.min.js +2 -2
- package/dist/chat-widget.umd.js +2 -2
- package/package.json +1 -1
package/dist/chat-widget.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{S as default}from"./chat-widget-index-
|
|
1
|
+
export{S as default}from"./chat-widget-index-MI4rHyOE.esm.js";import"react";import"react-dom/client";import"react/jsx-runtime";import"react-dom";
|
package/dist/chat-widget.js
CHANGED
|
@@ -9210,6 +9210,20 @@
|
|
|
9210
9210
|
*/
|
|
9211
9211
|
const BARGE_IN_RESUME_AFTER_MS = 4000;
|
|
9212
9212
|
|
|
9213
|
+
/**
|
|
9214
|
+
* Whether a sound the speech gate hears pauses what is playing. Not the
|
|
9215
|
+
* greeting: at call start the speakers' echo opens the gate before echo
|
|
9216
|
+
* cancellation settles, and the greeting sat paused waiting for the server's
|
|
9217
|
+
* verdict. Dev, 11 Nov 2026: 2 of 8 preview calls paused it about 1 s in with
|
|
9218
|
+
* no one speaking, and a caller took the pause for their turn. The server
|
|
9219
|
+
* still stops the greeting on the caller's real words (`interrupted`) and
|
|
9220
|
+
* ignores its own echo (voice-runtime barge_in.py).
|
|
9221
|
+
* Mirrors packages/frontend/src/lib/audio/bargeIn.ts.
|
|
9222
|
+
*/
|
|
9223
|
+
function pausesForSound(greetingPlaying) {
|
|
9224
|
+
return !greetingPlaying;
|
|
9225
|
+
}
|
|
9226
|
+
|
|
9213
9227
|
/** "resume" | "discard" | null (the event says nothing about the sound). */
|
|
9214
9228
|
function bargeInVerdict(event) {
|
|
9215
9229
|
if (!event) return null;
|
|
@@ -15867,10 +15881,13 @@
|
|
|
15867
15881
|
// then resumes the audio or drops it (lib/audio/bargeIn.js): emptying
|
|
15868
15882
|
// the player here lost the rest of a reply to a cough (dev, 16 Oct).
|
|
15869
15883
|
onSpeechStart: () => {
|
|
15870
|
-
|
|
15871
|
-
|
|
15872
|
-
|
|
15873
|
-
|
|
15884
|
+
// The greeting plays on over a sound (lib/audio/bargeIn.js).
|
|
15885
|
+
if (pausesForSound(greetingActiveRef.current && !userHasSpokenRef.current)) {
|
|
15886
|
+
audioPlayerNodeRef.current?.port.postMessage({
|
|
15887
|
+
command: "pause"
|
|
15888
|
+
});
|
|
15889
|
+
bargeInPendingRef.current = true;
|
|
15890
|
+
}
|
|
15874
15891
|
if (bargeInTimerRef.current) clearTimeout(bargeInTimerRef.current);
|
|
15875
15892
|
bargeInTimerRef.current = null;
|
|
15876
15893
|
const ws = websocketRef.current;
|
|
@@ -23944,7 +23961,7 @@
|
|
|
23944
23961
|
* value by its own test (that constant sat at 0.1.113 while this package was
|
|
23945
23962
|
* at 0.2.2 precisely because nothing enforced it - EV-2431).
|
|
23946
23963
|
*/
|
|
23947
|
-
const WIDGET_VERSION = '0.2.
|
|
23964
|
+
const WIDGET_VERSION = '0.2.47';
|
|
23948
23965
|
|
|
23949
23966
|
/**
|
|
23950
23967
|
* API utility functions
|