id stringlengths 20 30 | source stringclasses 1
value | chunk_index int64 0 520k | token_count int32 154 512 | content stringlengths 185 57.5k |
|---|---|---|---|---|
rust_dataset_chunk_509400 | rust_dataset.txt | 509,400 | 512 | would make the code more similar to what it was BEFORE the user's edit, output `NO_EDITS` instead
- When uncertain, predict only the minimal, high-confidence portion of the edit
## Output Format
Follow the same output format as before, with one addition:
- If the code is complete as-is and no edits should be made, ... |
rust_dataset_chunk_509401 | rust_dataset.txt | 509,401 | 512 | incomplete after the user's edit, output `NO_EDITS` rather than "fixing" it by reverting
- Only add NEW content that extends the user's work forward; never restore what they removed
- **Key test**: if your prediction would make the code more similar to what it was BEFORE the user's edit, output `NO_EDITS` instead
... |
rust_dataset_chunk_509402 | rust_dataset.txt | 509,402 | 512 | .
- Hunks preceded by `// User accepted prediction:` indicate code that was auto-generated by a previous prediction and accepted by the user. These are treated differently than user-typed edits (see Rules).
2. A set of *related excerpts* from the user's codebase. Some of these may be needed for correctly predicting t... |
rust_dataset_chunk_509403 | rust_dataset.txt | 509,403 | 512 | do not omit or alter them. Before writing the end marker, verify that the lines just before it match the original lines just before that marker (unless you intend to delete them).
- To delete code, prefer a span whose end marker lies **beyond** the deleted code, so that your output still ends with reproduced unchang... |
rust_dataset_chunk_509404 | rust_dataset.txt | 509,404 | 512 | on `Product` is `price`, so they must intend to sum the prices.
`````
<|marker_Tx2v|>
let mut total = 0;
for product in products {
total += product.price;
}
total
<|marker_e9Kd|>
`````
## Example 2
The user appears to be in the process of typing an eprintln call. Rather than fixing the spell... |
rust_dataset_chunk_509405 | rust_dataset.txt | 509,405 | 512 | 1t|>
let permissions = fetch_permissions(&user);
Response::ok(user, permissions)
}
<|marker_2dXe|>
`````
### User Edit History
`````
--- a/src/db.rs
+++ b/src/db.rs
@@ -10,7 +10,7 @@
-fn fetch_user(user_id: UserId) -> User {
+fn fetch_user_cached(user_id: UserId) -> User {
`````
### Current File
`````src/db... |
rust_dataset_chunk_509406 | rust_dataset.txt | 509,406 | 512 | even though the code appears broken.**
### User Edit History
`````
--- a/config.nix
+++ b/config.nix
@@ -10,7 +10,7 @@
# /etc/modular/crashdb needs to be mutable
- ln -s /tmp/crashdb $out/etc/modular/crashdb
+ ln -s /tmp/cr $out/etc/modular/crashdb
'';
`````
### Current File
`````config.nix
<|marker_... |
rust_dataset_chunk_509407 | rust_dataset.txt | 509,407 | 512 | _id)
timestamp = datetime.now(<|user_cursor|>)
return render(report)
<|marker_nV5s|>
`````
`````
<|marker_Gc2f|>
import json
from datetime import datetime
from app.reports import load_report, render
<|marker_x7Qe|>
`````
## Example 7
The user accepted a prediction for a function, then started renaming it. T... |
rust_dataset_chunk_509408 | rust_dataset.txt | 509,408 | 512 | predict the user's next edits as a sequence of marker-bounded spans.
--- FILE: zed/crates/edit_prediction_cli/src/prompts/teacher.md ---
# Instructions
You are an edit prediction assistant in a code editor. Your task is to predict the next edit to a given region of code surrounding the user's cursor.
1. Analyze th... |
rust_dataset_chunk_509409 | rust_dataset.txt | 509,409 | 512 | When edit history and surrounding code suggest different edits, prioritize the most recent edits in the history as they best reflect current intent.
- Treat partial text at or near the cursor as the beginning of something the user is actively typing. Complete the code the user appears to be creating based on context.
... |
rust_dataset_chunk_509410 | rust_dataset.txt | 509,410 | 512 | `````
- If there is a specific place in the predicted output where the user is likely to edit next, indicate it using the `<|user_cursor|>` tag.
## Example 1
There is code missing at the cursor location. The related excerpts includes the definition of a relevant type. You should fill in the missing code.
### Relate... |
rust_dataset_chunk_509411 | rust_dataset.txt | 509,411 | 512 | {
modal_state.close();
epr<|user_cursor|>modal_state.dismiss();
<|editable_region_end|>
}
`````
### Output
The user is clearly starting to type `eprintln!()`, however, what they intend to print is not obvious. I should fill in the print call and string literal, with the cursor positioned inside the string li... |
rust_dataset_chunk_509412 | rust_dataset.txt | 509,412 | 512 | ystroke(modal_state: &mut ModalState, evt: &Event) {
<|editable_region_end|>
`````
## Example 4
The code is already complete and there is no clear next edit to make. You should output NO_EDITS.
### User Edit History
`````
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -10,7 +10,7 @@
fn add(a: i32, b: i32) -> i32 {
- ... |
rust_dataset_chunk_509413 | rust_dataset.txt | 509,413 | 512 | it. The original arguments were auto-generated (marked with `// User accepted prediction:`), so they CAN be updated to match the new function name. This is NOT reverting user input—it's improving auto-generated scaffolding.
### User Edit History
`````
--- a/math_utils.py
+++ b/math_utils.py
@@ -3,3 +3,5 @@
def calc... |
rust_dataset_chunk_509414 | rust_dataset.txt | 509,414 | 512 | Itertools;
use postage::watch;
use project::Worktree;
use strum::VariantArray;
use util::{ResultExt as _, maybe, rel_path::RelPath};
use worktree::ChildEntriesOptions;
/// Matches the most common license locations, with US and UK English spelling.
static LICENSE_FILE_NAME_REGEX: LazyLock<regex::bytes::Regex> = LazyLoc... |
rust_dataset_chunk_509415 | rust_dataset.txt | 509,415 | 512 | OpenSourceLicense::MIT => "mit",
OpenSourceLicense::UPL1_0 => "upl-1.0",
OpenSourceLicense::Zlib => "zlib",
}
}
pub fn patterns(&self) -> &'static [&'static str] {
match self {
OpenSourceLicense::Apache2_0 => &[
include_str!("../license_patte... |
rust_dataset_chunk_509416 | rust_dataset.txt | 509,416 | 512 | optional: bool,
/// Indicates the number of characters that can be skipped before matching `text`.
match_any_chars: Range<usize>,
/// The text to match, may be empty.
text: String,
}
/// Lines that start with "-- " begin a `PatternPart`. `-- 1..10` specifies `match_any_chars:
/// 1..10`. `-- 1..10 ... |
rust_dataset_chunk_509417 | rust_dataset.txt | 509,417 | 512 | (&line);
}
if part != PatternPart::default() {
pattern.push(part);
}
Ok((pattern, approximate_max_length))
}
/// Checks a pattern against text by iterating over the pattern parts in reverse order, and checking
/// matches with the end of a prefix of the input. Assumes that `canonicalize_license... |
rust_dataset_chunk_509418 | rust_dataset.txt | 509,418 | 512 | .len() >= char_count_range.end * 4 {
return false;
}
char_count_range.contains(&string.chars().count())
}
/// Canonicalizes license text by removing all non-alphanumeric characters, lowercasing, and turning
/// runs of whitespace into a single space. Unicode alphanumeric characters are intentionally
//... |
rust_dataset_chunk_509419 | rust_dataset.txt | 509,419 | 512 | _match(path_bytes) {
files_to_check_tx.unbounded_send(rel_path.clone()).ok();
}
}
}
worktree::Event::DeletedEntry(_)
| worktree::Event::UpdatedGitRepositories(_)
| worktree::Event::Upd... |
rust_dataset_chunk_509420 | rust_dataset.txt | 509,420 | 512 | let text = fs.load(&abs_path).await.log_err()?;
let is_eligible = detect_license(&text).is_some();
if is_eligible {
log::debug!(
"`{abs_path:?}` matches a license that is eligible for data collection (if enabled)"
);
} else {
log::debug!(
... |
rust_dataset_chunk_509421 | rust_dataset.txt | 509,421 | 512 | ().unwrap();
for entry in walkdir::WalkDir::new(&homedir) {
walked_entries += 1;
if walked_entries % 10000 == 0 {
println!(
"So far visited {} files in {}",
walked_entries,
homedir.display()
);
... |
rust_dataset_chunk_509422 | rust_dataset.txt | 509,422 | 512 | APACHE_2_0_TXT}\n\nThe terms in this license are void if P=NP."
)),
None
);
}
#[test]
fn test_bsd_1_clause_positive_detection() {
assert_matches_license(
include_str!("../license_examples/bsd-1-clause.txt"),
OpenSourceLicense::BSD,
);
... |
rust_dataset_chunk_509423 | rust_dataset.txt | 509,423 | 512 | _examples/mit-ex3.txt"),
OpenSourceLicense::MIT,
);
}
#[test]
fn test_mit_negative_detection() {
let license_text = format!(
r#"{MIT_TXT}
This project is dual licensed under the MIT License and the Apache License, Version 2.0."#
);
assert... |
rust_dataset_chunk_509424 | rust_dataset.txt | 509,424 | 512 | max_chars;
assert_eq!(
is_char_count_within_range(&random_string, char_count_range.clone()),
char_count_range.contains(&random_char_count),
);
}
}
#[test]
fn test_license_file_name_regex() {
// Test basic license file names
ass... |
rust_dataset_chunk_509425 | rust_dataset.txt | 509,425 | 512 | assert!(LICENSE_FILE_NAME_REGEX.is_match(b"LICENCE_isc.MD"));
// Test edge cases that should match
assert!(LICENSE_FILE_NAME_REGEX.is_match(b"license.mit"));
assert!(LICENSE_FILE_NAME_REGEX.is_match(b"licence-upl.txt"));
// Test non-matching patterns
assert!(!LICENSE_FILE_NAME... |
rust_dataset_chunk_509426 | rust_dataset.txt | 509,426 | 512 | !(watcher, LicenseDetectionWatcher::SingleFile));
assert!(!watcher.is_project_open_source());
}
#[gpui::test]
async fn test_watcher_updates_on_changes(cx: &mut TestAppContext) {
init_test(cx);
let fs = FakeFs::new(cx.background_executor.clone());
fs.insert_tree("/root", jso... |
rust_dataset_chunk_509427 | rust_dataset.txt | 509,427 | 512 | fs.clone(),
Default::default(),
true,
WorktreeId::from_proto(0),
&mut cx.to_async(),
)
.await
.unwrap();
let watcher = cx.update(|cx| LicenseDetectionWatcher::new(&worktree, cx));
assert!(matches!(watcher, LicenseDetect... |
rust_dataset_chunk_509428 | rust_dataset.txt | 509,428 | 512 | -4-6 \
--instruction "Fix the bug described in..." \
--timeout 600 \
--output-dir /logs/agent
```
`eval-cli` reads provider API keys from environment variables such as
`ANTHROPIC_API_KEY` and `OPENAI_API_KEY`. It writes `result.json`, `thread.md`,
and `thread.json` to the output directory.
### Exit codes
| Cod... |
rust_dataset_chunk_509429 | rust_dataset.txt | 509,429 | 512 | -eval doctor --create-volume
```
Deploy the Modal app once before launching runs, and again after changing the
Python orchestration code:
```sh
zed-eval deploy
```
Deploying replaces the live app and can cancel in-flight runs, so avoid running
it while evals are active.
Launch a small benchmark run from your curren... |
rust_dataset_chunk_509430 | rust_dataset.txt | 509,430 | 512 |
zed-eval run deepswe --from local --n-tasks 10
# Inspect what would happen without launching
zed-eval run swe-atlas --from v0.210.0 --plan
zed-eval run deepswe --from local --dry-run
```
Supported benchmark selectors:
| Selector | Meaning | Scoring |
| --- | --- | --- |
| `swe-atlas` | `qna`, `rf`, and `tw` | LLM j... |
rust_dataset_chunk_509431 | rust_dataset.txt | 509,431 | 512 | ude-sonnet-4-6`
Common agent model examples:
```sh
zed-eval run rf --model sonnet-4.6 --n-tasks 2
zed-eval run rf --model opus-4.5 --n-tasks 2
zed-eval run rf --model baseten:kimi-k2.7-code --n-tasks 2
zed-eval run rf --model baseten:deepseek-v4-pro --n-tasks 2
```
For SWE-Atlas judge defaults, `--judge auto` uses:
... |
rust_dataset_chunk_509432 | rust_dataset.txt | 509,432 | 512 | 's work or modify the parent run.
```sh
zed-eval rejudge <parent-run-id> --judge deepseek-v4-pro
zed-eval rejudge <parent-run-id> --judge kimi-k2.7-code --dry-run
zed-eval report <derived-run-id> --fetch
```
If the parent run is not in your local run index, pass `--experiment-name` and
possibly `--namespace`.
## Bas... |
rust_dataset_chunk_509433 | rust_dataset.txt | 509,433 | 512 | also exposes installed-agent classes used by the remote
orchestrator:
- `zed_eval.agent:ZedAgent` for Harbor
- `zed_eval.pier_agent:ZedPierAgent` for Pier
For manual Harbor experiments with a locally built Linux binary:
```sh
pip install -e crates/eval_cli/zed_eval/
crates/eval_cli/script/build-linux
harbor run -d... |
rust_dataset_chunk_509434 | rust_dataset.txt | 509,434 | 512 | _extension_api as zed;
struct MyExtension {
// ... state
}
impl zed::Extension for MyExtension {
// ...
}
zed::register_extension!(MyExtension);
```
## Testing your extension
To run your extension in Zed as you're developing it:
- Make sure you have [Rust installed](https://www.rust-lang.org/learn/get-sta... |
rust_dataset_chunk_509435 | rust_dataset.txt | 509,435 | 512 | to functions, enabling interaction with global state, windows, entities, and system services.
---
## `App`
The root context granting access to the application's global state. This context owns all entities' data and can be used to read or update the data referenced by an `Entity<T>`.
## `Context<T>`
A context pro... |
rust_dataset_chunk_509436 | rust_dataset.txt | 509,436 | 512 | .
Actions are similar to framework-level events like `MouseDown`, `KeyDown`, etc, but you can define them yourself:
```rust
mod menu {
#[gpui::action]
struct MoveUp;
#[gpui::action]
struct MoveDown;
}
```
Actions are frequently unit structs, for which we have a macro. The above could also be written... |
rust_dataset_chunk_509437 | rust_dataset.txt | 509,437 | 512 | ["menu::Move", {direction: "up", select: false}]
"down": ["menu::Move", {direction: "down", select: false}]
"shift-up": ["menu::Move", {direction: "up", select: true}]
"shift-down": ["menu::Move", {direction: "down", select: true}]
}
}
```
--- FILE: zed/crates/gpui/examples/README.md ---
# GPUI Example... |
rust_dataset_chunk_509438 | rust_dataset.txt | 509,438 | 512 | 30/TuGoUUFzXI5FBtUq5a8bjKYTZjtRU6Sgv3NaV_SNmI0b8QQCQmHn6B2OHjbL_08AlXQly-A.ttf)
from Google Fonts' CDN. The 219 KB font is licensed under the
[SIL Open Font License](https://github.com/google/fonts/blob/main/ofl/notosansdevanagari/OFL.txt).
The CDN permits cross-origin requests and caches the font for one year.
No samp... |
rust_dataset_chunk_509439 | rust_dataset.txt | 509,439 | 512 | , and render a `div`.
- `input` demonstrates text input, focus, selections, clipboard actions, and
keyboard bindings.
- `uniform_list` shows how to render a simple virtualized list.
- `testing` demonstrates `#[gpui::test]`, `TestAppContext`, actions, focus, and
window-based tests.
## Layout and styling
- `grid_la... |
rust_dataset_chunk_509440 | rust_dataset.txt | 509,440 | 512 | display and preserves its app and todo
entities while attaching to or detaching from Wayland or X11. Run it on Linux
with `cargo run -p gpui --example toggle_headless`; its stdin commands are
`ls`, `create [message]`, `open`, `close`, and `quit`. `open` attaches to the
display server in the process environment... |
rust_dataset_chunk_509441 | rust_dataset.txt | 509,441 | 512 | OS** — Rendering uses Metal and is always available, but glyph rasterization needs `font-kit`. Without it, GPUI falls back to a placeholder text system that lays text out but renders no glyphs.
```toml
gpui_platform = { version = "*", features = ["font-kit"] }
```
- **Linux / FreeBSD** — enable at least o... |
rust_dataset_chunk_509442 | rust_dataset.txt | 509,442 | 512 | a view. A view is simply an `Entity` that can be rendered, by implementing the `Render` trait. At the start of each frame, GPUI will call this render method on the root view of a given window. Views build a tree of `elements`, lay them out and style them with a tailwind-style API, and then give them to GPUI to turn in... |
rust_dataset_chunk_509443 | rust_dataset.txt | 509,443 | 512 | and they're how we convey hundreds of actions without relying on labeled buttons.
When introducing a new icon, it's important to ensure consistency with the existing set, which follows these guidelines:
1. The SVG view box should be 16x16.
2. For outlined icons, use a 1.2px stroke width.
3. Not all icons are mathemat... |
rust_dataset_chunk_509444 | rust_dataset.txt | 509,444 | 512 | -based style manipulation of `Div` style. The rust style editor only supports argumentless `Styled` and `StyledExt` method calls.
* Navigation to code that constructed the element.
# Known bugs
## JSON style editor undo history doesn't get reset
The JSON style editor appends to its undo stack on every change of the... |
rust_dataset_chunk_509445 | rust_dataset.txt | 509,445 | 512 | - Could have `InspectorElementId` be `Vec<(ElementId, Option<Location>)>`, but if there are multiple code paths that construct the same element this would cause them to be considered different.
- Probably better to have a separate `Vec<Option<Location>>` that uses the same indices as `GlobalElementId`.
## Persiste... |
rust_dataset_chunk_509446 | rust_dataset.txt | 509,446 | 512 | `](https://github.com/livekit/protocol/tree/8645a138fb2ea72c4dab13e739b1f3c9ea29ac84).
--- FILE: zed/crates/sandbox_linux/DESIGN.md ---
# Design
This is a (currently experimental) re-implementation of the sandbox on Linux, with the following goals:
- dynamic changes to the sandbox policy, without restarting the untr... |
rust_dataset_chunk_509447 | rust_dataset.txt | 509,447 | 512 | ` is a bit of a monstrosity, but is required for security on Linux/WSL, due to race conditions when creating namespaces through `bwrap`
- It also doesn't fully guarantee TOCTOU-freedom on WSL when going across the plan9 bridge to the NTFS side
- The HTTP proxy is an entirely separate mechanism to FS sandboxing
- Ther... |
rust_dataset_chunk_509448 | rust_dataset.txt | 509,448 | 512 | y,
Ask,
}
```
The owner process sets the policy, and a more cache-friendly representation gets sent to the supervisor. When the sandbox process tries to make a syscall that is not explicitly allowed to run untrapped, the arguments get sent to the supervisor.
The supervisor makes the call on behalf of the sandboxed ... |
rust_dataset_chunk_509449 | rust_dataset.txt | 509,449 | 512 | for the current syscall*. Unlike the old sandbox implementation, there's no obvious way to say "allow this syscall again in the future", because it often refers to ephemeral state (e.g. file descriptors). For example, if you allow writes to `/foo/bar/baz.rs`, and you want that approval to persist for the rest of the s... |
rust_dataset_chunk_509450 | rust_dataset.txt | 509,450 | 512 | bind()` only accepts addresses assigned to an interface and ignores the namespace's local routes, unlike IPv4.
What this gives up, all uncommon:
- explicitly IPv6-only invocations (`curl -6`, `ssh -6`) get no address for a domain;
- tools in IPv6-only environments that query only `AAAA` records;
- agents debugging IPv... |
rust_dataset_chunk_509451 | rust_dataset.txt | 509,451 | 512 | problem.
#### Exact errors for non-blocking connects
A `connect` on a non-blocking socket succeeds as soon as it's allowed, and the host connection is made in the background: holding the syscall instead would freeze the app's event loop for a round trip per connection. A host that refuses or can't be reached then sh... |
rust_dataset_chunk_509452 | rust_dataset.txt | 509,452 | 512 | same). Servers that authorize by pid would see the wrong process.
[^1]: Technically, the supervisor doesn't "allow or deny" the syscall, since this introduces a race condition, where a malicious program makes a syscall, then, in between approval and the kernel executing it, changes the contents of one of the argument... |
rust_dataset_chunk_509453 | rust_dataset.txt | 509,453 | 512 | filesystem or not.
Though not defined in this crate, the default grants provided by the Zed agent is:
- read-only access to all files
- read/write access to current project directories
- read-only access to any Git metadata, including those in project directories
- read/write access to an isolated tempdir, cleared ... |
rust_dataset_chunk_509454 | rust_dataset.txt | 509,454 | 512 | >> proj/cache/.bashrc`
- The user sends a prompt, we pick up the evil `AGENTS.md` instructions, and the
agent does them
- Zed checks whether paths are symlinks outside the allowable paths before
passing them to bubblewrap, but there is a **time delay** between this check
and when bubblewrap mounts them.
- In thi... |
rust_dataset_chunk_509455 | rust_dataset.txt | 509,455 | 512 | path which is
used as a `--bind` argument*. If you cannot mutate a parent (because we are
assuming no nested directories), then the only part you can mutate is the the
read/write grant path itself (i.e. `/home/alice/project`). But, in bubblewrap's
model, doing this requires write access to the *parent* (i.e. `/home/al... |
rust_dataset_chunk_509456 | rust_dataset.txt | 509,456 | 512 | ` process?
There are two options:
1. open the FDs in zed, clear `CLOEXEC`, then fork/exec into bwrap with the FD arguments
2. send them into a helper process inside the sandbox using an `SCM_RIGHTS`
socket, and validate from the inside of the sandbox.
We chose option 2 because we already have a helper process insid... |
rust_dataset_chunk_509457 | rust_dataset.txt | 509,457 | 512 | exec the untrusted command
else any mismatch, a path was swapped
Bridge-->>Zed: refuse to execute
end
```
If the attacker managed to change a path to point to a different inode to when
the FD was captured, the check will fail, and we don't run the untrusted
command.
#### The subtle flaw: capturing is... |
rust_dataset_chunk_509458 | rust_dataset.txt | 509,458 | 512 | the readlink check;
- a swap *between* the host check and the mount is caught in-sandbox.
The readlink half must run host-side: once the FD is bound, its inode is
remapped to the mount destination inside the sandbox, so an in-sandbox readlink
would just report the mount path and prove nothing.
Grants are persisted a... |
rust_dataset_chunk_509459 | rust_dataset.txt | 509,459 | 512 | connect`/`recvmsg`/`sendmsg`/`bind`/`listen`/`accept` stay allowed. With no
way to create a forbidden socket — and, by fd hygiene, none inherited — there
is nothing dangerous for them to act on, and blocking `connect` would break
legitimate loopback/proxy use. `seccompiler`'s architecture check kills
foreign-ar... |
rust_dataset_chunk_509460 | rust_dataset.txt | 509,460 | 512 | Launch Services, which allows unsandboxed code execution.
The exact policy is defined in `src/macos_seatbelt.rs`, and is inspired by a
mixture of Codex and Chromium's rules.
Some of the denied services are somewhat questionable (i.e.
`com.apple.FontObjectsServer`) - there are legitimate uses for an application to
u... |
rust_dataset_chunk_509461 | rust_dataset.txt | 509,461 | 512 | `
with `O_PATH | O_CLOEXEC | O_NOFOLLOW`, rejects a symlink leaf (`S_IFLNK`
check), and requires `readlink(/proc/self/fd/N) == canonical`, failing closed
otherwise. On macOS the persisted canonical is trusted verbatim, because
Seatbelt matches the *resolved* access path: a post-approval component swap is
deni... |
rust_dataset_chunk_509462 | rust_dataset.txt | 509,462 | 512 | instantiation into a 2 step process: first attempt to create the file handles with `TerminalBuilder::new()`, check the result, then call `TerminalBuilder::subscribe(cx)` from within a model context.
The TerminalView struct abstracts over failed and successful terminals, passing focus through to the associated view an... |
rust_dataset_chunk_509463 | rust_dataset.txt | 509,463 | 512 | ---
# Zed Theme Importer
```sh
cargo run -p theme_importer -- dark-plus-syntax-color-theme.json --output output-theme.json
```
--- FILE: zed/crates/vim/README.md ---
This contains the code for Zed's Vim emulation mode.
Vim mode in Zed is supposed to primarily "do what you expect": it mostly tries to copy vim exact... |
rust_dataset_chunk_509464 | rust_dataset.txt | 509,464 | 512 | environment variable to control logging output for Zed
applications and libraries. The variable accepts a comma-separated list of
directives that specify logging levels for different modules (crates). The
general format is for instance:
```
ZED_LOG=info,project=debug,agent=off
```
- Levels can be one of: `off`/`none... |
rust_dataset_chunk_509465 | rust_dataset.txt | 509,465 | 512 | with "what's next"**: Link to related docs or logical next steps
### Section Patterns
For how-to content:
1. Brief context (1-2 sentences max)
2. Steps or instructions
3. Example (code block or screenshot reference)
4. Tips or gotchas (if any)
For reference content:
1. What it is (definition)
2. How to access/con... |
rust_dataset_chunk_509466 | rust_dataset.txt | 509,466 | 512 | from their previous editor
- **Keybindings tables**: Essential for migration docs—show what maps, what's different, what's missing
- **Trade-offs section**: Be explicit about what the user gains and loses in the switch
### Feature Documentation
- **Start with the default**: Document the out-of-box experience first
-... |
rust_dataset_chunk_509467 | rust_dataset.txt | 509,467 | 512 | ** (https://rust-lang.github.io/mdBook/).
### Key Files
- **`docs/src/SUMMARY.md`**: Table of contents following mdBook format (https://rust-lang.github.io/mdBook/format/summary.html)
- **`docs/book.toml`**: mdBook configuration
- **`docs/.prettierrc`**: Prettier config (80 char line width)
### SUMMARY.md Format
Th... |
rust_dataset_chunk_509468 | rust_dataset.txt | 509,468 | 512 | can include parent context like `anthropic-custom-models`)
### Code Block Annotations
Use annotations after the language identifier to indicate file context:
```markdown
\`\`\`json [settings]
{
"agent": { ... }
}
\`\`\`
\`\`\`json [keymap]
[
{ "bindings": { ... } }
]
\`\`\`
```
Valid annotations: `[settings]` (for... |
rust_dataset_chunk_509469 | rust_dataset.txt | 509,469 | 512 | search for `format_on_save`. Set it to `on`.
Or add this to your settings.json:
{
"format_on_save": "on"
}
```
### Bad: Wordy and promotional
```
Zed provides a powerful and seamless formatting experience. Simply navigate to the settings and you'll find the format_on_save option which enables Zed's incredible aut... |
rust_dataset_chunk_509470 | rust_dataset.txt | 509,470 | 512 | "default_model": {
"provider": "anthropic",
"model": "claude-sonnet-4"
}
}
}
```
### Provider/Feature Documentation Pattern
For each provider or distinct feature:
1. H3 heading with anchor: `### Provider Name {#provider-name}`
2. Brief description (1-2 sentences)
3. Setup steps (numbered list)
... |
rust_dataset_chunk_509471 | rust_dataset.txt | 509,471 | 512 | - Change URLs or anchor links without verifying references
- Modify `SUMMARY.md` structure without corresponding content
- Add speculative documentation for unreleased features
- Include internal implementation details not relevant to users
### Must
- Preserve existing structure when updating content
- Maintain backw... |
rust_dataset_chunk_509472 | rust_dataset.txt | 509,472 | 512 | documentation area
--- FILE: zed/docs/.conventions/brand-writer/rubric.md ---
# Brand Voice Rubric
Score each criterion 1-5. Copy must score **4+ on ALL criteria** to pass.
---
## 1. Technical Grounding (1-5)
Does the copy make specific, verifiable technical claims?
| Score | Description ... |
rust_dataset_chunk_509473 | rust_dataset.txt | 509,473 | 512 | reader as a peer, not a prospect?
| Score | Description |
| ----- | ------------------------------------------------------- |
| 5 | Peer-to-peer conversation; assumes technical competence |
| 4 | Respectful with appropriate technical depth |
| 3 | Sl... |
rust_dataset_chunk_509474 | rust_dataset.txt | 509,474 | 512 | casual/formal, technical/marketing, confident/hedging.
---
## 8. Earned Claims (1-5)
Are assertions supported or supportable?
| Score | Description |
| ----- | ------------------------------------------- |
| 5 | Every claim can be demonstrated or verified |
| 4 | Claims are ... |
rust_dataset_chunk_509475 | rust_dataset.txt | 509,475 | 512 | --review "paste copy" # Review existing copy for brand fit
```
## Core Voice
You articulate Zed's ideas, capabilities, and philosophy through writing that earns trust. Never try to sell. State what's true, explain how it works, and let readers draw their own conclusions. Speak as part of the same community you'r... |
rust_dataset_chunk_509476 | rust_dataset.txt | 509,476 | 512 | fact or change a developer needs to know.
2. Explain how Zed addresses it.
3. Add brand philosophy or context to deepen understanding.
4. Let the reader infer the benefit — never oversell.
---
## Avoid
- AI/marketing tropes (em dashes, mirrored constructions, "it's not X, it's Y")
- Buzzwords ("revolutionary," "cut... |
rust_dataset_chunk_509477 | rust_dataset.txt | 509,477 | 512 | Natural Syntax | /5 | |
| Quiet Confidence | /5 | |
| Developer Respect | /5 | |
| Information Priority | /5 | |
| Specificity | /5 | |
| Voice Consistency | /5 | |
| Earned Claims | /5 | |
Scan for taboo phrases. Fl... |
rust_dataset_chunk_509478 | rust_dataset.txt | 509,478 | 512 | : "—" used 3 times (em dash overuse)
Line 7: "We're excited" (empty enthusiasm)
```
4. **Present diagnosis:**
```
## Review: [Copy Title]
| Criterion | Score | Issues |
|---------------------|-------|--------|
| Technical Grounding | 3 | Vague claims about "performance" |
| Natu... |
rust_dataset_chunk_509479 | rust_dataset.txt | 509,479 | 512 | |
| seamless | Almost never true |
| frictionless | Almost never true |
| effortless | Dismisses real complexity |
| leverage | Corporate jargon |
| unlock | Marketing manipulation |
| supercharge ... |
rust_dataset_chunk_509480 | rust_dataset.txt | 509,480 | 512 | |
| "Finally, an editor that..." | Implies all others failed |
| "The wait is over" | Presumes anticipation |
| "Introducing..." (as standalone) | Weak opener |
---
## Vague Benefits
Replace with specific outcomes:
| Vague | Ask Instead ... |
rust_dataset_chunk_509481 | rust_dataset.txt | 509,481 | 512 | without saying..."
- "Needless to say..."
- "As you may know..."
---
## Detection Checklist
Before finalizing, scan for:
1. **Superlatives:** best, most, fastest, only, first, ultimate
2. **Absolutes:** always, never, every, all, completely, totally
3. **Hedging:** might, could, potentially, possibly, may help
4. ... |
rust_dataset_chunk_509482 | rust_dataset.txt | 509,482 | 512 | a language server fails, you keep editing while it restarts.
**Transformation notes:**
- Removed patronizing tone ("don't worry")
- Removed enthusiasm ("amazing")
- Added technical mechanism
- Treats reader as capable of understanding
---
## 3. Abstract to Concrete
**Before (Score: 2/5 Specificity)**
> Zed provi... |
rust_dataset_chunk_509483 | rust_dataset.txt | 509,483 | 512 | development environment. It's not about features — it's about flow. And it's not slow — it's instant.
**After (Score: 5/5)**
> Zed combines editing, debugging, collaboration, and AI assistance in one application. Everything runs in the same process, so switching between tasks has no context-switch overhead.
**Trans... |
rust_dataset_chunk_509484 | rust_dataset.txt | 509,484 | 512 | with `ctrl+\``. Terminals run in splits alongside your editor panes and share the same working directory as your project.
**Transformation notes:**
- Lead with the feature, not the backstory
- Removed emotional buildup
- Added keyboard shortcut
- Described actual behavior
---
## 10. Philosophy Statement
**Before ... |
rust_dataset_chunk_509485 | rust_dataset.txt | 509,485 | 512 | Zed is [FACT: written in Rust] with [FACT: GPU-accelerated rendering at 120fps]. Built by [FACT: the team behind Atom and Tree-sitter].
**Reconstruction:**
> Zed renders every frame on the GPU at 120fps. The Rust codebase prioritizes memory safety without garbage collection pauses. The same engineers who built Atom ... |
rust_dataset_chunk_509486 | rust_dataset.txt | 509,486 | 512 | tools** — Agent tools, MCP tools, built-in tools
- **New UI panels or views** — Any new panel, sidebar, or view users interact with
- **Public extension APIs** — For extension developers
- **Breaking changes** — Even if the fix is simple, document what changed
- **Version-specific behavior changes** — Include version ... |
rust_dataset_chunk_509487 | rust_dataset.txt | 509,487 | 512 | matter values as simple single-line `key: value` entries (no
multiline values, no quotes) for compatibility with the docs postprocessor
#### Frontmatter SEO Guidelines
- Choose one primary keyword/intent phrase for each page
- Write unique `title` values that clearly state the page topic and target user
intent; a... |
rust_dataset_chunk_509488 | rust_dataset.txt | 509,488 | 512 | JSON Examples
Always use the `[settings]` or `[keymap]` annotation:
```json [settings]
{
"vim_mode": true
}
```
```json [keymap]
{
"context": "Editor",
"bindings": {
"ctrl-s": "workspace::Save"
}
}
```
### Tables
Use tables for:
- Action/keybinding reference lists
- Setting options with descriptions
... |
rust_dataset_chunk_509489 | rust_dataset.txt | 509,489 | 512 | -reference pages, include at least 3 internal links to related docs
when possible
- Reference pages (for example, `docs/src/reference/*`) can use fewer links when
extra links would add noise
- Add links to closely related docs where they help users complete the next task
- Use descriptive link text that tells users... |
rust_dataset_chunk_509490 | rust_dataset.txt | 509,490 | 512 | bar |
| panel | sidebar (be specific: "Project Panel") |
---
## Formatting Requirements
All documentation must pass **Prettier** formatting (80 character line width):
```sh
cd docs && npx prettier --check src/
```
Before any documentation change is considered complete:
1. Run... |
rust_dataset_chunk_509491 | rust_dataset.txt | 509,491 | 512 | of Git features
title: Zed Editor Git integration documentation
---
# Git
Zed has built-in Git support that lets you manage version control without leaving the editor. The Git Panel shows your working tree state, staging area, and branch information. Changes you make on the command line are reflected immediately in... |
rust_dataset_chunk_509492 | rust_dataset.txt | 509,492 | 512 | kb git::Diff}), accessible via the {#action git::Diff} action in the Command Palette or the Git Panel.
All of the changes displayed in the Project Diff behave exactly the same as any other multibuffer: they are all editable excerpts of files.
You can stage or unstage each hunk as well as a whole file by hitting the b... |
rust_dataset_chunk_509493 | rust_dataset.txt | 509,493 | 512 | to choose which remote to use for that operation.
## Staging Workflow {#staging-workflow}
Zed has two primary staging workflows, using either the Project Diff or the panel directly.
### Using the Project Diff {#staging-project-diff}
In the Project Diff view, you can focus on each hunk and stage them individually b... |
rust_dataset_chunk_509494 | rust_dataset.txt | 509,494 | 512 | or {#action git::CheckoutBranch}.
### Deleting Branches {#delete-branches}
To delete a branch, open the branch switcher with {#action git::Switch}, find the branch you want to delete, and use the delete option. Zed will confirm before deleting to prevent accidental data loss.
> **Note:** You cannot delete the branc... |
rust_dataset_chunk_509495 | rust_dataset.txt | 509,495 | 512 |
- **Open diffs**: See exactly what changes are stored in each stash
- **Apply stashes**: Apply stash changes to your working directory while keeping the stash entry
- **Pop stashes**: Apply stash changes and remove the stash entry from the list
- **Drop stashes**: Delete unwanted stash entries without applying them
#... |
rust_dataset_chunk_509496 | rust_dataset.txt | 509,496 | 512 | [settings]
{
"agent": {
"commit_message_instructions": "Use the Conventional Commits format: <type>(<scope>): <description>."
}
}
```
These instructions are sent to the model in addition to any instruction files, such as `.rules` or `AGENTS.md`. To add instructions that apply to both commit messages and the a... |
rust_dataset_chunk_509497 | rust_dataset.txt | 509,497 | 512 | to a code snippet on your Git hosting service.
These links are useful for sharing a specific line or range of lines in a file at a specific commit.
Trigger this action via the [Command Palette](./getting-started.md#command-palette) (search for `permalink`),
by creating a [custom key bindings](key-bindings.md#custom-ke... |
rust_dataset_chunk_509498 | rust_dataset.txt | 509,498 | 512 | | {#action git::ForcePush} | {#kb git::ForcePush} |
| {#action git::Pull} | {#kb git::Pull} |
| {#action git::PullRebase} | {#kb git::PullRebase} |
| {#action git::Fetch} | {#kb git::Fetch}... |
rust_dataset_chunk_509499 | rust_dataset.txt | 509,499 | 512 | to your shell environment (in `~/.zshrc`, `~/.bashrc`, etc):
```sh
export GIT_EDITOR="zed --wait"
```
--- FILE: zed/docs/.doc-examples/configuration.md ---
<!--
GOLD STANDARD EXAMPLE: Configuration Documentation
This example demonstrates documentation for settings and configuration.
Key patterns to note:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.