Fix skill creator remote project scopes (#57453) (cherry-pick to preview) (#57816)

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:
zed-zippy[bot] 2026-05-27 14:03:52 +00:00 committed by GitHub
parent 4d0cde92a6
commit 4ffc6a6f02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}