14 lines
390 B
TypeScript
14 lines
390 B
TypeScript
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;
|
|
},
|
|
});
|