How zed-industries/zed works
Zed is a high-performance, multiplayer code editor. The main user workflow is opening a project, editing and navigating code in a workspace, and optionally collaborating or using AI assistance; debugging and extension-backed integrations are important parallel capabilities. The tree identifies these subsystems, but most implementation excerpts are absent, so the graph keeps cross-module wiring sparse. The sampled project connection manager uses the client for remote-project reconnection, and the sampled workspace history manager reads and updates persisted workspace history.
Main entry points: agent.rs Agent runtime · main.rs Zed startup · history_manager.rs Workspace · connection_manager.rs Project model
Components 22
Application and editing
- Zed startup
crates/zed/src/main.rs - UI runtime
crates/gpui/src/app.rs - Code editor
crates/editor/src/editor.rs - Workspace
crates/workspace/src/history_manager.rs - Project model
crates/project/src/connection_manager.rs
Multiplayer collaboration
- Collaboration UI
crates/collab_ui/src/collab_ui.rs - Collaboration service
crates/collab/src/lib.rs - Channels
crates/channel/src/channel.rs - Client
crates/client/src/client.rs
AI assistance
- AI assistant UI
crates/agent_ui/src/agent_ui.rs - Agent runtime
crates/agent/src/agent.rs - Agent tools
crates/agent/src/tools.rs - Agent settings
crates/agent_settings/src/agent_settings.rs - Cloud model client
crates/cloud_llm_client/src/cloud_llm_client.rs
Developer integrations
- Debugger UI
crates/debugger_ui/src/debugger_ui.rs - Debug adapter protocol
crates/dap/src/dap.rs - Extensions
crates/extension/src/extension.rs - Context servers
crates/context_server/src/context_server.rs
Workspace state
- Workspace history
crates/workspace/src/history_manager.rs - Workspace database
crates/workspace/src/history_manager.rs
Other components
- Developer
- Model service
Connections 17
- Developer → Zed startup: launches
- Zed startup → UI runtime: runs UI
- Developer → Code editor: edits code
- Developer → Workspace: opens project
- Workspace → Project model: manages
- Workspace history → Workspace database: reads and updates
- Project model → Client: requests reconnection
- Developer → Collaboration UI: collaborates
- Developer → AI assistant UI: requests assistance
- AI assistant UI → Agent runtime: interacts with
- Agent runtime → Agent tools: dispatches tools
- Agent runtime → Cloud model client: requests models
- Cloud model client → Model service: sends requests
- Developer → Debugger UI: debugs
- Debugger UI → Debug adapter protocol: uses protocol
- Developer → Extensions: uses extensions
- Agent runtime → Context servers: integrates context