Skip to content

Commit 696ed15

Browse files
committed
refactor: Update onSendMessage function in ChatWindow to include selectedModel parameter for improved message handling
1 parent 411cfb4 commit 696ed15

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/renderer/src/components/pages/chat/ChatWindow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ const ChatWindow = forwardRef<ChatWindowRef, ChatWindowProps>(({ chatId }, ref)
241241
onSend={useCallback(async () => {
242242
if (inputValue.trim()) {
243243
setInputValue('') // 立即清空输入框
244-
await onSendMessage(inputValue)
244+
await onSendMessage(inputValue, selectedModel)
245245
// 在下一个tick中聚焦,确保界面更新完成
246246
setTimeout(() => {
247247
chatInputRef.current?.focus()
248248
}, 0)
249249
}
250-
}, [inputValue, onSendMessage])}
250+
}, [inputValue, onSendMessage, selectedModel])}
251251
onStop={onStopGeneration}
252252
disabled={isLoading}
253253
loading={isLoading}

0 commit comments

Comments
 (0)