|
|
@ -30,7 +30,7 @@ useCopyCode()
|
|
|
|
|
|
|
|
|
|
|
|
const { isMobile } = useBasicLayout()
|
|
|
|
const { isMobile } = useBasicLayout()
|
|
|
|
const { addChat, updateChat, updateChatSome, getChatByUuidAndIndex } = useChat()
|
|
|
|
const { addChat, updateChat, updateChatSome, getChatByUuidAndIndex } = useChat()
|
|
|
|
const { scrollRef, scrollToBottom } = useScroll()
|
|
|
|
const { scrollRef, scrollToBottom, scrollToBottomIfAtBottom } = useScroll()
|
|
|
|
const { usingContext, toggleUsingContext } = useUsingContext()
|
|
|
|
const { usingContext, toggleUsingContext } = useUsingContext()
|
|
|
|
|
|
|
|
|
|
|
|
const { uuid } = route.params as { uuid: string }
|
|
|
|
const { uuid } = route.params as { uuid: string }
|
|
|
@ -142,7 +142,7 @@ async function onConversation() {
|
|
|
|
return fetchChatAPIOnce()
|
|
|
|
return fetchChatAPIOnce()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
scrollToBottom()
|
|
|
|
scrollToBottomIfAtBottom()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (error) {
|
|
|
|
catch (error) {
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -164,7 +164,7 @@ async function onConversation() {
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
scrollToBottom()
|
|
|
|
scrollToBottomIfAtBottom()
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -196,7 +196,7 @@ async function onConversation() {
|
|
|
|
requestOptions: { prompt: message, options: { ...options } },
|
|
|
|
requestOptions: { prompt: message, options: { ...options } },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
scrollToBottom()
|
|
|
|
scrollToBottomIfAtBottom()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally {
|
|
|
|
finally {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|