Make /environment slash command available in & handoff compose mode#11039
Closed
harryalbert wants to merge 2 commits into
Closed
Make /environment slash command available in & handoff compose mode#11039harryalbert wants to merge 2 commits into
harryalbert wants to merge 2 commits into
Conversation
The /environment command was previously gated on CLOUD_AGENT_V2 availability, restricting it to only the V2 cloud-mode composing input. This change makes it also available during handoff compose (& mode) by: - Removing CLOUD_AGENT_V2 from /environment's availability flags - Adding handoff compose state tracking to the slash command data source - Gating /environment on either V2 cloud mode or active handoff compose - Opening the handoff environment selector when in handoff mode Co-Authored-By: Oz <oz-agent@warp.dev>
clear_buffer_and_reset_undo_stack explicitly calls exit_cloud_handoff_compose, which tears down the handoff state before the environment selector can open. In handoff mode, only clear the editor text directly instead. Co-Authored-By: Oz <oz-agent@warp.dev>
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
Makes the
/environmentslash command available in the&handoff compose mode, not just the V2 cloud-mode composing input.Previously,
/environmentwas gated onCLOUD_AGENT_V2availability, which is only set for the V2 cloud-mode data source. The handoff compose mode (&) explicitly opts out of V2 composing, so/environmentwas never shown there. Users had to use the footer environment chip to switch environments during handoff compose.Changes:
CLOUD_AGENT_V2from/environment's availability flags (nowAGENT_VIEW | AI_ENABLED)handoff_compose_statetoSlashCommandDataSourceso it can track when handoff is activecommand_is_active_in_contextcheck that requires eitherCLOUD_AGENT_V2or active handoff compose for/environment/environmentexecution handler to open the handoff environment selector (instead of the V2 one) when handoff compose is activeopen_handoff_environment_selectortoInputandAgentInputFooterLinked Issue
ready-to-specorready-to-implement.Testing
./script/runAgent Mode
CHANGELOG-NONE
Conversation: https://staging.warp.dev/conversation/243232a0-a86b-4776-be28-4dea0996b05a
Run: https://oz.staging.warp.dev/runs/019e2d12-bf61-7d71-9e58-1e01229b18dd
This PR was generated with Oz.