feat: enhance localization and configuration support

- Added timezone and language settings to the environment configuration.
- Introduced built-in agent configurations with multilingual support for various agents.
- Updated Docker Compose to utilize new environment variables for timezone and language.
- Created new prompt templates for question generation, summary generation, and keywords extraction.
This commit is contained in:
wizardchen
2026-03-17 15:33:19 +08:00
committed by lyingbug
parent 09d9fe5ddb
commit 139a9c40ff
54 changed files with 2524 additions and 1482 deletions
+6 -6
View File
@@ -103,8 +103,8 @@ func (s *customAgentService) GetAgentByID(ctx context.Context, id string) (*type
// Found in database, return with customized config
return agent, nil
}
// Not in database, return default built-in agent from registry
if builtinAgent := types.GetBuiltinAgent(id, tenantID); builtinAgent != nil {
// Not in database, return default built-in agent from registry (i18n-aware)
if builtinAgent := types.GetBuiltinAgentWithContext(ctx, id, tenantID); builtinAgent != nil {
return builtinAgent, nil
}
}
@@ -179,8 +179,8 @@ func (s *customAgentService) ListAgents(ctx context.Context) ([]*types.CustomAge
}
}
} else {
// Use default built-in agent
if agent := types.GetBuiltinAgent(builtinID, tenantID); agent != nil {
// Use default built-in agent (i18n-aware)
if agent := types.GetBuiltinAgentWithContext(ctx, builtinID, tenantID); agent != nil {
result = append(result, agent)
}
}
@@ -258,8 +258,8 @@ func (s *customAgentService) UpdateAgent(ctx context.Context, agent *types.Custo
// updateBuiltinAgent updates a built-in agent's configuration (but not basic info)
func (s *customAgentService) updateBuiltinAgent(ctx context.Context, agent *types.CustomAgent, tenantID uint64) (*types.CustomAgent, error) {
// Get the default built-in agent from registry
defaultAgent := types.GetBuiltinAgent(agent.ID, tenantID)
// Get the default built-in agent from registry (i18n-aware)
defaultAgent := types.GetBuiltinAgentWithContext(ctx, agent.ID, tenantID)
if defaultAgent == nil {
return nil, ErrAgentNotFound
}