import { optionalToolReason } from "../tool-reason.js"; import { tool } from "../tool.js"; import { createViewSchemas } from "../../src/frontendAction/command.js"; import { executeFrontendAction } from "./frontend_action.js"; export default tool({ description: "操作当前工作台的地图、独立图表窗口、证据图层或已完成的 SCADA 分析展示,等待浏览器回执。分析趋势并保留在聊天中时优先用 present_answer 的 Chart;用户要求打开工作台图表或操作已有窗口时才用 open_chart/close_chart,先查询数据,不隐式查询,也不默认重复展示同一趋势。地图定位、高亮和图层操作使用本工具;聊天中的可重复定位入口使用 MapLocation。不得编造坐标或分析等级。", args: { command: createViewSchemas(tool.schema as unknown as Parameters[0]).command as unknown as ReturnType, reason: optionalToolReason, }, async execute(args, context) { return executeFrontendAction(args, context); }, });