Add knowledge base duplicate flow

This commit is contained in:
wizardchen
2026-07-08 20:43:12 +08:00
committed by lyingbug
parent e93f8d3c21
commit 58b79876ae
16 changed files with 488 additions and 122 deletions
@@ -116,6 +116,12 @@ type KnowledgeBaseService interface {
// - Possible errors such as not existing, insufficient permissions, etc.
CopyKnowledgeBase(ctx context.Context, src string, dst string) (*types.KnowledgeBase, *types.KnowledgeBase, error)
// DuplicateKnowledgeBase creates a new settings-only knowledge base duplicate.
// It does not copy knowledge entries, chunks, FAQ rows, wiki pages, indexes,
// data sources, shares, pins, or task state. targetID is optional; when empty
// a new UUID is generated.
DuplicateKnowledgeBase(ctx context.Context, src string, targetID string) (*types.KnowledgeBase, error)
// GetRepository gets the knowledge base repository
// Parameters:
// - ctx: Context with authentication and request information