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
@@ -9,7 +9,7 @@ use project::worktree_store::{WorktreeStore, WorktreeStoreEvent};
use project::{PathChange, Project, ProjectEntryId, ProjectPath};
use slotmap::SlotMap;
use text::BufferId;
use util::{ResultExt as _, debug_panic, some_or_debug_panic};
use util::{debug_panic, some_or_debug_panic};
use crate::declaration::{
BufferDeclaration, Declaration, DeclarationId, FileDeclaration, Identifier,
@@ -332,7 +332,7 @@ impl SyntaxIndex {
let language = language_registry
.language_for_file_path(&project_path.path)
.await
.log_err();
.ok();
let buffer = cx.new(|cx| {
let mut buffer = Buffer::local(loaded_file.text, cx);