Changeset 0.19.0.1 (#82)

This commit is contained in:
2026-02-28 23:46:23 +00:00
parent 091ce2af6a
commit 748f49bedd
30 changed files with 3873 additions and 151 deletions

View File

@@ -851,6 +851,25 @@ func BuildKBHint(ctx context.Context, stores store.Stores, channelID, userID, pe
}
}
// Project-bound KBs (v0.19.0)
if stores.Projects != nil {
projID, _ := stores.Projects.GetProjectIDForChannel(ctx, channelID)
if projID != "" {
projKBIDs, projErr := stores.Projects.GetKBIDs(ctx, projID)
if projErr == nil {
for _, kbID := range projKBIDs {
if !seen[kbID] {
kb, kbErr := stores.KnowledgeBases.GetByID(ctx, kbID)
if kbErr == nil && kb.ChunkCount > 0 {
kbs = append(kbs, kbInfo{Name: kb.Name, DocCount: kb.DocumentCount})
seen[kbID] = true
}
}
}
}
}
}
// Channel-linked KBs
channelKBs, err := stores.KnowledgeBases.GetChannelKBs(ctx, channelID)
if err == nil {