feat: Enhance agent settings navigation and error handling in UI components
- Introduced a new method to handle navigation to agent settings, improving code organization and reusability. - Updated tooltip content in the agent mode button to include a link for quick access to agent settings. - Enhanced error handling in the KnowledgeBase component to provide actionable links for VLM configuration errors. - Added initial section handling in the KnowledgeBaseEditorModal for improved user experience during knowledge base editing.
This commit is contained in:
@@ -16,6 +16,8 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const MAX_ITERATIONS = 30 // Max iterations for agent execution
|
||||
|
||||
// agentService implements agent-related business logic
|
||||
type agentService struct {
|
||||
cfg *config.Config
|
||||
@@ -194,8 +196,8 @@ func (s *agentService) ValidateConfig(config *types.AgentConfig) error {
|
||||
config.MaxIterations = 5 // Default
|
||||
}
|
||||
|
||||
if config.MaxIterations > 20 {
|
||||
return fmt.Errorf("max iterations too high: %d (max 20)", config.MaxIterations)
|
||||
if config.MaxIterations > MAX_ITERATIONS {
|
||||
return fmt.Errorf("max iterations too high: %d (max %d)", config.MaxIterations, MAX_ITERATIONS)
|
||||
}
|
||||
|
||||
if config.ThinkingModelID == "" {
|
||||
|
||||
Reference in New Issue
Block a user