feat: add organization management features

- Introduced a new API for organization management, including creation, updating, and deletion of organizations.
- Implemented organization sharing functionality for knowledge bases, allowing users to share knowledge bases with specific organizations and set permissions.
- Added UI components for organization selection and sharing dialogs.
- Enhanced existing components to support organization-related features, including shared knowledge base handling and organization role management.

This update enhances collaboration capabilities within the application by allowing users to manage and share knowledge bases across different organizations.
This commit is contained in:
wizardchen
2026-01-30 16:28:01 +08:00
committed by lyingbug
parent 548450c170
commit 4158773849
72 changed files with 14685 additions and 1419 deletions
+2 -1
View File
@@ -369,7 +369,8 @@ func (t *DataAnalysisTool) LoadFromKnowledge(ctx context.Context, knowledge *typ
// - *TableSchema: schema information of the created table
// - error: any error that occurred during the operation
func (t *DataAnalysisTool) LoadFromKnowledgeID(ctx context.Context, knowledgeID string) (*TableSchema, error) {
knowledge, err := t.knowledgeService.GetKnowledgeByID(ctx, knowledgeID)
// Use GetKnowledgeByIDOnly to support cross-tenant shared KB
knowledge, err := t.knowledgeService.GetKnowledgeByIDOnly(ctx, knowledgeID)
if err != nil {
logger.Errorf(ctx, "[Tool][DataAnalysis] Failed to get knowledge by ID '%s': %v", knowledgeID, err)
return nil, fmt.Errorf("failed to get knowledge by ID: %w", err)