Files
TJWaterAgent/.opencode/tools/locate_features.ts
T
jiang 883faa2d54 LLM 请求透明化
Co-authored-by: Copilot <copilot@github.com>
2026-05-18 17:12:33 +08:00

19 lines
718 B
TypeScript

import { tool } from "@opencode-ai/plugin";
export default tool({
description: "在前端地图上定位并高亮指定的管网要素。",
args: {
reason: tool.schema
.string()
.describe("Why this map positioning action is needed for the user request."),
ids: tool.schema.array(tool.schema.string()).describe("Feature ids to locate."),
feature_type: tool.schema
.enum(["junction", "pipe", "valve", "reservoir", "pump", "tank"])
.describe("Type of feature to locate."),
},
async execute() {
// 前端工具只负责生成 tool part,真正的地图动作由 Agent SSE 适配层转发给浏览器执行。
return "已在地图上定位到指定要素。";
},
});