feat(agent): add frontend action bridge
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { tool } from "@opencode-ai/plugin";
|
||||
import { executeFrontendAction } from "./frontend_action.js";
|
||||
|
||||
export default tool({
|
||||
description: "打开前端的 SCADA 监测数据历史面板。",
|
||||
@@ -23,8 +24,7 @@ export default tool({
|
||||
.optional()
|
||||
.describe("Optional ISO8601 end time."),
|
||||
},
|
||||
async execute() {
|
||||
// SCADA 面板仍在浏览器侧执行,工具结果不承载实际监测数据。
|
||||
return "已打开 SCADA 监测面板。";
|
||||
async execute(args, context) {
|
||||
return executeFrontendAction("view_scada", args, context);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user