Skip to content

Conversation

continue[bot]
Copy link
Contributor

@continue continue bot commented Sep 22, 2025

Problem

When highlighting code and pressing cmd+I to start Edit mode, pressing / only shows "Explore prompts" as if there are no prompts available. However, in Chat mode, pressing / correctly shows all available prompts and slash commands.

Solution

Fixed the slash command filtering logic in Edit mode to allow prompt-based commands while still filtering out inappropriate built-in legacy commands.

Changes:

  • Modified ContinueInputBox.tsx: Added whitelist of allowed slash command sources for Edit mode
  • Modified selector: Extended to include source property in slash command data
  • Extended types: Added optional source property to ComboBoxItem interface

Allowed sources in Edit mode:

  • yaml-prompt-block - YAML prompt blocks
  • mcp-prompt - MCP server prompts
  • prompt-file-v1 & prompt-file-v2 - Prompt files
  • invokable-rule - Invokable rules

Filtered out in Edit mode:

  • built-in-legacy commands like /commit, /share, etc.

Result

Edit mode now properly shows relevant prompts when pressing / instead of just "Explore prompts", making it consistent with Chat mode behavior for prompt-based slash commands.

Testing

The filtering logic has been implemented with proper TypeScript types and follows the same pattern as context provider filtering. The whitelist approach ensures only appropriate command sources are shown in Edit mode.


Summary by cubic

Enabled prompt-based slash commands in Edit mode by whitelisting allowed sources and filtering out built-in legacy commands. Pressing / in Edit now shows relevant prompts, matching Chat mode.

  • Bug Fixes
    • Whitelist in ContinueInputBox for: yaml-prompt-block, mcp-prompt, prompt-file-v1/v2, invokable-rule.
    • Added source to ComboBoxItem and passed it through the selector for filtering.
    • Replaced “hide all commands in Edit” with selective filtering.

…out built-in legacy commands

- Add source property to ComboBoxItem interface to track command origin
- Update selector to include source in slash command data
- Implement whitelist-based filtering for Edit mode:
  - Allow: yaml-prompt-block, mcp-prompt, prompt-file-v1/v2, invokable-rule
  - Filter out: built-in-legacy commands like /commit, /share, etc.
- Replace complete removal of slash commands with selective filtering

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <[email protected]>
@continue continue bot requested a review from a team as a code owner September 22, 2025 23:05
@continue continue bot requested review from sestinj and removed request for a team September 22, 2025 23:05
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Sep 22, 2025
@TyDunn TyDunn requested review from RomneyDa and removed request for sestinj September 22, 2025 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants