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:
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
Agent LLM 调用日志模型 — 记录每次 Agent Runtime 发起的 LLM 调用
|
||||
"""
|
||||
from sqlalchemy import Column, String, Text, Integer, DateTime, ForeignKey, func
|
||||
from sqlalchemy import Column, String, Text, Integer, DateTime, ForeignKey, Index, func
|
||||
from sqlalchemy.dialects.mysql import CHAR
|
||||
from app.core.database import Base
|
||||
import uuid
|
||||
@@ -27,3 +27,11 @@ class AgentLLMLog(Base):
|
||||
status = Column(String(20), default="success", comment="状态: success/error")
|
||||
error_message = Column(Text, nullable=True, comment="错误信息")
|
||||
created_at = Column(DateTime, default=func.now(), comment="创建时间")
|
||||
|
||||
__table_args__ = (
|
||||
Index("idx_llm_agent_id", "agent_id"),
|
||||
Index("idx_llm_user_id", "user_id"),
|
||||
Index("idx_llm_session_id", "session_id"),
|
||||
Index("idx_llm_created_at", "created_at"),
|
||||
Index("idx_llm_agent_created", "agent_id", "created_at"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user