Refactor plugin

This commit is contained in:
jinhui.li
2025-06-23 06:05:58 +08:00
parent dba8b1e6c8
commit cba0536c45
12 changed files with 432 additions and 162 deletions

View File

@@ -1,7 +1,12 @@
module.exports = async function handle(req, res) {
if (req?.body?.tools?.length) {
req.body.tools = req.body.tools.filter(
(tool) => !["NotebookRead", "NotebookEdit", "mcp__ide__executeCode"].includes(tool.name)
);
}
module.exports = {
beforeRouter(req, res) {
if (req?.body?.tools?.length) {
req.body.tools = req.body.tools.filter(
(tool) =>
!["NotebookRead", "NotebookEdit", "mcp__ide__executeCode"].includes(
tool.name
)
);
}
},
};