Closes #48394 Moves the data collection preference for Zed's Edit Predictions out of the internal KV store and into `settings.json` as a proper `allow_data_collection` setting under `edit_predictions`. **Migration:** Existing users' choices are preserved. When `allow_data_collection` is absent from `settings.json`, the resolved value falls back to the legacy KV entry (`zed_predict_data_collection_choice`). Once the user toggles the setting or sets it explicitly, the new setting takes precedence and the KV entry is ignored. **Bug fixed:** The original implementation of `toggle_data_collection` read the raw (unresolved) settings content to determine the current state. When `allow_data_collection` was absent from `settings.json` but the KV store held `"true"`, the raw read returned `None → false`, causing the first toggle click to write `Some(true)` (re-enabling) instead of `Some(false)` (disabling). The fix reads the resolved `is_data_collection_enabled()` value before entering the `update_settings_file` closure. ## Manual testing **Setting takes effect:** 1. Open settings (`cmd+,`) and add `"allow_data_collection": true` under `edit_predictions`. Save. 2. Open a file — the data collection indicator in the editor should reflect the enabled state. 3. Flip to `false` and confirm it updates. **Toggle correctly disables from KV-enabled state (migration bug fix):** 1. Remove `allow_data_collection` from `settings.json`. 2. Write the legacy KV entry directly: ``` sqlite3 ~/Library/Application\ Support/Zed/db/0-dev/db.sqlite \ "INSERT OR REPLACE INTO kv_store(key,value) VALUES('zed_predict_data_collection_choice','true');" ``` 3. Restart Zed. The data collection toggle should show as **enabled** (reading from KV store). 4. Click the toggle once to disable. `allow_data_collection` should appear as `false` in `settings.json` — not `true`, which was the pre-fix behaviour. **Upsell modal still appears for new users:** 1. Clear both KV keys and restart: ``` sqlite3 ~/Library/Application\ Support/Zed/db/0-dev/db.sqlite \ "DELETE FROM kv_store WHERE key IN ('zed_predict_data_collection_choice','dismissed-edit-predict-upsell');" ``` 2. Open any file so the status bar is visible. 3. Click the edit prediction button (bottom-right status bar) — it should have a muted dot indicator. 4. The upsell modal should appear. Dismissing it should prevent it from reappearing. ## Release Notes: - `allow_data_collection` for Zed's Edit Predictions can now be set explicitly in `settings.json` under `edit_predictions`. Existing preferences stored in the internal database are preserved as a fallback. --------- Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com> |
||
|---|---|---|
| .cargo | ||
| .cloudflare | ||
| .config | ||
| .factory | ||
| .github | ||
| .zed | ||
| assets | ||
| ci | ||
| crates | ||
| docs | ||
| extensions | ||
| legal | ||
| nix | ||
| script | ||
| tooling | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .prettierrc | ||
| .rules | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| clippy.toml | ||
| CODE_OF_CONDUCT.md | ||
| codebook.toml | ||
| compose.yml | ||
| CONTRIBUTING.md | ||
| debug.plist | ||
| default.nix | ||
| Dockerfile-collab | ||
| Dockerfile-collab.dockerignore | ||
| Dockerfile-cross.dockerignore | ||
| Dockerfile-distros | ||
| Dockerfile-distros.dockerignore | ||
| flake.lock | ||
| flake.nix | ||
| GEMINI.md | ||
| LICENSE-AGPL | ||
| LICENSE-APACHE | ||
| LICENSE-GPL | ||
| livekit.yaml | ||
| lychee.toml | ||
| Procfile | ||
| Procfile.all | ||
| Procfile.web | ||
| README.md | ||
| renovate.json | ||
| REVIEWERS.conl | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
| shell.nix | ||
| typos.toml | ||
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Sponsorship
Zed is developed by Zed Industries, Inc., a for-profit company.
If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.