2025_moty
ULTRACOMBOS-DEV 2 weeks ago
parent 2769f431af
commit c9534a9ad3
  1. 12
      vite/src/pages/flow_moty.jsx
  2. 3
      vite/src/util/useUser.jsx

@ -98,6 +98,7 @@ export function FlowMoty(){
const { history, status, reset, sendMessage, setStatus, audioOutput, setAudioOutput, stop:stopChat,
audioUrl }=useChat();
const refHistory=useRef();
const {
transcript,
@ -620,8 +621,9 @@ export function FlowMoty(){
}
function exportFile(isTest=false){
const user_input = history.find(msg => msg.role === 'user' && msg.content!='...');
const user_input = refHistory.current?.find(msg => msg.role === 'user' && msg.content!='...');
const default_image=!(user_input && user_input.content.trim() !== '');
console.log('export file', default_image, padInput)
const order=parseInt(data?.id)||Math.floor(Math.random()*10+5);
const delay=order*2000;
@ -629,9 +631,9 @@ export function FlowMoty(){
// setTimeout(()=>{
if(isTest) {
sendOsc(OSC_ADDRESS.EXPORT, `${getFileId(padInput)}#generated`); // Send OSC export message
sendOsc(OSC_ADDRESS.EXPORT, `${padInput}#generated`); // Send OSC export message
}else{
sendOsc(OSC_ADDRESS.EXPORT, `${getFileId(padInput)}#${default_image?'default':'generated'}`); // Send OSC export message
sendOsc(OSC_ADDRESS.EXPORT, `${padInput}#${default_image?'default':'generated'}`); // Send OSC export message
}
@ -670,6 +672,10 @@ export function FlowMoty(){
}
useEffect(()=>{
refHistory.current=history;
},[history]);
useEffect(()=>{
if(!lastOsc) return;

@ -30,6 +30,9 @@ export function UserProvider({children}) {
function getFileId(){
console.log('getFileid', userId);
if(!userId){
if(data?.id){
return `PC${data.id.toString().padStart(2,'0')}`;

Loading…
Cancel
Save