feat: 优化知识库删除流程,增加状态标记防止异步任务冲突并完善状态常量定义

This commit is contained in:
wizardchen
2025-12-03 19:43:48 +08:00
parent fb716edd9e
commit f0ca9883fc
2 changed files with 107 additions and 8 deletions
+14
View File
@@ -16,6 +16,20 @@ const (
KnowledgeTypeFAQ = "faq"
)
// Knowledge parse status constants
const (
// ParseStatusPending indicates the knowledge is waiting to be processed
ParseStatusPending = "pending"
// ParseStatusProcessing indicates the knowledge is being processed
ParseStatusProcessing = "processing"
// ParseStatusCompleted indicates the knowledge has been processed successfully
ParseStatusCompleted = "completed"
// ParseStatusFailed indicates the knowledge processing failed
ParseStatusFailed = "failed"
// ParseStatusDeleting indicates the knowledge is being deleted (used to prevent async task conflicts)
ParseStatusDeleting = "deleting"
)
// ManualKnowledgeFormat represents the format of the manual knowledge
const (
ManualKnowledgeFormatMarkdown = "markdown"