refactor: remove knowledge base references from AI agent model and related services
- Removed KnowledgeIDs from CreateAIAgentRequest and AIAgentResponse. - Updated buildAIAgentResponseWithLocale to eliminate knowledge base name retrieval. - Refactored AI agent repository and service to remove knowledge base handling. - Adjusted dashboard service to no longer track AI agents without knowledge bases. - Modified knowledge base service to check for workflow references instead of AI agent references. - Updated frontend components to remove knowledge base selection and display. - Enhanced workflow validation to ensure knowledge retrieve nodes have associated knowledge bases.
This commit is contained in:
@@ -23,8 +23,8 @@ func TestDefaultRegistryExposesStartOutputs(t *testing.T) {
|
||||
if !hasVariable(spec.OutputSchema, "userMessage", VariableTypeString) {
|
||||
t.Fatalf("expected start output userMessage:string, got %#v", spec.OutputSchema)
|
||||
}
|
||||
if !hasVariable(spec.OutputSchema, "knowledgeBaseIds", VariableTypeIntegerArray) {
|
||||
t.Fatalf("expected start output knowledgeBaseIds:array<int>, got %#v", spec.OutputSchema)
|
||||
if hasVariableName(spec.OutputSchema, "knowledgeBaseIds") {
|
||||
t.Fatalf("did not expect start output knowledgeBaseIds after knowledge binding moved to retrieve node, got %#v", spec.OutputSchema)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,9 @@ func TestDefaultRegistryExposesKnowledgeRetrieveInputsAndOutputs(t *testing.T) {
|
||||
if !hasVariable(spec.OutputSchema, "items", VariableTypeObjectArray) {
|
||||
t.Fatalf("expected knowledge_retrieve output items:array<object>, got %#v", spec.OutputSchema)
|
||||
}
|
||||
if spec.ConfigSchema == nil {
|
||||
t.Fatalf("expected knowledge_retrieve config schema")
|
||||
}
|
||||
}
|
||||
|
||||
func TestDefaultRegistryExposesSendReplyRequiredInput(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user