Skip to content

filter local skills from remote#12262

Merged
moirahuang merged 6 commits into
masterfrom
moira/filter-local-skills-remote-session
Jun 6, 2026
Merged

filter local skills from remote#12262
moirahuang merged 6 commits into
masterfrom
moira/filter-local-skills-remote-session

Conversation

@moirahuang
Copy link
Copy Markdown
Contributor

@moirahuang moirahuang commented Jun 5, 2026

Description

We were exposing local skills to remote. This adds a filter to ensure we don't do that

Linked Issue

N/A

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

This is now WAI because resolve-merge-conflicts hasn't been installed for my remote yet

Screenshot 2026-06-05 at 11.46.44 AM.png

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label Jun 5, 2026
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Comment thread app/src/ai/skills/skill_manager.rs Outdated

if self.is_cloud_environment {
// In cloud environments, all skills are in scope regardless of cwd.
// In cloud environments, all skills allowed by the path scope are in scope
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling out that i'm setting this as the cloud behavior because i figured that we're intentionally scoping all the paths in the cloud env. i checked this PR for context on expected behavior https://github.com/warpdotdev/warp-internal/commit/d5b60683b14c635c9109bca0cbfa8727467ab151

Comment thread app/src/ai/skills/skill_manager.rs Outdated
if repo_root.as_ref().is_none_or(|root| dir.starts_with(root)) {
for path in dir_skill_paths {
skill_paths.push((dir.clone(), path.clone()));
if path_scope.includes(path) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter for correct skills

),
)
})
.unwrap_or((None, SkillPathScope::Local));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

figured falling back to local was reasonable

Comment thread app/src/ai/skills/skill_manager.rs Outdated
// regardless of cwd.
for (dir, dir_skill_paths) in &self.directory_skills {
if is_home_directory(dir) {
if is_home_directory(dir) || !path_scope.includes(dir) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is basically a no-op but i'm adding it to be clear that we should only include "allowed" scopes in the cloud env case as well

@moirahuang moirahuang marked this pull request as ready for review June 5, 2026 19:06
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 5, 2026

@moirahuang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@moirahuang moirahuang requested a review from kevinyang372 June 5, 2026 19:06
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds SkillPathScope and threads it through skill listing so local path-based skills are filtered out for remote sessions while bundled and host-matched remote skills remain available.

Concerns

  • This change affects user-visible skill lists and slash-command/menu behavior, but the PR description does not include screenshots or a screen recording demonstrating the local-vs-remote filtering end to end. For this user-facing change, please include screenshots or a screen recording demonstrating it working end to end.

Verdict

Found: 0 critical, 0 important, 1 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

pub fn get_skills_for_working_directory(
&self,
_working_directory: Option<&LocalOrRemotePath>,
_path_scope: SkillPathScope,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need an additional SkillPathScope here? Could we derive it from working_directory (which has LocalOrRemotePath)

@moirahuang moirahuang enabled auto-merge (squash) June 6, 2026 01:37
@moirahuang moirahuang merged commit e4ab191 into master Jun 6, 2026
26 checks passed
@moirahuang moirahuang deleted the moira/filter-local-skills-remote-session branch June 6, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants