Use worktree qualified paths in agent file context + some code cleanup (#27943)
Release Notes: - N/A
This commit is contained in:
parent
142f9917d0
commit
b7b7f1ccdd
2 changed files with 53 additions and 99 deletions
|
@ -63,9 +63,9 @@ use gpui::{
|
|||
};
|
||||
use itertools::Itertools;
|
||||
use language::{
|
||||
Buffer, BufferEvent, Capability, CodeLabel, File as _, Language, LanguageName,
|
||||
LanguageRegistry, PointUtf16, ToOffset, ToPointUtf16, Toolchain, ToolchainList, Transaction,
|
||||
Unclipped, language_settings::InlayHintKind, proto::split_operations,
|
||||
Buffer, BufferEvent, Capability, CodeLabel, Language, LanguageName, LanguageRegistry,
|
||||
PointUtf16, ToOffset, ToPointUtf16, Toolchain, ToolchainList, Transaction, Unclipped,
|
||||
language_settings::InlayHintKind, proto::split_operations,
|
||||
};
|
||||
use lsp::{
|
||||
CodeActionKind, CompletionContext, CompletionItemKind, DocumentHighlightKind, LanguageServerId,
|
||||
|
@ -4990,7 +4990,7 @@ impl ProjectItem for Buffer {
|
|||
}
|
||||
|
||||
fn project_path(&self, cx: &App) -> Option<ProjectPath> {
|
||||
File::from_dyn(self.file()).map(|file| ProjectPath {
|
||||
self.file().map(|file| ProjectPath {
|
||||
worktree_id: file.worktree_id(cx),
|
||||
path: file.path().clone(),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue