(feat:attach) warning for error, progress, removal

This commit is contained in:
ManishMadan2882
2025-04-04 03:29:01 +05:30
parent f9ad4c068a
commit 5923781484
2 changed files with 108 additions and 69 deletions

View File

@@ -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;