Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix delete log annotation (#4201)

Louie Longca5081e3272a
diff --git a/web/app/components/app/chat/index.tsx b/web/app/components/app/chat/index.tsx
index e1fe5589ed8..6187ec684f0 100644
--- a/web/app/components/app/chat/index.tsx
+++ b/web/app/components/app/chat/index.tsx
@@ -260,11 +260,7 @@ const Chat: FC<IChatProps> = ({
return {
...item,
content: item.content,
- annotation: {
- ...(item.annotation || {}),
- id: '',
- logAnnotation: undefined, // remove log
- } as Annotation,
+ annotation: undefined,
}
}
return item
diff --git a/web/app/components/app/log/list.tsx b/web/app/components/app/log/list.tsx
index 026db4da2c4..3c420d342f1 100644
--- a/web/app/components/app/log/list.tsx
+++ b/web/app/components/app/log/list.tsx
@@ -137,8 +137,8 @@ const getFormattedChatList = (messages: ChatMessage[], conversationId: string, t
if (item.annotation) {
return {
- id: '',
- authorName: '',
+ id: item.annotation.id,
+ authorName: item.annotation.account.name,
logAnnotation: item.annotation,
created_at: 0,
}
diff --git a/web/models/log.ts b/web/models/log.ts
index 3b893e1e883..994da445dcf 100644
--- a/web/models/log.ts
+++ b/web/models/log.ts
@@ -57,6 +57,7 @@ export type ModelConfigDetail = {
}
export type LogAnnotation = {
+ id: string
content: string
account: {
id: string