-
Notifications
You must be signed in to change notification settings - Fork 32
🤖 fix: unify chat input and commands flow #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
2288a76 to
05d4802
Compare
- Toast was only rendered for workspace variant, so slash command toasts (e.g., /providers help) were invisible in creation mode - Now renders a single ChatInputToast that shows either: - Shared toast from slash commands (priority) - Creation-specific toast as fallback - Command suggestions were already unified, this completes parity
The CommandSuggestions popup was being clipped by overflow:hidden on parent containers in creation mode. In workspace mode, ChatInput is positioned outside the overflow-hidden scroll container. Solution: Pass anchorRef to CommandSuggestions when in creation mode. When anchorRef is provided, the component uses createPortal to render to document.body with fixed positioning relative to the anchor element. This escapes the overflow:hidden containers and ensures suggestions are visible in both variants.
111250a to
93c016b
Compare
Fixes a regression introduced in #784 where slash commands were accidentally removed from creation mode during the ORPC migration. Supporting global commands like /providers in creation mode was originally introduced in #704. This PR restores that functionality with an improvement: workspace-only commands (clear, truncate, compact, fork, new) are now filtered from suggestions in creation mode rather than just showing an error toast when executed. Changes: - Restore CommandSuggestions in creation mode with portal rendering - Filter workspace-only commands from suggestions based on variant - Unify toast handling to show slash command feedback in both modes - Extract WORKSPACE_ONLY_COMMANDS to shared constant to avoid duplication
Fixes a regression introduced in #784 where slash commands were accidentally removed from creation mode during the ORPC migration. Supporting global commands like `/providers` in creation mode was originally introduced in #704. This PR restores that functionality with an improvement: workspace-only commands (`clear`, `truncate`, `compact`, `fork`, `new`) are now filtered from suggestions in creation mode rather than just showing an error toast when executed. ## Changes - Restore `CommandSuggestions` in creation mode with portal rendering (to escape `overflow:hidden` containers) - Filter workspace-only commands from suggestions based on variant - Unify toast handling to show slash command feedback in both modes - Extract `WORKSPACE_ONLY_COMMANDS` to shared constant to avoid duplication between suggestion filtering and command execution _Generated with `mux`_
Refactors chat command handling to unify behavior between workspace chat and creation flow. Supports global commands like /providers in creation mode. Reduces LoC by consolidating utility functions.