From b35d09e215e38e7b2f541be46621938e1ce6f8c5 Mon Sep 17 00:00:00 2001 From: Stanislas Polu Date: Sat, 28 Dec 2024 11:09:55 +0100 Subject: [PATCH] Conversation deletion: delete conversation include file actions (#9637) --- front/lib/api/assistant/conversation/destroy.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/front/lib/api/assistant/conversation/destroy.ts b/front/lib/api/assistant/conversation/destroy.ts index 3f8cec95d33a..718758281097 100644 --- a/front/lib/api/assistant/conversation/destroy.ts +++ b/front/lib/api/assistant/conversation/destroy.ts @@ -3,6 +3,7 @@ import { removeNulls } from "@dust-tt/types"; import { chunk } from "lodash"; import { AgentBrowseAction } from "@app/lib/models/assistant/actions/browse"; +import { AgentConversationIncludeFileAction } from "@app/lib/models/assistant/actions/conversation/include_file"; import { AgentDustAppRunAction } from "@app/lib/models/assistant/actions/dust_app_run"; import { AgentProcessAction } from "@app/lib/models/assistant/actions/process"; import { AgentRetrievalAction } from "@app/lib/models/assistant/actions/retrieval"; @@ -56,6 +57,9 @@ async function destroyActionsRelatedResources(agentMessageIds: Array) { await AgentBrowseAction.destroy({ where: { agentMessageId: agentMessageIds }, }); + await AgentConversationIncludeFileAction.destroy({ + where: { agentMessageId: agentMessageIds }, + }); } async function destroyMessageRelatedResources(messageIds: Array) {