mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-23 17:10:37 +01:00
7adb97acb9
## Summary Implements user-defined slash commands for the agent panel. Users can create markdown files in `~/.config/zed/commands/` (user-wide) or `.zed/commands/` (project-specific) that expand into templated text when invoked via `/command_name` in the chat interface. ## Features - **File-based commands**: Create `.md` files that become slash commands - **Template expansion**: Use `$1`, `$2`, etc. for positional arguments, or `$ARGUMENTS` for all args - **Namespacing**: Subdirectories create namespaced commands (e.g., `frontend/component.md` → `/frontend:component`) - **Project & user scopes**: Project commands in `.zed/commands/`, user commands in config dir - **Claude compatibility**: Can symlink `~/.claude/commands/` for compatibility - **Caching**: Commands are cached and watched for file changes - **Error handling**: Graceful degradation with error display in UI ## Feature Flag Behind `user-slash-commands` feature flag. ## Testing 52 unit/integration tests covering parsing, validation, expansion, file loading, symlinks, and error handling. --- Release Notes: - N/A (behind feature flag) --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>