tool_names_cn.py 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. # -*- coding: utf-8 -*-
  2. """
  3. 工具函数名 → 中文显示名 统一映射表
  4. 所有 SSE 事件中的中文工具名均从此处获取,修改一处即可全局生效。
  5. 新增工具后在此表追加条目即可,无需改动路由层或 Agent 层。
  6. 使用方式:
  7. from tools.tool_names_cn import TOOL_NAME_CN
  8. cn_name = TOOL_NAME_CN.get(tool_name, tool_name)
  9. """
  10. TOOL_NAME_CN: dict[str, str] = {
  11. # ================================================================
  12. # DeepAgents 内置工具(文件系统 / 搜索 / 命令执行)
  13. # ================================================================
  14. "write_todos": "更新任务计划",
  15. "task": "委派子任务",
  16. "read_file": "读取文件",
  17. "read": "读取文件",
  18. "write_file": "写入文件",
  19. "write": "写入文件",
  20. "edit_file": "编辑文件",
  21. "edit": "编辑文件",
  22. "ls": "列出目录",
  23. "glob": "搜索文件",
  24. "grep": "搜索文本",
  25. "execute": "执行命令",
  26. "bash": "执行命令",
  27. "web_search": "网络搜索",
  28. "web_fetch": "获取网页",
  29. "TodoWrite": "更新任务计划",
  30. "Bash": "执行命令",
  31. "Read": "读取文件",
  32. "Write": "写入文件",
  33. "Edit": "编辑文件",
  34. "Glob": "搜索文件",
  35. "Grep": "搜索文本",
  36. # ================================================================
  37. # MCP 远程数据查询(vent_tools.py / vent_plan_tools.py)
  38. # ================================================================
  39. "query_device_data": "查询设备实时数据",
  40. "query_device_data_by_id": "查询设备监测数据",
  41. "query_devices_by_tunnel": "查询巷道关联设备",
  42. "query_devices_by_tunnel_id": "查询巷道设备列表",
  43. "get_tun_list_by_modelid": "获取模型巷道列表",
  44. "query_tunnels_by_model": "查询模型巷道列表",
  45. "query_tunnel_list": "按名称搜索巷道",
  46. "query_tun_data_by_id": "查询巷道监测数据",
  47. "query_knowledge_base": "检索煤矿安全知识库",
  48. "get_needq_all_data": "获取管控平台需风量数据",
  49. "list_ventanaly_monitor_data_days": "查询监测历史时序数据",
  50. "get_device_kind_dict": "查询设备类型字典",
  51. "get_device_list_by_kind": "按类型查询设备列表",
  52. "query_device_realtime_data": "查询设备实时数据",
  53. # MCP 配风计划审查(vent_plan_tools.py)
  54. "query_mining_plan": "查询采掘计划",
  55. "query_face_procedure": "查询作业规程",
  56. "query_gas_report": "查询瓦斯鉴定报告",
  57. "query_wind_report": "查询测风报表",
  58. # ================================================================
  59. # 本地需风量计算工具(calc_tools.py)
  60. # ================================================================
  61. # 采煤工作面
  62. "calc_face_by_gas": "采煤面瓦斯需风量计算",
  63. "calc_face_by_workers": "采煤面人数需风量计算",
  64. "calc_face_by_wind_speed": "采煤面风速需风量计算",
  65. "calc_face_air_volume_max": "采煤面综合需风量计算",
  66. # 掘进工作面
  67. "calc_tunnel_by_gas": "掘进面瓦斯需风量计算",
  68. "calc_tunnel_by_explosives": "掘进面炸药需风量计算",
  69. "calc_tunnel_by_workers": "掘进面人数需风量计算",
  70. "calc_tunnel_by_wind_speed": "掘进面风速需风量计算",
  71. "calc_tunnel_by_vehicle": "掘进面胶轮车需风量计算",
  72. "calc_tunnel_air_volume_max": "掘进面综合需风量计算",
  73. # 硐室
  74. "calc_chamber_by_equipment": "硐室设备需风量计算",
  75. "calc_chamber_by_wind_speed": "硐室风速需风量计算",
  76. # 其他巷道
  77. "calc_other_by_wind_speed": "其他巷道风速需风量计算",
  78. # 辅助计算
  79. "calc_effective_area": "有效断面积计算",
  80. "calc_total_air_volume": "总需风量汇总计算",
  81. # ================================================================
  82. # 反算 / 系统工具
  83. # ================================================================
  84. "calc_gas_emission_from_wind": "测风报表涌出量反算",
  85. "get_current_time": "获取当前系统时间",
  86. "read_file_content": "读取文件内容",
  87. "search_chat_history": "搜索聊天记录",
  88. "get_session_chat": "获取会话消息",
  89. "get_current_session_id": "获取当前会话ID",
  90. "save_report": "保存报告文件",
  91. # ================================================================
  92. # 用户偏好记忆
  93. # ================================================================
  94. "save_user_preference": "保存用户偏好",
  95. "list_user_preferences": "查看用户偏好",
  96. "delete_user_preference": "删除用户偏好",
  97. # ================================================================
  98. # 计划审批(Human-in-the-Loop)
  99. # ================================================================
  100. "request_plan_approval": "提交执行计划审批",
  101. # ================================================================
  102. # 需风量 / 模型数据(新增)
  103. # ================================================================
  104. "get_model_param_pub_list": "查询模型参数列表",
  105. "get_model_wind": "查询巷道解算风量",
  106. "get_sensor_wind": "查询设备监测风量",
  107. "simulate_needq_heading_face": "掘进面需风量模拟",
  108. "simulate_needq_room": "硐室需风量模拟",
  109. "simulate_needq_ret_work_face": "采煤面需风量模拟",
  110. "simulate_needq_other": "其他地点需风量模拟",
  111. # ================================================================
  112. # 设备信息(新增)
  113. # ================================================================
  114. "query_device_info": "查询设备详细信息",
  115. "query_device_type_info": "查询设备类型信息",
  116. "query_monitor_params": "查询监测点参数",
  117. "query_devices_by_model": "按模型查询设备",
  118. # ================================================================
  119. # 故障诊断(新增)
  120. # ================================================================
  121. "check_model_connect_status": "模型连通性检查",
  122. "check_model_one_dir_cycle": "循环风路检查",
  123. "check_model_one_dir_node": "单向节点检查",
  124. "check_model_diagonal_structure": "角联结构诊断",
  125. "get_model_fault_diagnosis": "模型故障诊断",
  126. # ================================================================
  127. # 避灾路线(新增)
  128. # ================================================================
  129. "get_escape_path": "避灾路线模拟",
  130. "get_escape_path_each_exit": "避灾路线模拟(各出口)",
  131. # ================================================================
  132. # 关键阻力 / 压能(新增)
  133. # ================================================================
  134. "get_out_shafts": "查询回风井列表",
  135. "get_in_shafts": "查询进风井列表",
  136. "get_max_resistance_path": "最大阻力路线",
  137. "get_three_area_distribution": "三区阻力分布",
  138. "get_key_path_decision": "关键路径决策",
  139. "get_path_press_power": "节点压能图",
  140. # ================================================================
  141. # 网络解算(新增)
  142. # ================================================================
  143. "net_cal": "网络解算",
  144. "net_cal_for_plan": "方案模拟解算",
  145. # ================================================================
  146. # 报警 / 日志(新增)
  147. # ================================================================
  148. "get_alarm_log_history": "查询报警历史",
  149. "get_device_set_log_history": "查询设备控制历史",
  150. "get_sys_log_history": "查询登录历史",
  151. # ================================================================
  152. # 场景管理(新增)
  153. # ================================================================
  154. "get_manage_system_by_strType": "按类型查场景列表",
  155. "query_system_by_systemID": "按ID查场景数据",
  156. # ================================================================
  157. # 煤矿基础(新增)
  158. # ================================================================
  159. "get_gas_identify_vo": "查询瓦斯等级鉴定报告",
  160. "get_by_mine_name": "查询工作面设计规程",
  161. "query_control_testWind": "一键测风",
  162. # ================================================================
  163. # 数据库 / 文件(新增)
  164. # ================================================================
  165. "execute_sql_query": "执行SQL查询",
  166. "get_file_list_by_type": "按类型查文件列表",
  167. "get_file_base64_by_id": "按ID查文件Base64",
  168. # ================================================================
  169. # 字典查询(新增)
  170. # ================================================================
  171. "get_dict_list_by_dictcode": "查询字典项",
  172. # ================================================================
  173. # 测风报表(新增)
  174. # ================================================================
  175. "get_latest_report": "查询最新测风报表",
  176. }