@eshal-bot/chat-widget 0.1.108 → 0.1.109
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.js +10 -10
- package/package.json +1 -1
package/dist/chat-widget.js
CHANGED
|
@@ -8584,8 +8584,8 @@
|
|
|
8584
8584
|
// Retrieval resolves before generation; the backend emits
|
|
8585
8585
|
// {type:'sources'} as soon as the source set is known so the
|
|
8586
8586
|
// user sees grounding during the pre-token wait. PRELIMINARY:
|
|
8587
|
-
// the complete event's overlap-filtered list replaces
|
|
8588
|
-
// clears
|
|
8587
|
+
// the complete event's overlap-filtered list replaces - or
|
|
8588
|
+
// clears - it.
|
|
8589
8589
|
if (parsed.type === 'sources') {
|
|
8590
8590
|
const early = normalizeSources(parsed);
|
|
8591
8591
|
if (early.length > 0) {
|
|
@@ -8646,7 +8646,7 @@
|
|
|
8646
8646
|
|
|
8647
8647
|
// Attach the AUTHORITATIVE (overlap-filtered) sources. When an
|
|
8648
8648
|
// EV-3046 preliminary strip was shown, an empty final list must
|
|
8649
|
-
// CLEAR it
|
|
8649
|
+
// CLEAR it - the filter decided nothing was actually cited.
|
|
8650
8650
|
setMessages(prev => {
|
|
8651
8651
|
const updatedMessages = [...(prev || [])];
|
|
8652
8652
|
const lastMessage = updatedMessages[updatedMessages.length - 1];
|
|
@@ -8723,7 +8723,7 @@
|
|
|
8723
8723
|
}
|
|
8724
8724
|
} catch (err) {
|
|
8725
8725
|
// EV-3045: the user pressed Stop (fetch aborted). The partial answer
|
|
8726
|
-
// stays on screen, finalized
|
|
8726
|
+
// stays on screen, finalized - NOT an error, NOT a retry (retrying a
|
|
8727
8727
|
// deliberately-stopped answer re-asks the question the user killed).
|
|
8728
8728
|
if (err && err.name === 'AbortError') {
|
|
8729
8729
|
if (accumulatedText.current) {
|
|
@@ -8731,7 +8731,7 @@
|
|
|
8731
8731
|
stoppedByUser: true
|
|
8732
8732
|
});
|
|
8733
8733
|
} else {
|
|
8734
|
-
// nothing arrived yet
|
|
8734
|
+
// nothing arrived yet - just drop the skeleton bubble
|
|
8735
8735
|
setMessages(prev => (prev || []).filter(msg => !msg.isProcessing));
|
|
8736
8736
|
}
|
|
8737
8737
|
return;
|
|
@@ -10187,7 +10187,7 @@
|
|
|
10187
10187
|
});
|
|
10188
10188
|
}, [getNextMessageId]);
|
|
10189
10189
|
|
|
10190
|
-
// EV-3045: Stop control. Aborting the fetch is the cancellation signal
|
|
10190
|
+
// EV-3045: Stop control. Aborting the fetch is the cancellation signal -
|
|
10191
10191
|
// the server tears the generator down on disconnect (cancelling the ADK
|
|
10192
10192
|
// run, tool calls and delegation), and persists the partial answer to
|
|
10193
10193
|
// history with a "stopped" marker. Client-side, processStream finalizes
|
|
@@ -10439,7 +10439,7 @@
|
|
|
10439
10439
|
let lastErr;
|
|
10440
10440
|
for (let attempt = 0; attempt <= STREAM_RETRY_DELAYS_MS.length; attempt += 1) {
|
|
10441
10441
|
try {
|
|
10442
|
-
// EV-3045: one controller per attempt
|
|
10442
|
+
// EV-3045: one controller per attempt - the Stop button aborts
|
|
10443
10443
|
// exactly the attempt that is streaming.
|
|
10444
10444
|
streamAbortRef.current = new AbortController();
|
|
10445
10445
|
const stream = await sendStreamingRequest(chatRequest, apiBaseUrl, getAuthToken, streamAbortRef.current.signal);
|
|
@@ -10453,7 +10453,7 @@
|
|
|
10453
10453
|
// EV-3045: a user Stop that aborted BEFORE any bytes arrived
|
|
10454
10454
|
// rejects the fetch itself with AbortError (processStream's
|
|
10455
10455
|
// own AbortError handling covers mid-stream aborts). Treat as
|
|
10456
|
-
// a successful, deliberate end
|
|
10456
|
+
// a successful, deliberate end - never retry a stopped turn.
|
|
10457
10457
|
if (err && err.name === 'AbortError') {
|
|
10458
10458
|
setMessages(prev => (prev || []).filter(msg => !msg.isProcessing));
|
|
10459
10459
|
return {
|
|
@@ -12447,7 +12447,7 @@
|
|
|
12447
12447
|
scrollLeft: "Scroll left",
|
|
12448
12448
|
scrollRight: "Scroll right",
|
|
12449
12449
|
sendMessage: "Send message",
|
|
12450
|
-
// EV-3045: Stop control aria-label. EN-only for now
|
|
12450
|
+
// EV-3045: Stop control aria-label. EN-only for now - translate() falls
|
|
12451
12451
|
// back to EN for locales without the key.
|
|
12452
12452
|
stopGenerating: "Stop generating",
|
|
12453
12453
|
startVoiceInput: "Start voice input",
|
|
@@ -17959,7 +17959,7 @@
|
|
|
17959
17959
|
}), document.body)]
|
|
17960
17960
|
}), isLoading && !isVoiceSessionActive && typeof onStopGeneration === "function" ?
|
|
17961
17961
|
/*#__PURE__*/
|
|
17962
|
-
// EV-3045: Stop replaces Send while a reply streams
|
|
17962
|
+
// EV-3045: Stop replaces Send while a reply streams - the
|
|
17963
17963
|
// convention every benchmark assistant uses. Always enabled;
|
|
17964
17964
|
// the partial answer stays on screen and in history.
|
|
17965
17965
|
jsxRuntimeExports.jsx("button", {
|