Skip to content

Conversation

@ethanndickson
Copy link
Member

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

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
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ethanndickson ethanndickson requested a review from Copilot December 9, 2025 07:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restores slash command functionality in workspace creation mode that was accidentally removed during the ORPC migration. The key improvement is that workspace-only commands are now filtered from suggestions in creation mode rather than just showing an error when executed.

Key changes:

  • Extracted WORKSPACE_ONLY_COMMANDS constant to centralize the list of commands requiring an existing workspace
  • Enhanced suggestion filtering to respect creation vs workspace variant contexts
  • Unified toast rendering to support slash command feedback in both modes

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/constants/slashCommands.ts New file defining workspace-only commands as a shared constant
src/browser/utils/slashCommands/types.ts Added variant field to SlashSuggestionContext to distinguish creation from workspace mode
src/browser/utils/slashCommands/suggestions.ts Updated suggestion filtering logic to exclude workspace-only commands in creation mode
src/browser/utils/chatCommands.ts Replaced hardcoded workspace commands array with shared constant
src/browser/components/ChatInput/index.tsx Restored CommandSuggestions component in creation mode with portal rendering and unified toast handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ethanndickson ethanndickson added this pull request to the merge queue Dec 9, 2025
Merged via the queue into main with commit 30a8a91 Dec 9, 2025
17 of 19 checks passed
@ethanndickson ethanndickson deleted the restore-providers-slash-command branch December 9, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant