Add conversation deletion functionality and update HistoryPage
- Implement a new API endpoint for deleting conversations in the backend. - Enhance the HistoryPage component to include a dropdown menu for conversation actions, allowing users to delete conversations. - Update the pagination logic to handle conversation removal and improve user experience during deletion. - Adjust the loading state and error handling for the delete operation, ensuring smooth interaction.
This commit is contained in:
@@ -249,6 +249,8 @@ export const conversationsApi = {
|
||||
},
|
||||
get: (id: string) =>
|
||||
request<ConversationDetail>(`/api/conversations/${id}`),
|
||||
remove: (id: string) =>
|
||||
request<{ ok: boolean }>(`/api/conversations/${id}`, { method: "DELETE" }),
|
||||
};
|
||||
|
||||
// ---------- 工具 ----------
|
||||
|
||||
Reference in New Issue
Block a user