@luckydraw/cumulus 0.30.25 → 0.30.27
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/CHANGELOG.md +5 -1
- package/dist/gateway/static/widget.js +31 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.30.25
|
|
4
|
+
- Restored tap-to-interject on the voice mode mic indicator
|
|
5
|
+
|
|
6
|
+
|
|
3
7
|
## v0.30.23
|
|
4
|
-
- Voice replies now finish playing fully before the session ends
|
|
5
8
|
|
|
9
|
+
- Voice replies now finish playing fully before the session ends
|
|
6
10
|
|
|
7
11
|
## v0.30.22
|
|
8
12
|
|
|
@@ -1282,7 +1282,11 @@
|
|
|
1282
1282
|
' display: flex; align-items: center; justify-content: center;',
|
|
1283
1283
|
' transition: all 0.3s ease;',
|
|
1284
1284
|
' margin-bottom: 24px;',
|
|
1285
|
+
' cursor: pointer;',
|
|
1286
|
+
' user-select: none;',
|
|
1287
|
+
' -webkit-tap-highlight-color: transparent;',
|
|
1285
1288
|
'}',
|
|
1289
|
+
'.cumulus-voice-indicator:active { transform: scale(0.95); }',
|
|
1286
1290
|
'.cumulus-voice-overlay.listening .cumulus-voice-indicator {',
|
|
1287
1291
|
' background: rgba(0, 102, 204, 0.2);',
|
|
1288
1292
|
' border: 2px solid #0066cc;',
|
|
@@ -1797,9 +1801,10 @@
|
|
|
1797
1801
|
'\n' +
|
|
1798
1802
|
quote +
|
|
1799
1803
|
'\n```\n' +
|
|
1800
|
-
comment
|
|
1804
|
+
comment +
|
|
1805
|
+
'\n';
|
|
1801
1806
|
} else {
|
|
1802
|
-
serialized = '> ' + quote.replace(/\n/g, '\n> ') + '\n' + comment;
|
|
1807
|
+
serialized = '> ' + quote.replace(/\n/g, '\n> ') + '\n' + comment + '\n';
|
|
1803
1808
|
}
|
|
1804
1809
|
|
|
1805
1810
|
var chip = document.createElement('span');
|
|
@@ -1900,9 +1905,10 @@
|
|
|
1900
1905
|
'\n' +
|
|
1901
1906
|
quote +
|
|
1902
1907
|
'\n```\n' +
|
|
1903
|
-
newComment
|
|
1908
|
+
newComment +
|
|
1909
|
+
'\n';
|
|
1904
1910
|
} else {
|
|
1905
|
-
newSerialized = '> ' + quote.replace(/\n/g, '\n> ') + '\n' + newComment;
|
|
1911
|
+
newSerialized = '> ' + quote.replace(/\n/g, '\n> ') + '\n' + newComment + '\n';
|
|
1906
1912
|
}
|
|
1907
1913
|
chip.setAttribute('data-serialized', newSerialized);
|
|
1908
1914
|
chip.setAttribute('data-comment', newComment);
|
|
@@ -4399,6 +4405,24 @@
|
|
|
4399
4405
|
indicator.appendChild(indicatorIcon);
|
|
4400
4406
|
overlay.appendChild(indicator);
|
|
4401
4407
|
|
|
4408
|
+
// Tap-to-interject: clicking the indicator stops TTS and starts listening
|
|
4409
|
+
// immediately, regardless of phase. Cancels any pending mic-restart timer
|
|
4410
|
+
// so the manual action wins over the scheduled auto-restart.
|
|
4411
|
+
indicator.addEventListener('click', function () {
|
|
4412
|
+
if (!state.active) return;
|
|
4413
|
+
if (state.micRestartTimer) {
|
|
4414
|
+
clearTimeout(state.micRestartTimer);
|
|
4415
|
+
state.micRestartTimer = null;
|
|
4416
|
+
}
|
|
4417
|
+
if (state.phase === 'speaking') {
|
|
4418
|
+
stopSpeaking();
|
|
4419
|
+
}
|
|
4420
|
+
if (state.phase !== 'listening') {
|
|
4421
|
+
setPhase('listening');
|
|
4422
|
+
startRecognition();
|
|
4423
|
+
}
|
|
4424
|
+
});
|
|
4425
|
+
|
|
4402
4426
|
var transcriptEl = document.createElement('div');
|
|
4403
4427
|
transcriptEl.className = 'cumulus-voice-transcript';
|
|
4404
4428
|
overlay.appendChild(transcriptEl);
|
|
@@ -4732,7 +4756,9 @@
|
|
|
4732
4756
|
if (state.phase !== 'speaking') {
|
|
4733
4757
|
console.log('[Voice] PCM arrived in phase=' + state.phase + ', recovering to speaking');
|
|
4734
4758
|
if (state.recognition) {
|
|
4735
|
-
try {
|
|
4759
|
+
try {
|
|
4760
|
+
state.recognition.abort();
|
|
4761
|
+
} catch (e) {}
|
|
4736
4762
|
}
|
|
4737
4763
|
clearWatchdog();
|
|
4738
4764
|
// Cancel any pending mic-restart timer so it can't override us
|