# agent_ui: Hide manage skills command when AI is disabled \(\#63598\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/003826320f320dace212a67e82b0db92cb457081)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 003826320f320dace212a67e82b0db92cb457081

Requested commit: 003826320f320dace212a67e82b0db92cb457081

Commit: 003826320f320dace212a67e82b0db92cb457081

Tree: 751d8e567fc2c4930d54c0af6deebcbd2dc3b925

Author: kai-xlr

Committer: GitHub

## Message

```
agent_ui: Hide manage skills command when AI is disabled (#63598)

# Objective

Fixes #63495

When `"disable_ai": true` is set, `agent: manage skills` still appears
in the command palette. The action was exposed by the `else` branch of
the `disable_ai` check in `update_command_palette_filter`, which called
`show_action_types` on it — overriding the `hide_namespace("agent")`
applied when AI is disabled.

## Solution

Moved `filter.hide_action_types(&manage_skills_action)` out of the
conditional so it applies regardless of the `disable_ai` setting. Skills
are surfaced through the settings UI now, so the command should never
appear in the palette.

Added test coverage in `test_agent_command_palette_visibility`:
- Asserts `ManageSkills` is hidden even when AI is enabled (the
invariant).
- Asserts `ManageSkills`, `OpenSkillCreator`, and `NewThread` are hidden
when AI is disabled.

## Testing

- `cargo test -p agent_ui` (398 passed)
- `./script/clippy -p agent_ui`
- `cargo fmt --check`
- Manual verification: set `"disable_ai": true`, open the command
palette, filter `agent` — `agent: manage skills` should be absent.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments (no unsafe blocks)
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed `agent: manage skills` still appearing in the command palette
when AI is disabled
```

## Parents

- [b3326e13c142fc8f313aca67a93dd6855a1e7e32](https://git.cafe/gitcafe/zed/commit/b3326e13c142fc8f313aca67a93dd6855a1e7e32?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/003826320f320dace212a67e82b0db92cb457081?format=markdown)
