fix: delete agent 500 error + dynamic personality + deployment guide

- Fix delete agent 500: clean up FK records (agent_llm_logs, permissions,
  schedules, executions, team_members) and unbind goals/tasks before delete
- Remove hardcoded personality templates in Android, replace with dynamic
  system prompt generation from name + description
- Set promptSectionsEnabled=false to bypass PromptComposer for personality
- Add Tencent Cloud Linux deployment guide (Docker Compose)
- Accumulated backend service updates, frontend UI fixes, Android app changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 01:17:21 +08:00
parent 86b98865e3
commit beff3fac8d
1084 changed files with 117315 additions and 1281 deletions

View File

@@ -126,6 +126,7 @@ class AgentRuntime:
team_share_enabled=self.config.memory.team_share_enabled,
memory_dir_enabled=self.config.memory.memory_dir_enabled,
memory_dir_path=self.config.memory.memory_dir_path,
parent_agent_id=self.config.memory.parent_agent_id,
)
self.tool_manager = tool_manager or AgentToolManager(
include_tools=self.config.tools.include_tools,
@@ -1821,8 +1822,17 @@ class _LLMClient:
except Exception as ce:
logger.error("ReactiveCompact 失败: %s", ce)
# 降级回退:主模型失败时尝试 fallback_llm
# 降级回退:主模型失败时尝试 fallback_llm(优先每 Agent 配置,其次全局配置)
fallback = self._config.fallback_llm
if not fallback:
# 全局降级配置兜底
fb_model = settings.FALLBACK_LLM_MODEL
if fb_model:
fallback = {
"model": fb_model,
"api_key": settings.FALLBACK_LLM_API_KEY or None,
"base_url": settings.FALLBACK_LLM_BASE_URL or None,
}
if fallback and isinstance(fallback, dict) and not _is_fallback:
fb_model = fallback.get("model")
fb_api_key = fallback.get("api_key")