mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-30 12:40:33 +00:00
fix file not found error when deleting custom plugins
Replaced the "delete_work_dir_file" API call with a "delete_plugin" action in the plugins API. This bypasses the dev container file browser conversion and directly uses the runtime's absolute path to securely remove custom plugins using the files.delete_dir utility.
This commit is contained in:
parent
11586c485f
commit
8c90ad54ae
2 changed files with 22 additions and 2 deletions
|
|
@ -163,9 +163,10 @@ const model = {
|
|||
}
|
||||
|
||||
try {
|
||||
const response = await api.callJsonApi("delete_work_dir_file", {
|
||||
const response = await api.callJsonApi("plugins", {
|
||||
action: "delete_plugin",
|
||||
plugin_name: plugin.name,
|
||||
path: plugin.path,
|
||||
currentPath: "/",
|
||||
});
|
||||
if (response?.error) {
|
||||
throw new Error(response.error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue