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

@@ -83,6 +83,24 @@ func (t *kbSearchTool) Execute(ctx context.Context, execCtx ExecutionContext, ar
return "", fmt.Errorf("failed to look up active knowledge bases: %w", err)
}
// Also include project-bound KBs (v0.19.0)
if t.stores.Projects != nil {
projID, _ := t.stores.Projects.GetProjectIDForChannel(ctx, execCtx.ChannelID)
if projID != "" {
projKBIDs, _ := t.stores.Projects.GetKBIDs(ctx, projID)
projSet := make(map[string]bool, len(kbIDs))
for _, id := range kbIDs {
projSet[id] = true
}
for _, id := range projKBIDs {
if !projSet[id] {
kbIDs = append(kbIDs, id)
projSet[id] = true
}
}
}
}
// Also include personal KBs (always available to owner, even if not linked to channel)
personalKBs, err := t.stores.KnowledgeBases.ListPersonal(ctx, execCtx.UserID)
if err == nil {