mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 12:54:55 +00:00
fix(chatbot): clear attached assets on message send and remove drag-drop toast
This commit is contained in:
@@ -201,7 +201,6 @@ export function useFileSystemDnd({
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
useChatbotStore.getState().addAssets(chatAssets)
|
useChatbotStore.getState().addAssets(chatAssets)
|
||||||
toast.success(`Added ${chatAssets.length} item(s) to chatbot context`)
|
|
||||||
onClearSelection()
|
onClearSelection()
|
||||||
setDragState(undefined)
|
setDragState(undefined)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ export const useChatbotStore = create<ChatbotState>((set) => ({
|
|||||||
set({
|
set({
|
||||||
messages: [...state.messages, optimisticMsg],
|
messages: [...state.messages, optimisticMsg],
|
||||||
isStreaming: true,
|
isStreaming: true,
|
||||||
|
chatAssets: [],
|
||||||
})
|
})
|
||||||
|
|
||||||
const assetIds = state.chatAssets.map((a) => a.id)
|
const assetIds = state.chatAssets.map((a) => a.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user