Spaces:
Running
Running
Update script1.js
Browse files- script1.js +3 -0
script1.js
CHANGED
@@ -30,6 +30,7 @@ let isRequestInProgress = false;
|
|
30 |
let isUserSpeaking = false;
|
31 |
let requestAbortController = null;
|
32 |
let firstResponseTextTimestamp = null;
|
|
|
33 |
|
34 |
// Audio Management
|
35 |
let currentAudio = null;
|
@@ -215,6 +216,8 @@ async function sendQueryToAI(query) {
|
|
215 |
updateActivityIndicators();
|
216 |
firstResponseTextTimestamp = null;
|
217 |
queryStartTime = Date.now();
|
|
|
|
|
218 |
|
219 |
const cacheKey = generateCacheKey(query, voiceSelectionDropdown.value, conversationHistory, modelSelectionDropdown.value);
|
220 |
|
|
|
30 |
let isUserSpeaking = false;
|
31 |
let requestAbortController = null;
|
32 |
let firstResponseTextTimestamp = null;
|
33 |
+
let lastUserSpeechTimestamp = 0;
|
34 |
|
35 |
// Audio Management
|
36 |
let currentAudio = null;
|
|
|
216 |
updateActivityIndicators();
|
217 |
firstResponseTextTimestamp = null;
|
218 |
queryStartTime = Date.now();
|
219 |
+
requestAbortController = new AbortController();
|
220 |
+
|
221 |
|
222 |
const cacheKey = generateCacheKey(query, voiceSelectionDropdown.value, conversationHistory, modelSelectionDropdown.value);
|
223 |
|