[REMOTE-1544] Apply slash command enablement checks on execution#10466
Open
[REMOTE-1544] Apply slash command enablement checks on execution#10466
Conversation
5588759 to
5ead67d
Compare
5ead67d to
a53b641
Compare
Contributor
|
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 Powered by Oz |
Contributor
There was a problem hiding this comment.
Overview
This PR adds runtime slash-command availability checks before menu selection and enter-key execution, wires the Cloud Mode v2 composer to its own data source, and updates tests around cloud-mode slash command handling.
Concerns
- No blocking correctness or security concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This fixes a bug where executing
/agent <some query>in the Cloud Mode composer would result in a broken session.The root issue was that we check slash command availability when constructing the menu, but not when actually executing a slash command. To fix this, we adjust
SlashCommandDataSourceto support checking if a specific command is available, and use this to gate execution in theInputview. This protects against a user typing or pasting/invalid-commandand bypassing the menu.For this fix to be effective, we also need to check against the proper set of slash commands - namely, the v2 Cloud Mode composer uses a separate data source, and we have to check against that data source rather than the generic one. The
Inputview now receives handles to bothSlashCommandDataSources, and chooses the appropriate one based on its current state.Linked Issue
https://linear.app/warpdotdev/issue/REMOTE-1544/sending-a-slash-command-skill-in-the-old-cloud-mode-ui-and-current-ui
Testing
./script/runScreenshots / Videos
https://www.loom.com/share/db71b808547149f8a2f0b2921d75c87d
Agent Mode