feat: add SCADA frontend action bridge
This commit is contained in:
@@ -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;
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user