feat(rohs-check): 新增 RoHS 检核工具进度查询功能及相关接口

This commit is contained in:
hugo committed 2026-06-11 10:05:29 +08:00
1 parent fee33f69d9
commit a18a07ef1a
19 files changed
+654 -58

No files matched your search

@@ -6,7 +6,7 @@ from app.services.shipping_notice.agent_resolver import CHAT_AGENT_NAME
from app.services.shipping_notice.tool_api_url import resolve_tool_api_base_url
# Dify Chatflow input variable names — must match canvas Start / 输入变量配置.
HXOPS_TOOL_API_BASE_INPUT = "hxops_tool_api_base"
HXOPS_TOOLS_API_BASE_INPUT = "HXOPS_TOOLS_API_BASE"
HXOPS_TOOL_API_KEY_INPUT = "hxops_tool_api_key"
@@ -20,7 +20,7 @@ def build_dify_chat_inputs() -> dict[str, str]:
key = str(current_app.config.get("SHIPPING_NOTICE_TOOL_API_KEY") or "").strip()
inputs: dict[str, str] = {}
if base:
inputs[HXOPS_TOOL_API_BASE_INPUT] = base
inputs[HXOPS_TOOLS_API_BASE_INPUT] = base
if key:
inputs[HXOPS_TOOL_API_KEY_INPUT] = key
return inputs
@@ -1,8 +1,8 @@
from __future__ import annotations
from app.services.hxops_tool_api import resolve_hxops_tool_api_base
from app.services.hxops_tool_api import resolve_HXOPS_TOOLS_API_BASE
def resolve_tool_api_base_url(*, config: dict | None = None, request_host: str | None = None) -> str:
"""Resolve hxops Tool API root URL (no trailing slash)."""
return resolve_hxops_tool_api_base(config=config, request_host=request_host)
return resolve_HXOPS_TOOLS_API_BASE(config=config, request_host=request_host)