From 3f9cc3b1e1130a326e5051f9a9e983309d6b3384 Mon Sep 17 00:00:00 2001 From: reng Date: Wed, 10 Sep 2025 20:12:35 +0800 Subject: [PATCH] update --- vite/src/pages/flow_free.jsx | 8 +++++--- vite/src/util/backend.js | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/vite/src/pages/flow_free.jsx b/vite/src/pages/flow_free.jsx index d144f25..096d2c5 100644 --- a/vite/src/pages/flow_free.jsx +++ b/vite/src/pages/flow_free.jsx @@ -77,6 +77,8 @@ export function FreeFlow(){ const refCurrentCue= useRef(null); const refData=useRef(data); + const refHintTimeout=useRef(); + const { history, status, reset, sendMessage, setStatus, audioOutput, setAudioOutput, stop:stopChat, audioUrl }=useChat(); @@ -120,8 +122,7 @@ export function FreeFlow(){ onStop(); resetData(); } - break; - + break; } // Handle OSC messages here @@ -327,7 +328,8 @@ export function FreeFlow(){ // if(cue.callback=='fade_out_light') refLight.current.fadeOut(); // Fade out light for conversation end if(cue.hint!=null){ - setTimeout(()=>{ + if(refHintTimeout.current) clearTimeout(refHintTimeout.current); + refHintTimeout.current=setTimeout(()=>{ sendOsc(OSC_ADDRESS.HINT, cue.hint); // Send OSC hint message }, cue.hint_time); } diff --git a/vite/src/util/backend.js b/vite/src/util/backend.js index c6dd0de..2c8ce2a 100644 --- a/vite/src/util/backend.js +++ b/vite/src/util/backend.js @@ -52,7 +52,8 @@ export async function writeToGoogleSheet(date, session, userId, password){ "date":date, "session":session, "userId":userId, - "password":password + "password":password, + "createdTime": new Date().toLocaleString() }) }); console.log("Data successfully sent to Google Sheet!");