From 896c749e76d5abf1a1d266e6b4bf59469296b31c Mon Sep 17 00:00:00 2001 From: iliya Date: Tue, 24 Mar 2026 21:43:43 +0200 Subject: [PATCH] fix: add recursive option to fs.rm for directory removal fs.rm() without { recursive: true } throws ERR_FS_EISDIR on directories, unlike the deprecated fs.rmdir() which handled empty dirs. Also fix broken roadmap bullet in README. --- README.md | 3 +-- src/main/services/extensions/skills/SkillPlanService.ts | 2 +- src/main/services/team/TeamTaskAttachmentStore.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 871050e7..3e1e5fbd 100644 --- a/README.md +++ b/README.md @@ -296,12 +296,11 @@ pnpm dist # macOS + Windows + Linux ## Roadmap - [ ] Planning mode to organize agent plans before execution -- [ ] Visual workflow editor ([@xyflow/react](https://github.com/xyflow/xyflow)) for building and +- [ ] Visual workflow editor ([@xyflow/react](https://github.com/xyflow/xyflow)) for building and orchestrating agent pipelines with drag & drop - [ ] Multi-model support: proxy layer to use other popular LLMs (GPT, Gemini, DeepSeek, Llama, etc.), including offline/local models - [ ] Remote agent execution via SSH: launch and manage agent teams on remote machines over SSH (stream-json protocol over SSH channel, SFTP-based file monitoring for tasks/inboxes/config) - [ ] CLI runtime: Run not only on a local PC but in any headless/console environment (web UI), e.g. VPS, remote server, etc. - [ ] 2 modes: current (agent teams), and a new mode: regular subagents (no communication between them) -orchestrating agent pipelines with drag & drop - [ ] Curate what context each agent sees (files, docs, MCP servers, skills) - [ ] Slash commands diff --git a/src/main/services/extensions/skills/SkillPlanService.ts b/src/main/services/extensions/skills/SkillPlanService.ts index 59763bdd..6be0d05b 100644 --- a/src/main/services/extensions/skills/SkillPlanService.ts +++ b/src/main/services/extensions/skills/SkillPlanService.ts @@ -401,7 +401,7 @@ export class SkillPlanService { if (entries.length > 0) { return; } - await fs.rm(nextDir); + await fs.rm(nextDir, { recursive: true }); } catch { return; } diff --git a/src/main/services/team/TeamTaskAttachmentStore.ts b/src/main/services/team/TeamTaskAttachmentStore.ts index f8a17fc6..fb056535 100644 --- a/src/main/services/team/TeamTaskAttachmentStore.ts +++ b/src/main/services/team/TeamTaskAttachmentStore.ts @@ -180,7 +180,7 @@ export class TeamTaskAttachmentStore { try { const entries = await fs.promises.readdir(dir); if (entries.length === 0) { - await fs.promises.rm(dir); + await fs.promises.rm(dir, { recursive: true }); } } catch { // ignore cleanup errors