Skip to content

Add Remove menu for coding agents - #12329

Open
wwwwwwwkkkkkkk wants to merge 1 commit into
omacom:quattrofrom
wwwwwwwkkkkkkk:add-agent-removal-menu
Open

wwwwwwwkkkkkkk wants to merge 1 commit into
omacom:quattrofrom
wwwwwwwkkkkkkk:add-agent-removal-menu

Conversation

@wwwwwwwkkkkkkk

Copy link
Copy Markdown

What changed

Adds a Remove → Agents submenu for Omarchy-managed coding-agent CLIs.

  • Shows only agents with an Omarchy-generated launcher and installed mise versions.
  • Uses the existing branded agent icons from Setup → Defaults → Agent.
  • Confirms before removal and keeps chats, credentials, settings, and project files.
  • Removes the launcher and all mise-managed versions of the selected CLI.
  • Clears the default-agent selection only when it points to the removed agent.
  • Keeps Hermes Desktop and OpenClaw on their existing Remove → AI paths.
  • Detects installed versions with mise ls --installed --json, so a missing selected version does not hide a still-installed agent.

Supported current agents include Antigravity, Claude Code, Codex, Copilot, Crush, Cursor CLI, Grok, Hermes, Muse, Oh My Pi, OpenCode, Ori, and Pi. A legacy Gemini CLI entry is retained for older installations.

Validation

  • bash test/shell.d/remove-agent-test.sh
  • bash test/shell.d/menu-test.sh
  • bash test/shell.d/config-test.sh
  • ./test/cli

The focused removal tests cover cancellation, ownership checks, missing selected versions, malformed or unavailable inventories, failed removals, preserved user data, Hermes handling, and branded menu icons.

@smfworks smfworks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Live receipt from an Omarchy box whose Hermes is the official git install (install.sh / hermes update), not pipx:hermes-agent / mise. Wrapper is exec ~/.hermes/hermes-agent/venv/bin/python ~/.hermes/hermes-agent/hermes — no # Written by omarchy-install-hermes-cli. marker. hermes-desktop 2026.8.31-3 is also installed; runtime is still the git tree (Hermes Agent v0.21.3, method git). Did not run the mutating remove.

On this tree (1eef1e7):

bash test/shell.d/remove-agent-test.sh   # pass, including the Hermes desktop-exclusion case
bash test/shell.d/menu-test.sh           # pass

--check hermes against the live home:

  • as-is (omarchy-pkg-present hermes-desktop → 0): exit 1
  • with omarchy-pkg-present mocked to fail (git Desktop, no package): exit 1
  • ~/.local/bin/hermes and ~/.config/omarchy/defaults/agent (grok) untouched

So Remove → Agents will not offer Hermes here. The pipx: / mise tool name only applies to an Omarchy-marked CLI stub; the official installer is foreign via --owns, and Desktop is excluded when the package is present. That matches the PR claim (Desktop / OpenClaw stay on Remove → AI).

One leftover hole, not blocking this machine: Desktop exclusion is only omarchy-pkg-present hermes-desktop (same detector #11000 is replacing). A leftover marked CLI stub plus a git Desktop without the package would still pass --check hermes and --remove would delete that stub. Official install.sh wrappers stay hidden even in that case.

OpenClaw correctly rejected (Unknown agent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants