mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-19 16:31:36 +00:00
fix: edit task not deleting history
This commit is contained in:
parent
747c0d3795
commit
8d390026ea
1 changed files with 7 additions and 1 deletions
|
|
@ -461,7 +461,13 @@ export default function ChatBox(): JSX.Element {
|
|||
chatStore.setAttaches(id, attachments);
|
||||
}
|
||||
chatStore.removeTask(taskId);
|
||||
proxyFetchDelete(`/api/chat/history/${taskId}`);
|
||||
const history_id = projectStore.getHistoryId(projectStore.activeProjectId);
|
||||
try {
|
||||
if(!history_id) throw new Error("No history ID found for the project");
|
||||
proxyFetchDelete(`/api/chat/history/${history_id}`);
|
||||
} catch(error) {
|
||||
console.error("Failed to delete chat history:", error);
|
||||
}
|
||||
setMessage(question);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue