Zed:最快的人工智能代码编辑器
Zed: High-performance AI Code Editor

原始链接: https://zed.dev/blog/fastest-ai-code-editor

Zed,一款用Rust构建的开源代码编辑器,发布了新的Agent面板,将AI直接集成到编辑工作流程中。这允许开发者使用AI代理执行代码探索、编辑和新代码生成等任务,所有操作都在编辑器内完成。与其他解决方案不同,Zed的AI也是开源的,用户可以查看其内部运作方式。与代理的对话默认情况下是私密的。 Agent面板提供代码补全、错误检测,甚至在获得许可后运行终端命令等功能。用户可以选择各种语言模型,包括通过Ollama运行的自定义模型,并通过工具配置文件自定义代理的功能。开发者可以通过Zed对模型上下文协议的支持来扩展代理的功能。 Zed在不使用AI功能的情况下仍然免费使用。付费计划提供有限数量的AI提示,或者用户可以使用自己的API密钥。Zed目前可在macOS和Linux上使用,计划于2025年发布Windows版本。

Hacker News 上热议 Zed,一款新的 AI 代码编辑器,其基于 Rust 的渲染系统 GPUI 使其速度和可定制性备受赞誉。一些用户认为 Zed 的 AI 面板不如 Cursor,但也有人指出它的改进之处。用户分享了各自的使用体验,一些人更喜欢 Zed 的速度和简洁的界面,而另一些人则报告了在某些显示器(尤其是在 Linux 系统的 1440p 显示器上)出现文本模糊和偶尔出现 bug 的问题。讨论还涉及到 Helix 和 Neovim 等替代编辑器,以及对 Copilot 支持和诸如基于树的撤销历史(用于 AI 辅助编辑)等所需功能的讨论。一些人对 Zed 的 AI 功能与 Cursor 和 VS Code Copilot 的比较提出了质疑。另一些人则对 C++ 开发支持、OpenRouter 集成(正在开发中)以及在 Linux 系统上的性能提出了疑问。少数用户指出了某些显示器和 GPU 上字体渲染方面的问题。
相关文章

原文

For millions of years, humans have used tools to create things. We programmers have recently created some very useful tools for ourselves: large language models. So far, these futuristic tools have been accessible to programmers in one of three ways:

  1. Copy/pasting from a website
  2. Running in a terminal emulator
  3. Baked into a closed-source fork of an open-source fork of a web browser

As of today, there is now a fourth option:

Zed, the world’s fastest AI code editor.

The entire Zed code editor is open source under GPL version 3, and scratch-built in Rust all the way down to handcrafted GPU shaders and OS graphics API calls. Zed's new AI capabilities are also open-source, just like the rest of the editor, so you can see exactly what the new Agent Panel is doing under the hood.

Here it is in action:

The Agent Panel lets you tell an AI agent what to do, and it'll do as you asked to the best of its ability. This can be anything from asking questions about your code base to having it directly make changes and write new code.

For example, here I opened the Agent Panel and asked the agent to make a change about a blog post format:

I just typed in the words and pressed Enter; I didn’t have to teach the agent anything about my code base first, or wait for an indexing process to finish. The agent quickly figured out what it needed by searching the code base—the same thing I’d do if I found myself in a new code base and wanted to orient myself.

This example had the agent making a trivial edit, but agents can be helpful even when I want to handcraft code myself. For example, in an unfamiliar part of a large code base, an agent can save me time by tracking down the spot where I need to make the change.

Your conversation with the agent is private by default; Zed doesn't harvest your data for training purposes (or any other purpose). If you want to share feedback to help improve Zed's AI, we've made it easy to do that by pressing a thumbs-up/thumbs-down button... but unless you opt into it by pressing the button, your conversation is never saved on our servers.

The agent will also prompt you for confirmation before doing things that potentially couldn't be undone, like running terminal commands. (You can also tell it to always confirm, if you aren’t worried about what it might run.)

Security prompts aside, generally the agent is designed to run in the background without bothering you, so you can do other things while it works. When the agent is done, you get a notification if you had Zed in the background (including if you had a second Zed window open so you could work on another git checkout while the agent does its thing).

Once it’s done, you can review everything it did in one unified diff.

The diff is fully editable, so you can easily make changes to whatever the model came up with. It supports multicursor editing, language server integrations, and all the speed you love from the rest of Zed.

A dropdown lets you choose which language model powers the agent. In addition to our selection of popular models like Claude 3.7 Sonnet and Gemini 2.5—available either through your Zed account or by bringing your own API key—you can also run custom models on your own hardware via Ollama.

Each agent can access the full capabilities of the editor. That means not only can it edit the filesystem, it can also run language servers, linters, formatters, and even terminal commands in your local shell (with your permission). Every extension you install can give the agent new powers.

You can also customize which powers an agent may use on a given task. Revoking an agent’s access to a tool is as simple as unchecking that tool from a list, and you can save those preferences to Profiles for quickly switching between tool configurations later. Zed ships with three convenient built-in Profiles: Write (all tools enabled), Ask (just the readonly tools), and Minimal (no tools at all, for when you just want to chat with the model).

You can extend the agent’s capabilities with new tools, via Zed’s support for the Model Context Protocol. This can give the agent access to things like databases, analytics, creating pull requests, and browser automation.

As an example of how MCP tools can be tailored to your specific use-case, check out this demo that Elixir creator José Valim made of a MCP tool that works directly with the popular Phoenix Web Framework.

It costs nothing to use Zed without the AI features. As always, you can download Zed (or build it from source) and use it as a non-AI editor without signing up for anything. All the non-AI features will work as normal. This is how it’s always been, and we don’t plan to change that!

You can also pay someone else to use Zed’s AI features. That is, you can bring your own API keys and they will Just Work with the new Agent Panel. As with Zed’s other AI features, you can also use Ollama to run Zed’s agents on your own hardware. (The only AI feature that doesn’t support this yet is Edit Predictions; custom models are on the roadmap but haven’t landed yet.)

We’re also giving away some amount of AI usage. On our free plan you'll get 50 prompts per month and on our new Pro plan you'll get 500 prompts for $20/month. Check out our Pricing page for more details.

We’re offering these plans because monthly limits are a popular alternative pricing structure to usage-based APIs—but if you’d prefer to bring your own API keys and pay (someone else) per token, you absolutely can. It doesn’t cost us anything when you do that, so we don’t charge anything for it either!

Our goal at Zed has always been to make the world’s best code editor. We built the Agent Panel because we believe the world’s best code editor should give its users easy access to helpful AI agents, not because we’re trying to make money by charging a premium on top of third-party AI services.

Long-term, we aim to build a self-sustaining business where revenue comes mostly from optional paid features that make an already-great experience even better.

You can try out Zed’s new Agentic Editing experience right now—just download Zed here. That’s the easiest way to see what you think of it!

Right now, Zed only has a stable release for macOS and Linux. Windows users can build from source, but the reason we don’t have a stable release for Windows is that it’s not finished yet. (Scratch-building an editor means scratch-building support for each OS individually!) We plan to have a stable release of Windows later in 2025, and you can sign up for the beta right now.

As exciting as this launch is, we’re just getting warmed up. Stay tuned for:

  • A major debugger release later this month
  • Improved collaboration between programmers and AI agents
  • Windows!

联系我们 contact @ memedata.com