Share slash command behavior between GUI and TUI#13602
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
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 |
There was a problem hiding this comment.
Overview
This PR shares slash-command parsing, menu-closing behavior, telemetry helpers, and skill invocation plumbing between the GUI and TUI surfaces.
Concerns
- User-visible TUI slash-command behavior changed, but the PR description explicitly says screenshots/videos are not included and manual TUI validation was skipped. Per the repo review guidance for TUI changes, please attach a terminal transcript,
render_to_lines/TuiBuffer::to_linessnapshot diff, or./script/run-tuicapture demonstrating the behavior end to end. - Submitted TUI slash-command input is now parsed before trimming, which regresses previously supported inputs with leading whitespace.
Verdict
Found: 0 critical, 2 important, 0 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
| ); | ||
| } else { | ||
| self.send_prompt(prompt.to_owned(), ctx); | ||
| .parse_input(input, ctx) |
There was a problem hiding this comment.
/compact or /skill no longer executes as a slash command even though the old TUI path trimmed before parsing; trim before parse_input and use the same trimmed value for fallback prompt submission.
There was a problem hiding this comment.
this is intended, to match GUI behavior
|
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 |
There was a problem hiding this comment.
Overview
This PR extracts shared slash-command helpers and routes TUI exact-match handling, telemetry, and submitted skill invocation through the shared GUI/TUI paths.
Concerns
⚠️ [IMPORTANT] This is a user-facing TUI behavior change, but the PR description explicitly says no screenshots/videos were included and manual TUI validation was skipped. For TUI changes, the repo guidance requires visual evidence such as a terminal transcript, arender_to_lines/TuiBuffer::to_linessnapshot diff, or a./script/run-tuicapture demonstrating the exact-match menu lifecycle and submitted static/skill behavior end to end.
Verdict
Found: 0 critical, 1 important, 0 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
Co-Authored-By: Oz <oz-agent@warp.dev>
| SlashCommandSelectionBehavior::Execute | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
extracts GUI logic
| || command.name == commands::COMPACT.name | ||
| || command.name == commands::PLAN.name | ||
| } | ||
| /// Records a static slash command accepted from either the GUI or TUI surface. |
There was a problem hiding this comment.
extracts GUI logic
| ); | ||
| if is_argument_entry || executes_on_selection { | ||
| if !menu_was_open | ||
| || should_close_slash_command_menu_for_exact_match( |
There was a problem hiding this comment.
now uses the extracted shared GUI logic
| .is_none() | ||
| .then(|| detected_skill.name.clone()), | ||
| ParsedSlashCommandInput::SkillCommand(detected_skill) => { | ||
| if !menu_was_open |
There was a problem hiding this comment.
was_open guards against re-opening the slash command menu if it was previously open (matching GUI behavior)
| } | ||
|
|
||
| /// Resolves a skill reference against this controller's active execution host. | ||
| pub(crate) fn resolve_skill_for_invocation( |
There was a problem hiding this comment.
these fns also simplify / pull out GUI logic
| ); | ||
| } else { | ||
| self.send_prompt(prompt.to_owned(), ctx); | ||
| .parse_input(input, ctx) |
There was a problem hiding this comment.
this is intended, to match GUI behavior
Co-Authored-By: Oz <oz-agent@warp.dev>
7139365 to
e7b6c57
Compare

Description
Stack: 1 of 4. Follow-up: #13603.
Establishes behavioral parity between the GUI and TUI for exact-match slash-command menu visibility, acceptance telemetry, and submitted skill invocation.
The TUI now parses submitted input before clearing it, so recognized static commands and skills take their typed execution paths while ordinary text remains an Agent prompt. Skill resolution and request construction are extracted into
BlocklistAIControllerand reused by both GUI and TUI call sites.Ordinary nonblank prompts are submitted without trimming their leading whitespace. This preserves GUI parity and prevents input such as
/compactfrom regaining slash-command semantics after the shared parser correctly rejects it.In scope
Out of scope
How to review
app/src/terminal/input/slash_commands/mod.rsfor the newly extracted exact-match and telemetry helpers.app/src/ai/blocklist/controller.rstogether withapp/src/terminal/input.rs; this should be a behavior-preserving extraction of the existing GUI skill path.crates/warp_tui/src/slash_commands.rsfor the TUI integration of the shared exact-match rule.crates/warp_tui/src/terminal_session_view.rsfor submitted-input classification, raw-prompt preservation, and TUI skill invocation.app/src/tui_export.rs,app/src/terminal/input/slash_command_model_tests.rs, andcrates/warp_tui/src/terminal_session_view_tests.rsfor the exported boundary and parity coverage.Linked Issue
No linked issue.
ready-to-specorready-to-implement.Testing
Final-stack validation on 2026-07-11:
./script/format— passed.cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings— passed.cargo clippy -p warp_completer --all-targets --tests -- -D warnings— passed.Cargo tests and manual TUI validation were not rerun after the final restack.
./script/runScreenshots / Videos
Not included; manual TUI validation remains outstanding.
Agent Mode
CHANGELOG-IMPROVEMENT: Keep slash-command behavior consistent between the GUI and TUI.
Co-Authored-By: Oz oz-agent@warp.dev