diff --git a/tips/acp-registry-install-agents.mdx b/tips/acp-registry-install-agents.mdx new file mode 100644 index 0000000..ca820d5 --- /dev/null +++ b/tips/acp-registry-install-agents.mdx @@ -0,0 +1,55 @@ +--- +title: Install AI Agents from ACP Registry +subtitle: Discover and install specialized agents directly from Zed's Agent Registry +category: ai +difficulty: beginner +tags: + - agent + - ai + - acp + - registry +prUrl: 'https://github.com/zed-industries/zed/pull/47470' +publishedAt: '2026-01-29' +updatedAt: '2026-01-29' +author: godruoyi +authorUrl: 'https://github.com/godruoyi' +mediaType: image +mediaUrl: 'https://cat.zed.tips/2026-01-29/acp-registry-install-agents-b1ff6f85.jpg' +--- + +Zed now features an **ACP Registry** that lets you discover and install specialized AI agents directly from the editor. Think of it like a package manager for AI agents - browse available agents and install the ones that fit your workflow. + +## What is the ACP Registry? + +The ACP (Agent Communication Protocol) Registry is Zed's official catalog of AI agents. These are specialized agents designed for specific tasks like code review, debugging, refactoring, or documentation generation. + +## How to Install Agents + +1. Open the Agent Panel +2. Click the "Install Agent" button or use the agent picker +3. Browse available agents from the registry +4. Select an agent and click "Install" +5. The agent is immediately available for use + +## Why Use Registry Agents? + +**Specialized capabilities**: Each agent is optimized for specific tasks rather than being a general-purpose assistant. + +**Curated collection**: Agents are vetted and maintained by the Zed team and community. + +**Easy updates**: Installed agents can be updated when new versions are available. + +**No configuration needed**: Agents come pre-configured and ready to use. + +## Example Use Cases + +- Install a code review agent for automated PR reviews +- Add a documentation agent to generate/improve docstrings +- Get a debugging agent specialized in finding and fixing bugs +- Use a refactoring agent for code quality improvements + +The registry makes it effortless to expand your AI toolkit without manual configuration! + +--- + +**Related PR**: [#47470](https://github.com/zed-industries/zed/pull/47470) diff --git a/tips/agent-diagnostics-context.mdx b/tips/agent-diagnostics-context.mdx new file mode 100644 index 0000000..f764354 --- /dev/null +++ b/tips/agent-diagnostics-context.mdx @@ -0,0 +1,70 @@ +--- +title: Add Code Errors to Agent Context with @diagnostics +subtitle: Feed LSP diagnostics directly into your agent conversations +category: ai +difficulty: beginner +tags: + - agent + - ai + - diagnostics + - context + - debugging +author: GoldStrikeArch +authorUrl: 'https://github.com/GoldStrikeArch' +prUrl: 'https://github.com/zed-industries/zed/pull/42270' +mediaType: image +mediaUrl: 'https://cat.zed.tips/2026-01-29/agent-diagnostics-context-d8b76c97.gif' +publishedAt: '2026-01-29' +updatedAt: '2026-01-29' +--- + +When working in the Agent Panel, you can now use **@diagnostics** to inject current language server errors and warnings directly into your conversation. This makes it effortless to get AI help fixing compiler errors or code issues. + +## How to Use + +1. Open the Agent Panel and start a new thread +2. Type `@diagnostics` in the message editor +3. Select it from the autocomplete menu +4. The agent receives all current LSP diagnostics as context +5. Ask the agent to fix the errors + +## What Gets Included + +By default, @diagnostics includes: +- **Errors**: All compilation errors from your language server +- **File locations**: Exact file paths and line numbers +- **Error messages**: Full diagnostic descriptions + +You can also include warnings with: +``` +@diagnostics?include_warnings=true +``` + +## Example Workflow + +``` +You: @diagnostics Fix these TypeScript errors + +Agent: I see 3 type errors in your code: +1. src/app.ts:42 - Property 'name' does not exist on type 'User' +2. src/utils.ts:15 - Type 'string' is not assignable to type 'number' +... + +Let me fix them for you. +``` + +## Why It's Useful + +**Faster debugging**: No need to manually copy-paste error messages into the chat. + +**Full context**: The agent sees all errors at once, not just the one you're focused on. + +**Cursor-aware workflow**: Stay in the Agent Panel instead of switching to slash commands or text threads. + +**Parity with text threads**: Brings the `/diagnostics` slash command functionality to the new thread experience. + +Perfect for when you have a pile of compiler errors and need AI assistance to resolve them quickly! + +--- + +**Related PR**: [#42270](https://github.com/zed-industries/zed/pull/42270) diff --git a/tips/agent-edit-queued-messages.mdx b/tips/agent-edit-queued-messages.mdx new file mode 100644 index 0000000..89dddfe --- /dev/null +++ b/tips/agent-edit-queued-messages.mdx @@ -0,0 +1,52 @@ +--- +title: Edit Queued Agent Messages Before Sending +subtitle: Modify your queued prompts on the fly with Cmd+E +category: ai +difficulty: beginner +tags: + - agent + - ai + - workflow + - editing +author: danilo-leal +authorUrl: 'https://github.com/danilo-leal' +prUrl: 'https://github.com/zed-industries/zed/pull/47234' +mediaType: video +mediaUrl: 'https://cat.zed.tips/2026-01-29/agent-edit-queued-messages-92be8fc4.mov' +publishedAt: '2026-01-29' +updatedAt: '2026-01-29' +--- + +When you send multiple prompts to the agent while it's still processing, they get queued. Now you can **edit those queued messages** before they're sent - perfect for when you realize you want to refine your request. + +## How to Edit Queued Messages + +1. Send a message to the agent while it's processing another +2. Your message gets added to the queue +3. Press **Cmd+E** from the message editor +4. The first queued message becomes editable +5. Make your changes and: + - Press Enter to save changes (message stays queued) + - Click "Send Now" to send immediately + - Unfocus to keep editing later + +## Key Behaviors + +**Editing while processing**: If you're still editing when the queue reaches your message, it won't be sent automatically. You must explicitly click "Send Now." + +**Context preservation**: Queued messages show all context buttons and mentions just like regular messages, so you can see exactly what will be sent. + +**No layout shift**: The editor renders the same way whether editing or queued, making the experience smooth and predictable. + +## Why It's Useful + +- **Catch mistakes**: Fix typos or clarify instructions before the agent sees them +- **Add context**: Include additional @-mentions or details you initially forgot +- **Change direction**: Revise your approach based on the agent's current response +- **Better workflow**: Queue multiple rough ideas, then polish them before sending + +This feature gives you complete control over your agent interactions, even when working at a fast pace! + +--- + +**Related PR**: [#47234](https://github.com/zed-industries/zed/pull/47234) diff --git a/tips/agent-per-tool-permissions.mdx b/tips/agent-per-tool-permissions.mdx new file mode 100644 index 0000000..deeaaad --- /dev/null +++ b/tips/agent-per-tool-permissions.mdx @@ -0,0 +1,98 @@ +--- +title: Set Granular Permissions for Agent Tools +subtitle: Control what the AI agent can do with per-tool permission rules +category: ai +difficulty: intermediate +tags: + - agent + - ai + - security + - permissions + - configuration +author: rtfeldman +authorUrl: 'https://github.com/rtfeldman' +prUrl: 'https://github.com/zed-industries/zed/pull/46284' +mediaType: image +mediaUrl: 'https://cat.zed.tips/2026-01-29/agent-per-tool-permissions-81e93ab1.png' +publishedAt: '2026-01-29' +updatedAt: '2026-01-29' +--- + +Take control of your AI agent's actions with **granular tool permissions**. Instead of confirming every single tool use, set rules for which commands, files, or URLs the agent can access automatically. + +## How It Works + +When the agent wants to use a tool (run a terminal command, edit a file, fetch a URL), Zed checks your permission rules. You can set per-tool policies that automatically: + +- **Always allow** specific patterns (e.g., `git` commands) +- **Always deny** dangerous operations (e.g., `rm -rf`) +- **Always confirm** everything else (default) + +## Quick Setup + +Add rules to your `settings.json`: + +```json +{ + "agent": { + "tool_permissions": { + "tools": { + "terminal": { + "default_mode": "confirm", + "always_allow": ["^git\\s", "^npm\\s", "^cargo\\s"], + "always_deny": ["^rm\\s+-rf", "^sudo\\s"] + }, + "edit_file": { + "default_mode": "allow", + "always_deny": ["^\\.env", "^/etc/"] + } + } + } + } +} +``` + +## Smart Permission Buttons + +When a tool requires confirmation, the dialog shows contextual options: + +- **"Always allow ``"** - Trust this tool completely +- **"Always allow ``"** - Auto-approve specific patterns: + - Terminal: Command names (e.g., `cargo`, `npm`) + - Files: Parent directory paths + - URLs: Domain names +- **"Allow"** / **"Deny"** - One-time decision + +These buttons automatically update your settings, so you only need to decide once. + +## Supported Tools + +- `terminal` - Shell commands +- `edit_file`, `save_file` - File modifications +- `delete_path`, `move_path`, `copy_path` - File operations +- `create_directory` - Directory creation +- `fetch`, `web_search` - Network requests +- `mcp::` - Third-party MCP tools + +## Pattern Extraction + +Zed intelligently extracts patterns from tool inputs: +- Terminal commands → `^cargo\\s`, `^npm\\s` +- File paths → `^/Users/alice/project/src/` +- URLs → `^https?://github\\.com` + +## Why It's Useful + +**Safety**: Block destructive commands like `rm -rf` or `sudo` automatically. + +**Productivity**: Skip repetitive confirmations for trusted tools like `git` or `npm`. + +**Fine-grained control**: Allow file edits in your project but deny system files. + +**MCP support**: Set permissions for third-party tools from context servers. + +Perfect for users who want the agent to work autonomously within safe boundaries! + +--- + +**Related PR**: [#46284](https://github.com/zed-industries/zed/pull/46284) diff --git a/tips/editorconfig-parent-directories.mdx b/tips/editorconfig-parent-directories.mdx new file mode 100644 index 0000000..43f48db --- /dev/null +++ b/tips/editorconfig-parent-directories.mdx @@ -0,0 +1,81 @@ +--- +title: Inherit EditorConfig from Parent Directories +subtitle: Apply editor settings from outside your project directory +category: config +difficulty: beginner +tags: + - editorconfig + - configuration + - settings + - inheritance +author: smitbarmase +authorUrl: 'https://github.com/smitbarmase' +prUrl: 'https://github.com/zed-industries/zed/pull/46332' +publishedAt: '2026-01-29' +updatedAt: '2026-01-29' +--- + +Zed now supports **EditorConfig inheritance** from parent directories. If you have organization-wide or machine-wide editor settings, place them in a parent directory and all nested projects will inherit them. + +## How It Works + +When Zed finds a `.editorconfig` file in your project, it also traverses **parent directories** up to the filesystem root looking for additional config files. Settings are applied in order: + +1. Furthest parent config (applied first) +2. Closer parent configs (override) +3. Project config (final override) + +## Example Setup + +``` +/Users/you/ + .editorconfig # Personal defaults + /company/ + .editorconfig # Company standards + /project-a/ + .editorconfig # Project-specific + /project-b/ + .editorconfig # Project-specific +``` + +In this setup: +- `project-a` inherits from `/company/.editorconfig` and `/Users/you/.editorconfig` +- Project configs override company configs +- Company configs override personal configs + +## Stopping Inheritance + +Use `root = true` in any `.editorconfig` to stop looking in parent directories: + +```ini +# /company/.editorconfig +root = true + +[*] +indent_style = space +indent_size = 2 +``` + +Now projects under `/company/` won't inherit from `/Users/you/.editorconfig`. + +## Common Use Cases + +**Organization standards**: Put company coding style in a parent directory shared by all projects. + +**Machine-wide defaults**: Set your personal preferences once at `~/.editorconfig` for all projects. + +**Monorepo configurations**: Have workspace-level settings with package-level overrides. + +**Team consistency**: Ensure everyone inherits the same base settings, with project-specific tweaks. + +## How External Configs Are Loaded + +- **Local projects**: File watchers detect changes immediately +- **Remote/SSH projects**: Configs are sent to remote clients +- **Collab/sharing**: External configs are shared with guests + +Perfect for teams that want consistent editor settings across multiple projects without duplicating config files! + +--- + +**Related PR**: [#46332](https://github.com/zed-industries/zed/pull/46332) diff --git a/tips/vim-tag-stack-navigation.mdx b/tips/vim-tag-stack-navigation.mdx new file mode 100644 index 0000000..57ea0e9 --- /dev/null +++ b/tips/vim-tag-stack-navigation.mdx @@ -0,0 +1,73 @@ +--- +title: Navigate Code with Vim Tag Stack +subtitle: Jump through definition history with dedicated tag navigation commands +category: shortcuts +difficulty: intermediate +tags: + - vim + - navigation + - go-to-definition + - workflow +author: zenazn +authorUrl: 'https://github.com/zenazn' +prUrl: 'https://github.com/zed-industries/zed/pull/46002' +publishedAt: '2026-01-29' +updatedAt: '2026-01-29' +--- + +Vim users rejoice! Zed now supports **tag stack navigation** - a dedicated history for "Go to Definition" jumps. Instead of mixing definition jumps with your regular navigation history, they're tracked in a separate stack. + +## How It Works + +Every time you use "Go to Definition" (or hover links), Zed records: +- **Origin**: Where you jumped from +- **Target**: Where you jumped to + +These are stored in a separate tag stack, independent of your regular back/forward history. + +## Navigation Commands + +Use these new commands to navigate the tag stack: + +- **`pane: go to older tag`** - Jump back through definition history +- **`pane: go to newer tag`** - Jump forward through definition history + +## Why It's Better Than Browser History + +**Traditional browser-style history**: When you go back, you wade through every cursor movement, search, and file switch. + +**Tag stack**: Only tracks definition jumps, so going back takes you directly to where you started the investigation - not through every intermediate step. + +## Example Workflow + +``` +1. Working in app.tsx (origin) +2. Cmd+Click on UserService.login() → jumps to service.ts +3. Cmd+Click on authenticate() → jumps to auth.ts +4. Cmd+Click on validateToken() → jumps to token.ts + +Now use "go to older tag": +- First press → back to auth.ts +- Second press → back to service.ts +- Third press → back to app.tsx (your original location) +``` + +## Recommended Keybindings + +For Vim users, consider mapping to traditional Vim tag bindings: + +```json +{ + "context": "VimControl && !menu", + "bindings": { + "ctrl-]": "editor::GoToDefinition", + "ctrl-t": "pane::GoToOlderTag" + } +} +``` + +This brings familiar Vim tag navigation to Zed! + +--- + +**Related PR**: [#46002](https://github.com/zed-industries/zed/pull/46002)