Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Feb 4, 2025

Trying out an alternative approach to slash commands to switch modes (#764) - thoughts? I like that this one has visual feedback and does a fuzzy match, and potentially sets us up for more types of slash commands in the future.
Screenshot 2025-02-04 at 10 50 26 AM


Important

Adds slash command autocomplete for mode switching with fuzzy matching and visual feedback in the chat interface.

  • Behavior:
    • Adds slash command autocomplete for mode switching in ChatTextArea.tsx and ChatView.tsx.
    • Supports fuzzy matching and visual feedback for slash commands.
  • UI Components:
    • Updates ContextMenu.tsx to include mode options in context menu.
    • Modifies ChatTextArea.tsx to handle mode selection and input clearing.
  • Logic Changes:
    • Removes parseSlashCommand from modes.ts and related tests in modes.test.ts.
    • Updates getContextMenuOptions in context-mentions.ts to handle mode queries.
  • Misc:
    • Updates placeholder text in ChatView.tsx to indicate new slash command functionality.

This description was created by Ellipsis for ebd9084. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Feb 4, 2025

⚠️ No Changeset found

Latest commit: ebd9084

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Collaborator

@cte cte left a comment

Choose a reason for hiding this comment

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

Looks nice!

@cte
Copy link
Collaborator

cte commented Feb 4, 2025

Thinking forward a bit, we might want to try using this command component for contextual menus triggered by the prompt text area: https://ui.shadcn.com/docs/components/command

@mrubens mrubens force-pushed the slash_command_autocomplete branch from 3d2aeee to ebd9084 Compare February 5, 2025 05:13
@mrubens mrubens merged commit 2141d84 into main Feb 5, 2025
6 checks passed
@mrubens mrubens deleted the slash_command_autocomplete branch February 5, 2025 05:22
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.

3 participants