Simplify KB duplicate API and improve naming/docs coverage.

Drop client-supplied target_id, generate IDs server-side, localize duplicate
names from request language, document the endpoint, and expand handler/client tests.
This commit is contained in:
wizardchen
2026-07-08 20:53:59 +08:00
committed by lyingbug
parent 58b79876ae
commit 6ac1703198
11 changed files with 280 additions and 59 deletions
+2 -3
View File
@@ -118,9 +118,8 @@ type KnowledgeBaseService interface {
// 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)
// data sources, shares, pins, or task state. A new UUID is always generated.
DuplicateKnowledgeBase(ctx context.Context, src string) (*types.KnowledgeBase, error)
// GetRepository gets the knowledge base repository
// Parameters: