Skip to content

chat: deleting last user tool set should remove .toolsets.jsonc #320484

@jamesmontemagno

Description

@jamesmontemagno

Problem

When deleting user-defined tool sets, removing the final remaining tool set leaves .toolsets.jsonc on disk (often as an empty or effectively empty file).

Expected behavior

If the last user tool set is deleted, the extension should delete .toolsets.jsonc entirely instead of leaving an empty config file behind.

Why this matters

  • Keeps workspace config clean and intention-revealing.
  • Matches user expectation that no tool sets means no tool-set file.
  • Avoids edge cases in file watchers/parsers around empty config artifacts.

Repro

  1. Create .toolsets.jsonc with one user tool set.
  2. Delete that tool set via the UI/action.
  3. Observe file remains instead of being removed.

Suggested fix

  • On delete, if no user tool sets remain, remove .toolsets.jsonc.
  • Respect FS trash capability checks and provide actionable error messages if removal fails.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions