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_509300 | rust_dataset.txt | 509,300 | 512 | _platform = { workspace = true, features = [
"screen-capture",
"font-kit",
"wayland",
"x11",
] }
gpui_tokio.workspace = true
hang_telemetry.workspace = true
image = { workspace = true, optional = true }
itertools.workspace = true
rayon.workspace = true
semver.workspace = true
system_specs.workspace = tr... |
rust_dataset_chunk_509301 | rust_dataset.txt | 509,301 | 512 | true
svg_preview.workspace = true
sysinfo.workspace = true
tab_switcher.workspace = true
tasks_ui.workspace = true
telemetry.workspace = true
telemetry_events.workspace = true
terminal_view.workspace = true
theme.workspace = true
theme_extension.workspace = true
theme_selector.workspace = true
theme_settings.workspace... |
rust_dataset_chunk_509302 | rust_dataset.txt | 509,302 | 512 | workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["profiler", "test-support"] }
image_viewer = { workspace = true, features = ["test-support"] }
itertools.workspace = true
language = { workspace = true, features = ["test-support"] }
pretty_assertions.workspace = true
project = { wo... |
rust_dataset_chunk_509303 | rust_dataset.txt | 509,303 | 512 | _system_version = "12.0"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed"]
[package.metadata.cargo-shear]
ignored = ["profiling", "tracing"]
--- FILE: zed/crates/zed_credentials_provider/Cargo.toml ---
[package]
name = "zed_credentials_provider"
version = "0.1.0"
edition.workspace = true
publish.w... |
rust_dataset_chunk_509304 | rust_dataset.txt | 509,304 | 512 | log = { workspace = true, features = ["kv_unstable_std"] }
anyhow.workspace = true
[dev-dependencies]
tempfile.workspace = true
--- FILE: zed/crates/zlog_settings/Cargo.toml ---
[package]
name = "zlog_settings"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
... |
rust_dataset_chunk_509305 | rust_dataset.txt | 509,305 | 512 | ]
name = "ztracing_macro"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "Apache-2.0"
[lints]
workspace = true
[lib]
proc-macro = true
test = false
doctest = false
--- FILE: zed/docs/book.toml ---
[book]
authors = ["The Zed Team"]
language = "en"
multilingual = false
src = "src"
title... |
rust_dataset_chunk_509306 | rust_dataset.txt | 509,306 | 512 | "
"/assistant-panel.html" = "/docs/ai/agent-panel.html"
"/assistant.html" = "/docs/assistant/assistant.html"
"/assistant/assistant-panel.html" = "/docs/ai/agent-panel.html"
"/assistant/assistant.html" = "/docs/ai/overview.html"
"/assistant/commands.html" = "/docs/ai/agent-panel.html"
"/assistant/configuration.html" = "... |
rust_dataset_chunk_509307 | rust_dataset.txt | 509,307 | 512 | "
"/javascript.html" = "/docs/languages/javascript.html"
"/languages/languages/html.html" = "/docs/languages/html.html"
"/languages/languages/javascript.html" = "/docs/languages/javascript.html"
"/languages/languages/makefile.html" = "/docs/languages/makefile.html"
"/languages/languages/nim.html" = "/docs/languages/nim... |
rust_dataset_chunk_509308 | rust_dataset.txt | 509,308 | 512 | SL"
[grammars.glsl]
repository = "https://github.com/theHamsta/tree-sitter-glsl"
commit = "31064ce53385150f894a6c72d61b94076adf640a"
--- FILE: zed/extensions/glsl/languages/glsl/config.toml ---
name = "GLSL"
grammar = "glsl"
path_suffixes = [
# Traditional rasterization pipeline shaders
"vert", "frag", "tesc... |
rust_dataset_chunk_509309 | rust_dataset.txt | 509,309 | 512 | d83c6b97cd48440b3829ab8d24a2319809"
--- FILE: zed/extensions/html/languages/html/config.toml ---
name = "HTML"
grammar = "html"
path_suffixes = ["html", "htm", "shtml"]
autoclose_before = ">})"
block_comment = { start = "<!--", prefix = "", end = "-->", tab_size = 0 }
wrap_characters = { start_prefix = "<", start_suf... |
rust_dataset_chunk_509310 | rust_dataset.txt | 509,310 | 512 | languages = ["Proto"]
[language_servers.protobuf-language-server]
name = "Protobuf Language Server"
languages = ["Proto"]
[language_servers.protols]
name = "Protols"
languages = ["Proto"]
--- FILE: zed/extensions/proto/languages/proto/config.toml ---
name = "Proto"
grammar = "proto"
path_suffixes = ["proto"]
line_c... |
rust_dataset_chunk_509311 | rust_dataset.txt | 509,311 | 512 | "]
[[capabilities]]
kind = "process:exec"
command = "cmd"
args = ["/C", "echo", "hello from a child process!"]
--- FILE: zed/extensions/test-extension/languages/gleam/config.toml ---
name = "Gleam"
grammar = "gleam"
path_suffixes = ["gleam"]
line_comments = ["// ", "/// "]
autoclose_before = ";:.,=}])>"
brackets = [... |
rust_dataset_chunk_509312 | rust_dataset.txt | 509,312 | 512 | ",
"MIT",
"MIT-0",
"Apache-2.0 WITH LLVM-exception",
"MPL-2.0",
"BSD-3-Clause",
"BSD-2-Clause",
"ISC",
"CC0-1.0",
"NCSA",
"Unicode-3.0",
"OpenSSL",
"Zlib",
"BSL-1.0",
"bzip2-1.0.6",
"CDLA-Permissive-2.0",
]
[procinfo.clarify]
license = "MIT"
[[procinfo.clarif... |
rust_dataset_chunk_509313 | rust_dataset.txt | 509,313 | 512 | pliance"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
doctest = false
[features]
octo-client = ["dep:octocrab", "dep:jsonwebtoken", "dep:serde_json", "dep:tokio"]
[dependencies]
anyhow.workspace = true
async-trait.workspace = true
de... |
rust_dataset_chunk_509314 | rust_dataset.txt | 509,314 | 512 | http_client.workspace = true
itertools.workspace = true
log.workspace = true
parking_lot.workspace = true
serde = { workspace = true, features = ["derive"] }
semver.workspace = true
serde_json.workspace = true
smol.workspace = true
thiserror.workspace = true
url = { workspace = true, features = ["serde"] }
[dev-depend... |
rust_dataset_chunk_509315 | rust_dataset.txt | 509,315 | 512 | " }]
--- FILE: zed/tooling/lints/test_fixture/consumer/Cargo.toml ---
[package]
name = "consumer"
version = "0.0.0"
edition = "2021"
publish = false
[lib]
path = "src/lib.rs"
[dependencies]
gpui_shared_string = { path = "../gpui_shared_string" }
--- FILE: zed/tooling/lints/test_fixture/gpui/Cargo.toml ---
[packag... |
rust_dataset_chunk_509316 | rust_dataset.txt | 509,316 | 512 | "] }
serde_json = { workspace = true, optional = true }
[lib]
test = false
doctest = false
[[bin]]
name = "perf"
path = "src/main.rs"
required-features = ["cli"]
--- FILE: zed/tooling/xtask/Cargo.toml ---
[package]
name = "xtask"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0... |
rust_dataset_chunk_509317 | rust_dataset.txt | 509,317 | 512 | .exec.extract-bundled-binary]
cmd = "editor_path=$(tar -tzf target/release/zed-linux-$(uname -m).tar.gz | grep '/libexec/zed-editor$') && tar -xOzf target/release/zed-linux-$(uname -m).tar.gz \"$editor_path\" > target/release/zed-bundled"
[step.filesize.measure-bundled]
glob = "target/release/zed-bundled"
summary.bund... |
rust_dataset_chunk_509318 | rust_dataset.txt | 509,318 | 512 | .md` if they are not already present. This must be done before any other work. No exceptions. Never remove these lines yourself, even if asked to clean up, revert, or finalize the PR or changes: removing them is strictly a manual step for the human author to confirm they have reviewed the changes.
* Avoid creative addi... |
rust_dataset_chunk_509319 | rust_dataset.txt | 509,319 | 512 | `Entity<T>` is a handle to state of type `T`. With `thing: Entity<T>`:
* `thing.entity_id()` returns `EntityId`
* `thing.downgrade()` returns `WeakEntity<T>`
* `thing.read(cx: &App)` returns `&T`.
* `thing.read_with(cx, |thing: &T, cx: &App| ...)` returns the closure's return value.
* `thing.update(cx, |thing: &mut T... |
rust_dataset_chunk_509320 | rust_dataset.txt | 509,320 | 512 | * Awaiting the task in some other async context.
* Detaching the task via `task.detach()` or `task.detach_and_log_err(cx)`, allowing it to run indefinitely.
* Storing the task in a field, if the work should be halted when the struct is dropped.
A task which doesn't do anything but provide a value can be created with `... |
rust_dataset_chunk_509321 | rust_dataset.txt | 509,321 | 512 | )` or `focus_handle.dispatch_action(&SomeAction, window, cx)`.
Actions with no data are defined with the `actions!(some_namespace, [SomeAction, AnotherAction])` macro call. Otherwise the `Action` derive macro is used. Doc comments on actions are displayed to the user.
Action handlers can be registered on an element v... |
rust_dataset_chunk_509322 | rust_dataset.txt | 509,322 | 512 | CI enforces this), for example `- [GPUI] Improved benchmarks to report retired CPU instructions alongside wall time on Linux`.
- Format release notes exactly with a blank line after the heading, for example:
```
Release Notes:
- N/A
```
# Crash Investigation
## Sentry Integration
- Crash investigation prompts: `.fa... |
rust_dataset_chunk_509323 | rust_dataset.txt | 509,323 | 512 | , renderer and task
benchmarks, headless Metal frame data, responsiveness and hang regressions,
feature isolation from test-support, and before/after performance evidence.
---
# GPUI Benchmarks
Use this skill when a user asks to benchmark GPUI code, reproduce a UI hang or frame drop, evaluate a performance fix, u... |
rust_dataset_chunk_509324 | rust_dataset.txt | 509,324 | 512 | measured runs. Never start an unbounded profile or Criterion run.
- Do not run measured benchmarks concurrently. Parallel benchmark processes contaminate each other's results.
- Preserve correctness assertions in benchmark fixtures. Faster output that loses work is not an improvement.
- Never invent timing, frame, per... |
rust_dataset_chunk_509325 | rust_dataset.txt | 509,325 | 512 | ` feature.
Prefer a seam that supplies bytes or events to a production pipeline over widening an entire fake test harness.
## Model the production path
Map the workload before constructing the fixture:
```text
production trigger
-> queue or event boundary
-> background preparation
-> foreground applicat... |
rust_dataset_chunk_509326 | rust_dataset.txt | 509,326 | 512 | rust
#[gpui::bench(inputs = tree_families(), input_name = "tree", iterations = 6)]
fn full_refresh(family: &TreeFamily, mut rng: StdRng, cx: &mut gpui::BenchAppContext) {
let tree = family.sample(&mut rng);
// ...
}
```
Register benchmark functions with `gpui::bench_group!` and `gpui::bench_main!` (drop-in for... |
rust_dataset_chunk_509327 | rust_dataset.txt | 509,327 | 512 | |
For a CI gate on frame cost prefer `foreground-instructions`: it excludes background parsing and GPU-driver submission threads, whose work varies run to run, and on Apple Silicon the process-wide count includes driver jitter that widens the interval (about ±0.6% versus ±0.01% for the foreground thread).
Default se... |
rust_dataset_chunk_509328 | rust_dataset.txt | 509,328 | 512 | process per machine at a time. Hardware counters are per task, so instruction counts stay correct next to a concurrent `cargo bench`, but wall time, IPC, and cache misses share the hardware and degrade, and two processes requesting counters can exceed a core's counter slots, at which point the kernel multiplexes and t... |
rust_dataset_chunk_509329 | rust_dataset.txt | 509,329 | 512 | ench_function("append", |b| report.iter(b, || rope.append(small.clone())));
report.print(" ");
```
Criterion's `Throughput` lines keep working alongside. Page faults per iteration are a useful allocation-pressure signal even without a counting allocator; for exact counts, install `bench_metrics::CountingAllocator` as... |
rust_dataset_chunk_509330 | rust_dataset.txt | 509,330 | 512 | cx.notify();
});
```
Do not benchmark a detached entity and call the result rendering performance. Do not call `run_until_idle` inside a measured loop merely to make the fixture pass: production does not drain all asynchronous work before every frame, and doing so erases the scheduling behavior being measured.
## He... |
rust_dataset_chunk_509331 | rust_dataset.txt | 509,331 | 512 | strong workload keeps an independent UI signal alive while expensive work runs. Suitable signals include a loading icon, cursor blink, scrolling viewport, progress counter, or small animation. The heavy workload and signal must share the production foreground executor so starvation is observable.
For each fixed input... |
rust_dataset_chunk_509332 | rust_dataset.txt | 509,332 | 512 | still show a compute-heavy inner loop suitable for vectorization?
Do not infer a hot leaf from one stack or optimize a nearby function because it looks expensive. Profiles show where time is spent; the benchmark proves whether changing that work improves the user-visible result.
Parameterize workload sizes and repor... |
rust_dataset_chunk_509333 | rust_dataset.txt | 509,333 | 512 | tmp/zed-profiles/<name>.trace
xctrace record \
--template "zed-bench" \
--output /tmp/zed-profiles/<name>.trace \
--launch -- target/release-fast/deps/<target>-<hash> \
--bench <workload-filter> --profile-time 10
```
Running a Criterion executable directly requires `--bench`. `--profile-time` repeats the measu... |
rust_dataset_chunk_509334 | rust_dataset.txt | 509,334 | 512 | baseline and validates the candidate.
Ask agents to retain large trace exports and benchmark logs on disk and report only focused aggregates.
## Review checklist
Before accepting a GPUI benchmark, verify:
- [ ] The benchmark states the user-visible performance hypothesis.
- [ ] The exact benchmark feature graph ha... |
rust_dataset_chunk_509335 | rust_dataset.txt | 509,335 | 512 | ethercote.github.io/perf-book/profiling.html)
- [The Rust Performance Book: General Tips](https://nnethercote.github.io/perf-book/general-tips.html)
--- FILE: zed/.agents/skills/gpui-test/SKILL.md ---
---
name: gpui-test
description: >-
Use when writing, debugging, or reproducing GPUI tests in Zed, including
gpui... |
rust_dataset_chunk_509336 | rust_dataset.txt | 509,336 | 512 | ` / `seeds`; explicit seeds are appended to the `0..iterations` range.
- If the `SEED` environment variable is set, it takes precedence over explicit seeds.
- With `SEED=N` and `ITERATIONS=M` or `iterations = M`, the harness runs seeds `N..N+M`.
## Environment variables
### GPUI test macro / scheduler execution
- `S... |
rust_dataset_chunk_509337 | rust_dataset.txt | 509,337 | 512 | a seed, rerun exactly that seed.
```sh
SEED=<seed> cargo -q test -p <crate-name> <test_name> -- --nocapture
```
4. If the failure is flaky and no seed is known, sweep seeds.
```sh
ITERATIONS=100 cargo -q test -p <crate-name> <test_name> -- --nocapture
```
When the harness prints `failing seed:... |
rust_dataset_chunk_509338 | rust_dataset.txt | 509,338 | 512 | .
### `Parking forbidden`
Usually means a foreground/background task is still pending when the scheduler expected the test to make progress or finish. Look for:
- A task that should be awaited but was dropped.
- A task that should be detached with error logging.
- A timer or receiver that is waiting forever.
- A mis... |
rust_dataset_chunk_509339 | rust_dataset.txt | 509,339 | 512 | ERROR: type should be string, got " https://rust-lang.github.io/rust-clippy/master/). If it does, stop and report that to the user instead of writing a redundant lint.\n\n## Layout\n\n- One module per lint: `src/<lint_name>.rs`, declared in `src/lib.rs`.\n- Register the lint in `register_lints` in `src/lib.rs`: add it to the `lint_store.register_lints(&[...])` slice **and** add a `register_late_pass` call.\n- Use `src/notify_in_render.rs` as the template: `rustc_session::declare_lint!` with `### What it does` / `### Why is this bad?` doc sections, `impl_lint_pass!`, and a `LateLintPass` impl that bails early with `let ... else` / early returns.\n- Do NOT copy the diagnostics style of `shared_string_from_str_literal` in `lib.rs` — it predates the rules below (it emits a machine-applicable suggestion). The two lints living directly in `lib.rs` also predate the one-module-per-lint rule.\n- Reuse the helpers in `src/render_helpers.rs` (`is_directly_in_render_method`, `is_gpui_context`) for render/gpui checks.\n\n## Diagnostics rules\n\n- Flag only; never suggest how to fix, and never use `Applicability::MachineApplicable`.\n- Keep detection and reporting as simple as possible: prefer `span_lint` with a one-sentence message over `span_lint_and_then` with notes.\n- Skip macro-expanded code (`expr.span.from_expansion()`).\n\n## UI tests (required)\n\n- Every lint needs `ui/<lint_name>.rs` and `ui/<lint_name>.stderr`.\n- The `.rs` file must include **negative cases**: code that resembles the bad pattern but must produce no diagnostic. Their absence from the `.stderr` file is the assertion.\n- UI tests that need gpui types use the fake `gpui` crate in `test_fixture/` (wired up by `gpui_fixture_rustc_flags` in `lib.rs`). Extend the fixture if a type or method is missing — never add real gpui as a dependency.\n- The crate is deliberately **not** part of the zed workspace and pins its own nightly (`rust-toolchain.toml`). Run tests from inside the crate:\n\n ```\n cd tooling/lints && cargo test\n ```\n\n- To update a" |
rust_dataset_chunk_509340 | rust_dataset.txt | 509,340 | 512 | `.stderr` file after an intentional change: run the test, find the `Actual stderr saved to PATH` line in the failure report, and copy that file over the checked-in `.stderr`. There is no bless env var. A correct `.stderr` typically ends with one blank line.
## After the lint works
- Add the lint to the "Current lint... |
rust_dataset_chunk_509341 | rust_dataset.txt | 509,341 | 512 | cherry-pick, and then if there are merge conflicts in practice, stop and inform the user that there are merge conflicts and offer to resolve them. (Users may prefer to resolve the merge conflicts themselves before continuing.)
## The script you're emulating
The canonical procedure lives in `script/cherry-pick` and t... |
rust_dataset_chunk_509342 | rust_dataset.txt | 509,342 | 512 | which file conflicted:
```
gh run list --workflow=cherry_pick.yml --limit 10 --json databaseId,displayTitle,status,conclusion
gh run view <failed_run_id> --log-failed
```
The failed-run log also confirms the `BRANCH` and `COMMIT` the workflow used — handy if there's any ambiguity.
### 2. Reproduce the script's setu... |
rust_dataset_chunk_509343 | rust_dataset.txt | 509,343 | 512 | - Don't grab unrelated changes from `main` that happen to surround the conflict — keep the cherry-pick minimal.
### 5. Validate
Always build and (if reasonable) test the affected crate(s) before continuing the cherry-pick.
```
cargo check -p <affected_crate>
cargo test -p <affected_crate>
```
If validation fails, ... |
rust_dataset_chunk_509344 | rust_dataset.txt | 509,344 | 512 | you don't want it duplicated.
## Final report to the user
Tell the user:
- The new PR URL.
- A one-line summary of the conflict and how you resolved it.
- What validation you ran (commands + result).
- That their local branch is now `cherry-pick-<branch-name>-<short-sha>`, in case they want you to switch back.
## G... |
rust_dataset_chunk_509345 | rust_dataset.txt | 509,345 | 512 | . The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this li... |
rust_dataset_chunk_509346 | rust_dataset.txt | 509,346 | 512 | their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Softw... |
rust_dataset_chunk_509347 | rust_dataset.txt | 509,347 | 512 | Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARR... |
rust_dataset_chunk_509348 | rust_dataset.txt | 509,348 | 512 |
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY... |
rust_dataset_chunk_509349 | rust_dataset.txt | 509,349 | 512 | TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ... |
rust_dataset_chunk_509350 | rust_dataset.txt | 509,350 | 512 | THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*****************************************************************************... |
rust_dataset_chunk_509351 | rust_dataset.txt | 509,351 | 512 | , WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [Gruvbox Light Hard](https://github.com/morhetz/gruvbox)
The MIT License (MI... |
rust_dataset_chunk_509352 | rust_dataset.txt | 509,352 | 512 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
********************************************************************************
## [One Dark](https://github.com/atom/atom/tree/master/packages/one-dark-ui)
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
Permission is hereby gran... |
rust_dataset_chunk_509353 | rust_dataset.txt | 509,353 | 512 | /themes/one/LICENSE ---
The MIT License (MIT)
Copyright (c) 2014 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, c... |
rust_dataset_chunk_509354 | rust_dataset.txt | 509,354 | 512 | contributions, and the pattern we've seen is that landing your first PR dramatically improves the odds for every PR after it.
A stack of open PRs on the other hand tends to go stale as `main` changes.
- **Discuss features with us before you start writing code for them**.
If there isn't a GitHub issue with staff co... |
rust_dataset_chunk_509355 | rust_dataset.txt | 509,355 | 512 | /issues?q=is%3Aissue%20state%3Aopen%20label%3A%22.contrib%2Fgood%20non-first%20issue%22).
- **Fix bugs**: start with [triaged bugs with confirmed reproduction steps](https://github.com/zed-industries/zed/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20label%3Astate%3Areproducible), or browse [area labels](https://git... |
rust_dataset_chunk_509356 | rust_dataset.txt | 509,356 | 512 | it's relevant and what you take from it**.
This policy was adapted from [ripgrep's AI policy](https://github.com/BurntSushi/ripgrep/blob/f0cec341ab95c25c691ad3d5754d4bd9eedde21f/AI_POLICY.md).
## Sending changes
**Build and run Zed locally, then manually test your changes before opening a PR.** Follow the guide for... |
rust_dataset_chunk_509357 | rust_dataset.txt | 509,357 | 512 | to create a skill, ask about SKILLs.md, or package reusable agent instructions.
---
# Creating a Zed Agent Skill
Use this skill when the user wants to create, edit, or understand agent skills in Zed.
## What is a Skill?
A skill is a reusable set of instructions that an agent can load on demand. Each skill lives in... |
rust_dataset_chunk_509358 | rust_dataset.txt | 509,358 | 512 | `rust-patterns`
Bad: `Git-Release`, `pr--review`, `-my-skill`, `my_skill`
## Writing Good Skill Instructions
The body of the SKILL.md (after the frontmatter) contains the instructions the agent will follow. Guidelines:
1. **Be direct**: Write instructions as if talking to the agent. "Do X", "Check Y", "Ask the user... |
rust_dataset_chunk_509359 | rust_dataset.txt | 509,359 | 512 | next conversation (no restart needed for global skills if the `~/.agents/skills/` directory already exists).
--- FILE: zed/crates/agent_skills/README.md ---
# agent_skills
Loading and parsing of [Agent Skills](https://agentskills.io/specification) — `SKILL.md` files that extend the agent with task-specific instruct... |
rust_dataset_chunk_509360 | rust_dataset.txt | 509,360 | 512 | is finite. If a user wants their skills to work in multiple tools, the right answer is for those tools to converge on the spec's location. Scanning a half-dozen tool-specific paths makes our discovery surface unpredictable and biases us toward whichever tools happened to ship first. A user who wants their existing ski... |
rust_dataset_chunk_509361 | rust_dataset.txt | 509,361 | 512 | revisit.
### No remote skill registry, no user-configured paths
We don't fetch skills from URLs, and we don't honor a settings entry for "also look in this other directory." Skills come from the two locations above and that's it.
The tradeoff: less flexibility for power users, more predictability for everyone else.... |
rust_dataset_chunk_509362 | rust_dataset.txt | 509,362 | 512 | early and then iterate on the body.
## Frontmatter parsing
### Strict validation is a permanent design decision
`name` must match `[a-z0-9-]{1,64}` and `description` must be 1–1024 characters and non-empty. If either fails, we reject the skill outright with a load error that surfaces in the UI.
Some implementation... |
rust_dataset_chunk_509363 | rust_dataset.txt | 509,363 | 512 | of skills the model sees in its system prompt. For each loaded skill, the model gets the name, description, and absolute path to `SKILL.md`. That's it — no body, no resources.
### Wrapped in `<available_skills>`
```
<available_skills>
<skill>
<name>brand-writer</name>
<description>...</description>
<lo... |
rust_dataset_chunk_509364 | rust_dataset.txt | 509,364 | 512 | need a single, predictable answer to "is my skill going to load?" A fixed cap means the same `SKILL.md` either loads or doesn't — the same way, every time, on every model. Tying it to the model's context size means the answer changes when the user picks a different model, which would make skill authoring needlessly op... |
rust_dataset_chunk_509365 | rust_dataset.txt | 509,365 | 512 | directory. The spec recommends this.
- **The body is XML-escaped**, including `<` and `&`. A hostile body containing literal `</skill_content>` cannot break out of the envelope. This is stricter than what some other tools do, and yes, it does mean a skill author writing literal `<` in their Markdown will see it as `&l... |
rust_dataset_chunk_509366 | rust_dataset.txt | 509,366 | 512 | should be the one deciding when to run this" case — workflows like `/deploy` or `/release` where you don't want the model autonomously triggering them based on conversation context.
### `user-invocable: false` is intentionally not supported
The inverse of `disable-model-invocation` — a skill the model can use but th... |
rust_dataset_chunk_509367 | rust_dataset.txt | 509,367 | 512 | as a banner, like load errors do, but doing it well requires deciding whether the override was intentional (in which case the warning is noise) or accidental. Surfacing them is a future improvement.
## Edits to skill files
`SKILL.md` files and their bundled resources are classified as sensitive paths. The agent's ed... |
rust_dataset_chunk_509368 | rust_dataset.txt | 509,368 | 512 | is delivered. The skill name is the input value, so an "Always Allow" choice can be scoped per-skill (only this skill auto-approves) or per-tool (any skill auto-approves), and the user can configure these in settings instead of clicking through prompts.
We match the default behavior of every other prompt-on-use tool ... |
rust_dataset_chunk_509369 | rust_dataset.txt | 509,369 | 512 | additive.
- **Dynamic context injection**: shell commands embedded in SKILL.md that get expanded before the model sees the body. Powerful but requires its own security model.
## Where to start reading
- `skill.rs` — types, frontmatter parsing, discovery, override merge.
- `crates/agent/src/tools/skill_tool.rs` — the... |
rust_dataset_chunk_509370 | rust_dataset.txt | 509,370 | 512 | after the change.
./script/bench-agent-model-search --baseline before
```
Run measurements sequentially on an otherwise idle machine. Each measured case
uses 15 samples, 200 ms warm-up, and 500 ms measurement time; filter to a single
workload for longer local investigation. Use `BENCH_MEASUREMENT=wall-time` to
disabl... |
rust_dataset_chunk_509371 | rust_dataset.txt | 509,371 | 512 | /opt/postgresql@15/bin`.
3. If you hadn't done it before, create the `postgres` user with `createuser -s postgres`.
4. You are now ready to run the `bootstrap` script:
```sh
script/bootstrap
```
This script will set up the `zed` Postgres database, and populate it with some users. It requires internet access, because ... |
rust_dataset_chunk_509372 | rust_dataset.txt | 509,372 | 512 | debugger.
--- FILE: zed/crates/db/README.md ---
# Building Queries
First, craft your test data. The examples folder shows a template for building a test-db, and can be ran with `cargo run --example [your-example]`.
To actually use and test your queries, import the generated DB file into https://sqliteonline.com/
... |
rust_dataset_chunk_509373 | rust_dataset.txt | 509,373 | 512 | )]
pub enum PromptArgsError {
MissingAssignment { token: String },
MissingKey { token: String },
}
```
--- FILE: zed/crates/edit_prediction_cli/evals/flask--add-and-rename-test-function.md ---
+++
repository_url = "https://github.com/pallets/flask"
revision = "2fec0b206c6e83ea813ab26597e15c96fab08be7"
+++... |
rust_dataset_chunk_509374 | rust_dataset.txt | 509,374 | 512 | _basic.py
+++ b/tests/test_basic.py
@@ -1376,8 +1376,13 @@
-def test_static_file_not_found():
- pass
+def test_static_file_not_found(app, client):
+ rv = client.get("/static/nonexistent.html")
+ assert rv.status_code == 404
+ assert rv.data.strip() == b"<h1>Not Found</h1>"
+ with app.test_request_context... |
rust_dataset_chunk_509375 | rust_dataset.txt | 509,375 | 512 | zed/crates/edit_prediction_cli/evals/flask--add-test-function.md ---
+++
repository_url = "https://github.com/pallets/flask"
revision = "2fec0b206c6e83ea813ab26597e15c96fab08be7"
+++
## Edit History
```diff
--- a/tests/test_basic.py
+++ b/tests/test_basic.py
@@ -1376,5 +1376,8 @@
def test_static_files(app, client):... |
rust_dataset_chunk_509376 | rust_dataset.txt | 509,376 | 512 | `
```diff
--- a/tests/test_basic.py
+++ b/tests/test_basic.py
@@ -1372,15 +1372,15 @@
-de
+def test_static_():
# ^[CURSOR_POSITION]
+
def test_static_url_path():
```
```diff
--- a/tests/test_basic.py
+++ b/tests/test_basic.py
@@ -1372,15 +1372,15 @@
-de
+def test_static_():
# ^[CUR... |
rust_dataset_chunk_509377 | rust_dataset.txt | 509,377 | 512 | 358,14 @@
-de
+def test_session_cookie_httponly(app, client):
+ app.config["SESSION_COOKIE_HTTPONLY"] = True
+
+ @app.route("/")
+ def index():
+ flask.session["testing"] = 42
+ return "Hello World"
+
+ rv = client.get("/")
+ assert "httponly" in rv.headers["set-cookie"].lower()
def te... |
rust_dataset_chunk_509378 | rust_dataset.txt | 509,378 | 512 | @@ -1,1 +1,6 @@
-Hello World!
+function filterByStatus(items, status) {
+ return items.filter(item => item.status === status);
+}
+
+function groupBy
+
```
// User accepted prediction:
```diff
--- a/README
+++ b/README
@@ -4,3 +4,9 @@
-function groupBy
+function groupByStatus(items) {
+ return items.reduce((gr... |
rust_dataset_chunk_509379 | rust_dataset.txt | 509,379 | 512 | Action().Equal(addr) {
```
## Cursor Position
```internal/actions/actions.go
defer a.mu.Unlock()
data, ok := a.actionInstances.GetOk(addr)
if !ok {
return nil, false
}
return &data, true
}
func (a *Actions) GetActionInstanceKeys(addr addrs.AbsAction) []addrs.AbsActionInstance {
a.mu.Lock()
defer a.mu.Unl... |
rust_dataset_chunk_509380 | rust_dataset.txt | 509,380 | 512 | Action().Equal(addr) {
result = append(result, data.Key)
}
}
```
```diff
--- a/internal/actions/actions.go
+++ b/internal/actions/actions.go
func (a *Actions) GetActionInstanceKeys(addr addrs.AbsAction) []addrs.AbsActionInstance {
a.mu.Lock()
defer a.mu.Unlock()
- /
+ // Iterate through all action insta... |
rust_dataset_chunk_509381 | rust_dataset.txt | 509,381 | 512 | Ok(entries) => {
+ for entry in entries {
+ let entry = entry.map_err(|e| LoaderError::IO(IoError::new(e, None)))?;
+ if let Some(parser_dir_name) = entry.file_name().to_str() {
+ if parser_dir_name.starts_with("... |
rust_dataset_chunk_509382 | rust_dataset.txt | 509,382 | 512 | --- a/crates/loader/src/loader.rs
+++ b/crates/loader/src/loader.rs
@@ -736,13 +736,13 @@
if let Some(parser_dir_name) = entry.file_name().to_str() {
if parser_dir_name.starts_with("tree-sitter-") {
self.find_language_configurations_... |
rust_dataset_chunk_509383 | rust_dataset.txt | 509,383 | 512 | <&'a [PathBuf]>,
```
## Expected Patch
```diff
--- a/tree-sitter/crates/loader/src/loader.rs
+++ b/tree-sitter/crates/loader/src/loader.rs
@@ -621,6 +621,8 @@
wasm_store: Mutex<Option<tree_sitter::WasmStore>>,
}
-str
+struct LanguageEntry {
+ path: PathBuf,
+ language: OnceCell<Language>,
+ external_f... |
rust_dataset_chunk_509384 | rust_dataset.txt | 509,384 | 512 | itter/tree-sitter"
revision = "24007727d42b4caceda3095ac685c463fae1ba1a"
+++
## Edit History
```diff
--- a/tree-sitter/crates/loader/src/loader.rs
+++ b/tree-sitter/crates/loader/src/loader.rs
@@ -604,7 +604,7 @@
pub struct Loader {
pub parser_lib_path: PathBuf,
- languages_by_id: Vec<(PathBuf, OnceCell<Lan... |
rust_dataset_chunk_509385 | rust_dataset.txt | 509,385 | 512 | {
- let (path, language, externals) = &self.languages_by_id[id];
+ let LanguageEntry {
+ path,
+ language,
+ external_files,
+ } = &self.languages_by_id[id];
language
.get_or_try_init(|| {
let src_path = path.join("src");
... |
rust_dataset_chunk_509386 | rust_dataset.txt | 509,386 | 512 | language, external_files } = &self.languages_by_id[id];
language
.get_or_try_init(|| {
let src_path = path.join("src");
self.load_language_at_path(CompileConfig::new(
&src_path,
- externals.as_deref(),
+ ... |
rust_dataset_chunk_509387 | rust_dataset.txt | 509,387 | 512 | .language_configurations
.iter()
- .map(|c| (c, self.languages_by_id[c.language_id].0.as_ref()))
+ .map(|c| (c, self.languages_by_id[c.language_id].path.as_ref()))
.collect()
}
```
--- FILE: zed/crates/edit_prediction_cli/evals/tree-sitter--tuple-to-struct-for-loo... |
rust_dataset_chunk_509388 | rust_dataset.txt | 509,388 | 512 | _try_init(|| {
let src_path = path.join("src");
```
## Cursor Position
```tree-sitter/crates/loader/src/loader.rs
let mut language_id = None;
for (id, (path, _, _)) in
// ^[CURSOR_POSITION]
self.languages_by_id.... |
rust_dataset_chunk_509389 | rust_dataset.txt | 509,389 | 512 | - languages_by_id: Vec<(PathBuf, OnceCell<Language>, Option<Vec<PathBuf>>)>,
+ languages_by_id: Vec<LanguageEntry>,
language_configurations: Vec<LanguageConfiguration<'static>>,
language_configuration_ids_by_file_type: HashMap<String, Vec<usize>>,
language_configuration_in_current_path: Option<usiz... |
rust_dataset_chunk_509390 | rust_dataset.txt | 509,390 | 512 | .rs
+++ b/tree-sitter/crates/loader/src/loader.rs
@@ -1553,10 +1553,10 @@
let language_id = if let Some(language_id) = language_id {
language_id
} else {
- self.languages_by_id.push((
- language_path,
- ... |
rust_dataset_chunk_509391 | rust_dataset.txt | 509,391 | 512 | .ts
+++ b/src/vs/workbench/contrib/debug/browser/debugCommands.ts
@@ -304,8 +304,8 @@ CommandsRegistry.registerCommand({
CommandsRegistry.registerCommand({
id: REVERSE_CONTINUE_ID,
- handler: (accessor: ServicesAccessor, _: string, context: CallStackContext | unknown) => {
- getThreadAndRun(accessor, context, thr... |
rust_dataset_chunk_509392 | rust_dataset.txt | 509,392 | 512 | }
});
```
## Cursor Position
```src/vs/workbench/contrib/debug/browser/debugCommands.ts
weight: KeybindingWeight.WorkbenchContrib,
primary: isWeb ? (KeyMod.Alt | KeyCode.F10) : KeyCode.F10, // Browsers do not allow F10 to be binded so we have to bind an alternative
when: CONTEXT_DEBUG_STATE.isEqualTo('stopped'),... |
rust_dataset_chunk_509393 | rust_dataset.txt | 509,393 | 512 | code"
revision = "6f6e26fcdf0a7ca5084e0da284cd7a5b2d41ae4d"
+++
## Edit History
```diff
--- a/src/vs/workbench/api/common/extHostTypes.ts
+++ b/src/vs/workbench/api/common/extHostTypes.ts
@@ -18,6 +18,14 @@ import { FileSystemProviderErrorCode, markAsFileSystemProviderError } from 'vs/
import type * as vscode from '... |
rust_dataset_chunk_509394 | rust_dataset.txt | 509,394 | 512 | "https://github.com/microsoft/vscode"
revision = "b64eaf598008e2d600a81d846108f72cb37b48e2"
+++
## Edit History
```diff
--- a/src/vs/platform/window/electron-main/window.ts
+++ b/src/vs/platform/window/electron-main/window.ts
@@ -1,49 +1,50 @@
export interface ICodeWindow extends IDisposable {
readonly onWillLo... |
rust_dataset_chunk_509395 | rust_dataset.txt | 509,395 | 512 | SystemContextMenu: Event<{ window: ICodeWindow; x: number; y: number }>;
readonly onDidDestroyWindow: Event<ICodeWindow>;
--- a/src/vs/platform/windows/electron-main/windowsMainService.ts
+++ b/src/vs/platform/windows/electron-main/windowsMainService.ts
@@ -160,60 +160,63 @@ interface ISingleFolderWorkspacePathToOpen... |
rust_dataset_chunk_509396 | rust_dataset.txt | 509,396 | 512 | ```diff
--- a/src/vs/platform/windows/test/electron-main/windowsFinder.test.ts
+++ b/src/vs/platform/windows/test/electron-main/windowsFinder.test.ts
@@ -7,60 +7,61 @@ import * as assert from 'assert';
function createTestCodeWindow(options: { lastFocusTime: number; openedFolderUri?: URI; openedWorkspace?: IWorkspaceI... |
rust_dataset_chunk_509397 | rust_dataset.txt | 509,397 | 512 | Patch
```diff
--- a/src/vs/editor/browser/widget/diffEditorWidget.ts
+++ b/src/vs/editor/browser/widget/diffEditorWidget.ts
@@ -1115,10 +1115,10 @@
if (currentToken === this._diffComputationToken
&& currentOriginalModel === this._originalEditor.getModel()
&& currentModifiedModel === this._modifiedEditor... |
rust_dataset_chunk_509398 | rust_dataset.txt | 509,398 | 512 | &mut Context<Self>) {
- epr
+ eprintln!("");
# ^[CURSOR_POSITION]
let next_index = self
.ep_store
.read(cx)
.shown_predictions()
.skip(self.selected_index)
.enumerate()
.skip(1) // Skip straight to th... |
rust_dataset_chunk_509399 | rust_dataset.txt | 509,399 | 512 | }
- project::Event::Disk { .. } => {
+ project::Event::DiskBasedDiagnosticsStarted { .. } => {
if cx.has_flag::<EditPredictionJumpsFeatureFlag>() {
self.refresh_prediction_from_diagnostics(
project,
```
--- FILE: zed/crates/edit_pre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.