mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-12-02 10:03:15 +00:00
(feat:attach) warning for error, progress, removal
This commit is contained in:
@@ -289,6 +289,9 @@ export const conversationSlice = createSlice({
|
||||
setAttachments: (state, action: PayloadAction<{ fileName: string; id: string }[]>) => {
|
||||
state.attachments = action.payload;
|
||||
},
|
||||
removeAttachment(state, action: PayloadAction<string>) {
|
||||
state.attachments = state.attachments?.filter(att => att.id !== action.payload);
|
||||
},
|
||||
},
|
||||
extraReducers(builder) {
|
||||
builder
|
||||
@@ -323,5 +326,6 @@ export const {
|
||||
updateToolCalls,
|
||||
setConversation,
|
||||
setAttachments,
|
||||
removeAttachment,
|
||||
} = conversationSlice.actions;
|
||||
export default conversationSlice.reducer;
|
||||
|
||||
Reference in New Issue
Block a user