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

@@ -5578,21 +5578,14 @@ class WorkflowEngine:
"评分规则1.0完美 0.8良好 0.6基本满足 0.4大部分未满足 0.2完全不满足\n"
"score >= 0.6 时 passed=true否则 passed=false\n"
)
messages = [{"role": "user", "content": judge_prompt}]
resp = llm_service.call_openai_with_tools(
provider="deepseek",
judge_text = await llm_service.call_openai_with_tools(
prompt=judge_prompt,
tools=[],
model="deepseek-v4-flash",
messages=messages,
temperature=0.1,
max_tokens=600,
)
judge_text = ""
if isinstance(resp, dict):
choices = resp.get("choices", [])
if choices:
judge_text = choices[0].get("message", {}).get("content", "")
elif hasattr(resp, 'choices'):
judge_text = resp.choices[0].message.content or ""
judge_text = str(judge_text or "")
# 解析 JSON
import re as _eval_re
@@ -5622,13 +5615,24 @@ class WorkflowEngine:
'summary': review.get('summary', ''),
'content': content if isinstance(content, str) else str(content),
},
'status': 'success' if passed else 'quality_failed',
'status': 'success',
'branch': 'true' if passed else 'false',
}
except Exception as e:
logger.error(f"evaluator 节点评审失败: {e}")
exec_result = {
'output': {'score': 0, 'passed': False, 'error': str(e), 'content': str(content)},
'status': 'failed',
'output': {
'score': 0,
'passed': False,
'threshold': pass_threshold,
'issues': [str(e)],
'suggestions': [],
'summary': f'评审执行异常: {e}',
'error': str(e),
'content': str(content),
},
'status': 'success',
'branch': 'false',
}
if self.logger:
@@ -5843,8 +5847,8 @@ class WorkflowEngine:
if node.get('type') == 'start':
logger.info(f"[rjb] Start节点输出已保存: node_id={next_node_id}, output={output_value}, output_type={type(output_value)}")
# 如果是条件节点Switch节点根据分支结果过滤边
if node.get('type') == 'condition':
# 如果是条件节点/Switch节点/评估节点,根据分支结果过滤边
if node.get('type') in ('condition', 'evaluator'):
branch = result.get('branch', 'false')
logger.info(f"[rjb] 条件节点分支过滤: node_id={next_node_id}, branch={branch}")
# 移除不符合条件的边