mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 20:17:29 +08:00
fix: Default value for input variable is null when starting new conversations on the web app (#24709)
This commit is contained in:
parent
5c01dd97e8
commit
5a64f69456
@ -407,9 +407,13 @@ export const useChatWithHistory = (installedAppInfo?: InstalledApp) => {
|
|||||||
currentChatInstanceRef.current.handleStop()
|
currentChatInstanceRef.current.handleStop()
|
||||||
setShowNewConversationItemInList(true)
|
setShowNewConversationItemInList(true)
|
||||||
handleChangeConversation('')
|
handleChangeConversation('')
|
||||||
handleNewConversationInputsChange(await getRawInputsFromUrlParams())
|
const conversationInputs: Record<string, any> = {}
|
||||||
|
inputsForms.forEach((item: any) => {
|
||||||
|
conversationInputs[item.variable] = item.default || null
|
||||||
|
})
|
||||||
|
handleNewConversationInputsChange(conversationInputs)
|
||||||
setClearChatList(true)
|
setClearChatList(true)
|
||||||
}, [handleChangeConversation, setShowNewConversationItemInList, handleNewConversationInputsChange, setClearChatList])
|
}, [handleChangeConversation, setShowNewConversationItemInList, handleNewConversationInputsChange, setClearChatList, inputsForms])
|
||||||
const handleUpdateConversationList = useCallback(() => {
|
const handleUpdateConversationList = useCallback(() => {
|
||||||
mutateAppConversationData()
|
mutateAppConversationData()
|
||||||
mutateAppPinnedConversationData()
|
mutateAppPinnedConversationData()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user