Skip to content

Move slash input logic out of chat composer#23964

Merged
canvrno-oai merged 2 commits into
mainfrom
canvrno/slash-input-move
May 26, 2026
Merged

Move slash input logic out of chat composer#23964
canvrno-oai merged 2 commits into
mainfrom
canvrno/slash-input-move

Conversation

@canvrno-oai

@canvrno-oai canvrno-oai commented May 22, 2026

Copy link
Copy Markdown
Contributor

Recent composer cleanups split state ownership out of ChatComposer, but slash-command handling still mixed parsing, popup coordination, completion, submission validation, queue behavior, and argument element rebasing into the main composer file. Pending changes to slash command parsing and selection inspired this code move to prevent chat_composer.rs bloat.

This is just a refactor, no functional or behavioral changes are intended.

What changed

  • Move slash-command parsing and lookup helpers into bottom_pane/chat_composer/slash_input.rs.
  • Move slash popup key handling, command-name completion, and popup construction into the slash input helper module.
  • Centralize bare-command, inline-args, submission-validation, and queued-input action selection behind slash-specific helpers.
  • Move command argument text-element rebasing into the slash input module so inline command submission keeps the same element behavior with less composer-local logic.

Verification

  • just fmt
  • just test -p codex-tui
  • cargo insta pending-snapshots -p codex-tui

@canvrno-oai canvrno-oai force-pushed the canvrno/slash-input-move branch from 9c8ff55 to fc276f2 Compare May 22, 2026 18:10
@canvrno-oai canvrno-oai marked this pull request as ready for review May 22, 2026 18:21
@canvrno-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@etraut-openai etraut-openai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!

@canvrno-oai canvrno-oai merged commit db9cb04 into main May 26, 2026
31 checks passed
@canvrno-oai canvrno-oai deleted the canvrno/slash-input-move branch May 26, 2026 17:29
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants