mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: Hide the delete button on the agent page #2088 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -34,7 +34,7 @@ export const useSendFeedback = (messageId: string) => {
|
||||
|
||||
export const useRemoveMessage = (
|
||||
messageId: string,
|
||||
removeMessageById: IRemoveMessageById['removeMessageById'],
|
||||
removeMessageById?: IRemoveMessageById['removeMessageById'],
|
||||
) => {
|
||||
const { deleteMessage, loading } = useDeleteMessage();
|
||||
|
||||
@ -43,7 +43,7 @@ export const useRemoveMessage = (
|
||||
if (pureId) {
|
||||
const retcode = await deleteMessage(pureId);
|
||||
if (retcode === 0) {
|
||||
removeMessageById(messageId);
|
||||
removeMessageById?.(messageId);
|
||||
}
|
||||
}
|
||||
}, [deleteMessage, messageId, removeMessageById]);
|
||||
|
||||
Reference in New Issue
Block a user