Skip to content
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

Feature: Match Cursor's double-press behavior for AI Chat toggle (cmd+]) #6

Open
sheen4n opened this issue Nov 11, 2024 · 0 comments
Open

Comments

@sheen4n
Copy link

sheen4n commented Nov 11, 2024

Currently, our AI Chat toggle behavior differs from Cursor editor's implementation. We should align our cmd+] behavior with how Cursor handles double-press cmd+L for consistency across AI-enabled editors.

Current Behavior:

  • First press of cmd+] opens the ai chat panel
  • Second press of cmd+] does not close the ai chat panel (unless we toggle to the editor)

Expected Behavior:

  • Match Cursor editor's double-press pattern:
    • Single press of cmd+] opens the chat panel
    • Quick double press of cmd+] should toggle the chat panel
  • This mirrors Cursor's implementation where double-pressing cmd+L toggles their AI chat view

Technical Changes:

const additionalShortcuts = [
    {
        key: 'ctrl+]',
        mac: 'cmd+]',
        command: 'aichat.newchataction',
    },
    // ... other shortcuts
];
  • Remove the when clause restriction from aichat.newchataction
  • Ensures smooth toggle behavior on repeated keypresses

Reference:

  • Cursor Editor's cmd+L double-press behavior serves as the UX benchmark
  • This change will provide feature parity with Cursor's chat toggle implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant