feat(file-check): 持久化 chat_tool_runs 并统一 agent_runtime_context 注入
新增跨 worker 进度绑定表与显式 hxops_turn_id 链路;Dify Start 仅注入 agent_runtime_context,task_id/turn_id 写入 refs 供画布解析后回传 Tool。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c778f40fbc
commit
f4e74f7b07
23 files changed
+1580
-196
No files matched your search
@@ -14,7 +14,7 @@ from flask import Blueprint, jsonify, request, send_file
|
||||
from app.core.auth.jwt import get_current_user
|
||||
from app.core.errors import NotFoundError, UnauthorizedError, ValidationError
|
||||
from app.models import ScheduleRun, ScheduleTask
|
||||
from app.services.file_check_tools.chat_log_run_resolver import find_run_for_chat_log
|
||||
from app.services.file_check_tools.chat_log_run_resolver import find_run_for_chat_log_with_source
|
||||
from app.services.schedule.query_service import get_run, serialize_run
|
||||
|
||||
workspace_file_check_bp = Blueprint("workspace_file_check", __name__)
|
||||
@@ -78,8 +78,12 @@ def workspace_file_check_run_for_log():
|
||||
raise ValidationError("task_id_required")
|
||||
if not chat_log_id or chat_log_id <= 0:
|
||||
raise ValidationError("chat_log_id_required")
|
||||
run = find_run_for_chat_log(task_id=task_id, chat_log_id=chat_log_id)
|
||||
return jsonify({'ok': True, 'run': _serialize_progress_run(run) if run else None, 'match_source': 'chat_log' if run else None})
|
||||
match = find_run_for_chat_log_with_source(task_id=task_id, chat_log_id=chat_log_id)
|
||||
return jsonify({
|
||||
'ok': True,
|
||||
'run': _serialize_progress_run(match.run) if match.run else None,
|
||||
'match_source': match.match_source,
|
||||
})
|
||||
|
||||
@workspace_file_check_bp.route('/file-check/runs/for-session', methods=['GET'])
|
||||
def workspace_file_check_run_for_session():
|
||||
|
||||
Reference in new issue
Block a user