edit prediction: Context debug view (#38435)

Adds a `dev: open edit prediction context` action that opens a new
workspace pane that displays the excerpts and snippets that would be
included in the edit prediction request.

Release Notes:

- N/A

---------

Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
Agus Zubiaga
2025-09-18 15:09:44 -03:00
committed by GitHub
co-authored by Bennet
parent 55d130a166
commit df50b5c14a
15 changed files with 583 additions and 19 deletions
@@ -89,7 +89,8 @@ pub fn identifiers_in_range(
}
let identifier_text =
&range_text[node_range.start - range.start..node_range.end - range.start];
// TODO we changed this to saturating_sub for now, but we should fix the actually issue
&range_text[node_range.start.saturating_sub(range.start)..node_range.end.saturating_sub(range.start)];
references.push(Reference {
identifier: Identifier {
name: identifier_text.into(),