feat: adding ai menu shortcut (align with copilot) #1795
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ctrl-I or Command-I to open AI-Menu
This pull request introduces enhancements to the
xl-ai
package, 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 theShortcutPlugin
for streamlined AI menu access and updating dependencies inpackage.json
to support new functionality.Dependency Updates:
packages/xl-ai/package.json
: Addedprosemirror-keymap
and 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-keymap
library 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 theShortcutPlugin
and integrated it into theAIExtension
class, ensuring the plugin is added to the ProseMirror editor.