Files
next-tjwater-agent/.opencode/tools/present_view.ts
T
jiang 6336157ff4
Generic Container CI/CD / test-build-publish (push) Successful in 1m6s
Agent CI/CD / build-test-publish-and-deploy (push) Successful in 1m7s
feat: upgrade investigation and presentation runtime
2026-10-30 17:30:19 +08:00

16 lines
1.0 KiB
TypeScript

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<typeof createViewSchemas>[0]).command as unknown as ReturnType<typeof tool.schema.object>,
reason: optionalToolReason,
},
async execute(args, context) {
return executeFrontendAction(args, context);
},
});