mirror of
https://github.com/open-webui/open-webui.git
synced 2026-12-02 17:57:57 -05:00
refac
This commit is contained in:
1 parent
5140da6eb9
commit
d99ec1c02c
135 files changed
+606
-1867
No files matched your search
@@ -442,7 +442,7 @@
|
||||
// Check if initial speech/noise has started
|
||||
const hasSound = domainData.some((value) => value > 0);
|
||||
if (hasSound) {
|
||||
// BIG RED TEXT
|
||||
// Big red text
|
||||
console.log('%c%s', 'color: red; font-size: 20px;', '🔊 Sound detected');
|
||||
if (mediaRecorder && mediaRecorder.state !== 'recording') {
|
||||
mediaRecorder.start();
|
||||
@@ -750,10 +750,7 @@
|
||||
|
||||
const chatEventHandler = async (e) => {
|
||||
const { id, content } = e.detail;
|
||||
// "id" here is message id
|
||||
// if "id" is not the same as "currentMessageId" then do not process
|
||||
// "content" here is a sentence from the assistant,
|
||||
// there will be many sentences for the same "id"
|
||||
// Collect assistant sentences only for the active message ID.
|
||||
|
||||
if (currentMessageId === id) {
|
||||
console.log(`Received chat event for message ID ${id}: ${content}`);
|
||||
|
||||
@@ -162,11 +162,6 @@
|
||||
// lastSoundTime = Date.now();
|
||||
// }
|
||||
|
||||
// if (recording && Date.now() - lastSoundTime > 3000) {
|
||||
// if ($settings?.speechAutoSend ?? false) {
|
||||
// confirmRecording();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
window.requestAnimationFrame(processFrame);
|
||||
|
||||
Reference in new issue
Block a user