|
|
|
|
@ -147,6 +147,12 @@ export function FreeFlow(){ |
|
|
|
|
refAudioPrompt.current.onended = () => { |
|
|
|
|
console.log('Audio prompt ended, setting chat status to User'); |
|
|
|
|
setChatStatus(ChatStatus.User); // Set chat status to User after audio ends |
|
|
|
|
|
|
|
|
|
const user_input = history.find(msg => msg.role === 'user'); |
|
|
|
|
if(user_input && user_input.content.trim() !== '') { |
|
|
|
|
sendOsc(OSC_ADDRESS.STATUS, 'go'); // Send OSC status message |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
@ -227,11 +233,7 @@ export function FreeFlow(){ |
|
|
|
|
}else{ |
|
|
|
|
|
|
|
|
|
// if history contains user input, send it |
|
|
|
|
const user_input = history.find(msg => msg.role === 'user'); |
|
|
|
|
if(user_input && user_input.content.trim() !== '') { |
|
|
|
|
sendOsc(OSC_ADDRESS.STATUS, 'go'); // Send OSC status message |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sendPrompt(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|