From e53cfb16d459bdd2c333c3b00de43a01dd7f4a5f Mon Sep 17 00:00:00 2001 From: reng Date: Thu, 21 Aug 2025 12:05:07 +0800 Subject: [PATCH] update --- vite/src/pages/flow_free.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vite/src/pages/flow_free.jsx b/vite/src/pages/flow_free.jsx index 6e45f4e..aae9628 100644 --- a/vite/src/pages/flow_free.jsx +++ b/vite/src/pages/flow_free.jsx @@ -242,18 +242,21 @@ export function FreeFlow(){ console.log('Getting summary...'); setChatStatus(ChatStatus.Clear); // Set chat status to Processing - getSummary(history.map(el=>`${el.role}:${el.content}`).join('\n'), data).then(summary_ => { + + let message=refInput.current?.value?.trim() || history.map(el=>`${el.role}:${el.content}`).join('\n'); + getSummary(message, data).then(summary_ => { console.log('Summary:', summary_); onCueEnd(); // End the current cue after getting summary - setSummary(summary_?.result); + setSummary(()=>summary_?.result); refContainer.current.scrollTop = refContainer.current.scrollHeight; // Scroll to bottom }).catch(error => { console.error('Error getting summary:', error); }); + break; case 'user_input': setChatStatus(ChatStatus.Message); // Set chat status to User