refactor: unify tool reason requirements
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { optionalToolReason } from "../tool-reason.js";
|
||||
import { tool } from "../tool.js";
|
||||
|
||||
import { executeFrontendAction } from "./frontend_action.js";
|
||||
@@ -5,11 +6,7 @@ import { executeFrontendAction } from "./frontend_action.js";
|
||||
export default tool({
|
||||
description: "清除当前浏览器地图上的 Agent SCADA 分析结果覆盖层。",
|
||||
args: {
|
||||
reason: tool.schema
|
||||
.string()
|
||||
.trim()
|
||||
.min(1)
|
||||
.describe("Why the current SCADA analysis overlay should be cleared."),
|
||||
reason: optionalToolReason,
|
||||
},
|
||||
async execute(args, context) {
|
||||
return executeFrontendAction("clear_scada_analysis", args, context);
|
||||
|
||||
Reference in New Issue
Block a user