import { tool } from "@opencode-ai/plugin"; import { executeFrontendAction } from "./frontend_action.js"; 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().min(1)).min(1).max(100) .describe("Feature ids to locate."), feature_type: tool.schema .enum(["junction", "pipe", "valve", "reservoir", "pump", "tank", "conduit", "orifice", "outfall"]) .describe("Type of feature to locate."), }, async execute(args, context) { return executeFrontendAction("locate_features", args, context); }, });