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: "为选定的管网要素打开前端的历史记录或计算结果面板。",
|
||||
@@ -23,8 +24,7 @@ export default tool({
|
||||
.optional()
|
||||
.describe("Optional ISO8601 end time."),
|
||||
},
|
||||
async execute() {
|
||||
// 返回短确认即可;面板打开动作由前端根据 tool_call 参数完成。
|
||||
return "已打开计算结果面板。";
|
||||
async execute(args, context) {
|
||||
return executeFrontendAction("view_history", args, context);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user