File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,15 +127,7 @@ export default function ChatInput({
127127 const handleSubmit = useCallback ( ( ) => {
128128 const trimmedValue = inputValue . trim ( ) ;
129129
130- // console.log("handleSubmit", trimmedValue, disabled);
131-
132130 if ( ( trimmedValue || ! isEmpty ( uploadAttachments ) ) && ! disabled ) {
133- const { setHasActiveChat } = useChatStore . getState ( ) ;
134-
135- if ( isChatMode ) {
136- setHasActiveChat ( true ) ;
137- }
138-
139131 changeInput ( "" ) ;
140132 onSend ( {
141133 message : trimmedValue ,
Original file line number Diff line number Diff line change @@ -213,6 +213,8 @@ function SearchChat({
213213
214214 dispatch ( { type : "SET_INPUT" , payload : params ?. message ?? "" } ) ;
215215 if ( isChatMode ) {
216+ const { setHasActiveChat } = useChatStore . getState ( ) ;
217+ setHasActiveChat ( true ) ;
216218 chatAIRef . current ?. init ( params ) ;
217219 }
218220 } ,
You can’t perform that action at this time.
0 commit comments