We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 292c303 commit e134d00Copy full SHA for e134d00
web/screens/Chat/index.tsx
@@ -68,6 +68,11 @@ const ChatScreen = () => {
68
69
const textareaRef = useRef<HTMLTextAreaElement>(null)
70
const { startModel } = useActiveModel()
71
+ const modelRef = useRef(activeModel)
72
+
73
+ useEffect(() => {
74
+ modelRef.current = activeModel
75
+ }, [activeModel])
76
77
useEffect(() => {
78
getUserConversations()
@@ -95,7 +100,10 @@ const ChatScreen = () => {
95
100
description: 'It will be sent once the model is done loading.',
96
101
})
97
102
startModel(model.id).then(() => {
98
- if (activeModel) sendChatMessage()
103
+ setTimeout(() => {
104
+ if (modelRef?.current?.id === currentConvo?.modelId)
105
+ sendChatMessage()
106
+ }, 300)
99
107
108
}
109
return
0 commit comments