feat: add SCADA frontend action bridge

This commit is contained in:
2026-07-20 19:57:25 +08:00
parent 72019ac1f2
commit 432edaaf2f
16 changed files with 445 additions and 20 deletions
@@ -0,0 +1,13 @@
import type { Plugin } from "@opencode-ai/plugin";
const FRONTEND_ACTION_TOOLS = new Set([
"render_scada_analysis",
"clear_scada_analysis",
]);
export const frontendActionCallIdPlugin: Plugin = async () => ({
"tool.execute.before": async (input, output) => {
if (!FRONTEND_ACTION_TOOLS.has(input.tool)) return;
output.args.__frontend_action_call_id = input.callID;
},
});