feat: adding ai menu shortcut (align with copilot) - #1795
feat: adding ai menu shortcut (align with copilot)#1795BetterAndBetterII wants to merge 1 commit into
Conversation
|
@BetterAndBetterII is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
6befedf to
19b9b19
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe AI package adds a ProseMirror ChangesAI menu shortcut
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🟡 Moderate · up to The new Mod-I shortcut can bypass the existing read-only restriction and may leave a read-only editor editable after the AI menu is closed. This could allow unintended edits, so the read-only behavior should be corrected or explicitly accepted before merging. Sequence Diagram(s)sequenceDiagram
participant User
participant ShortcutPlugin
participant AIMenuExtension
User->>ShortcutPlugin: Press Mod-i
ShortcutPlugin->>AIMenuExtension: Check menu state
ShortcutPlugin->>AIMenuExtension: Open menu at selected block
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the shortcut, dependency update, plugin addition, and integration. It does not include the required rationale, impact, testing, checklist, screenshots/video, or additional notes sections. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
Ctrl-I or Command-I to open AI-Menu
This pull request introduces enhancements to the
xl-aipackage, focusing on dependency updates and the addition of a new ProseMirror plugin to enable keyboard shortcuts for AI menu interactions. The most significant changes include adding theShortcutPluginfor streamlined AI menu access and updating dependencies inpackage.jsonto support new functionality.Dependency Updates:
packages/xl-ai/package.json: Addedprosemirror-keymapand its type definitions (@types/prosemirror-keymap) to enable keyboard shortcut functionality.Plugin Addition:
packages/xl-ai/src/plugins/ShortcutPlugin.ts: Implemented theShortcutPlugin, which uses theprosemirror-keymaplibrary to bind the "Mod-i" shortcut for opening the AI menu at the appropriate block.Integration of ShortcutPlugin:
packages/xl-ai/src/AIExtension.ts: Imported theShortcutPluginand integrated it into theAIExtensionclass, ensuring the plugin is added to the ProseMirror editor.Summary by CodeRabbit