Skip to content

Commit

Permalink
refactor(editor-attachment): replace getActionHandler with ctx.routin…
Browse files Browse the repository at this point in the history
…es for document selection
  • Loading branch information
purocean committed Jan 8, 2025
1 parent 0e5d1e3 commit 089f7a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/plugins/editor-attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
keybindings: [
monaco.KeyMod.Alt | monaco.KeyCode.KeyD
],
run: () => getActionHandler('filter.choose-document')().then(addDocument),
run: () => ctx.routines.chooseDocument().then(addDocument),
})
editor.addAction({
id: idLinkFile,
Expand Down Expand Up @@ -145,7 +145,7 @@ export default {
title: ctx.i18n.t('editor.context-menu.link-doc'),
subTitle: ctx.keybinding.getKeysLabel(ctx.editor.lookupKeybindingKeys(idLinkDoc) || []),
ellipsis: true,
onClick: () => getActionHandler('filter.choose-document')().then(addDocument),
onClick: () => ctx.routines.chooseDocument().then(addDocument),
},
{
id: idLinkFile,
Expand Down

0 comments on commit 089f7a4

Please sign in to comment.