mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 22:43:18 +00:00
Cherry-pick of #57453 to preview ---- Summary: - Include remote worktrees as project-scope options in the skill creator. - Reuse workspace root path detection for project scope paths. Validation: - cargo check -p skill_creator - cargo test -p skill_creator Release Notes: - Fixed project-local skill creation for remote projects. Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
This commit is contained in:
parent
4d0cde92a6
commit
4ffc6a6f02
1 changed files with 7 additions and 9 deletions
|
|
@ -91,19 +91,17 @@ fn project_scopes_from_workspace(
|
|||
return Vec::new();
|
||||
};
|
||||
let workspace = workspace.read(cx);
|
||||
let project = workspace.project().read(cx);
|
||||
project
|
||||
let root_paths = workspace.root_paths(cx);
|
||||
workspace
|
||||
.visible_worktrees(cx)
|
||||
.filter_map(|worktree| {
|
||||
.zip(root_paths)
|
||||
.map(|(worktree, abs_path)| {
|
||||
let worktree = worktree.read(cx);
|
||||
if !worktree.is_local() {
|
||||
return None;
|
||||
}
|
||||
Some(ScopeChoice::Project {
|
||||
ScopeChoice::Project {
|
||||
worktree_id: worktree.id(),
|
||||
root_name: SharedString::from(worktree.root_name_str().to_string()),
|
||||
abs_path: worktree.abs_path(),
|
||||
})
|
||||
abs_path,
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue