feat: Agent 批量测试、作业助手与上传预览;Windows 启动脚本与文档- 新增 run_agent_test_cases 与示例 JSON、(红头)agent测试用例文档
- 扩展 test_agent_execution(--homework、UTF-8 控制台) - 后端:uploads 预览、file_read、工作流与对话落盘等 - 前端:AgentChatPreview 与设计器相关调整 - 忽略 redis二进制、agent_workspaces、uploads、tessdata 等本机产物 Made-with: Cursor
This commit is contained in:
@@ -14,6 +14,7 @@ from app.models.agent import Agent
|
||||
from app.api.auth import get_current_user
|
||||
from app.models.user import User
|
||||
from app.tasks.workflow_tasks import execute_workflow_task, resume_workflow_task
|
||||
from app.services.agent_workspace_chat_log import ensure_agent_dialogue_logged_from_db_execution
|
||||
import uuid
|
||||
import logging
|
||||
|
||||
@@ -478,4 +479,11 @@ async def get_execution(
|
||||
if not _can_view_execution(db, current_user, execution):
|
||||
raise HTTPException(status_code=403, detail="无权访问")
|
||||
|
||||
# 补救:若 Celery Worker 未带对话落盘逻辑,首次拉取已完成执行时由 API 进程写入 dialogue.md(与任务内写入幂等)
|
||||
if execution.status == "completed":
|
||||
try:
|
||||
ensure_agent_dialogue_logged_from_db_execution(db, execution)
|
||||
except Exception:
|
||||
logger.debug("补写智能体对话 MD 跳过", exc_info=True)
|
||||
|
||||
return _execution_to_response(execution)
|
||||
|
||||
Reference in New Issue
Block a user