mirror of
https://github.com/yzh503/obsidian-aicommander-plugin.git
synced 2026-07-22 07:40:26 +00:00
Fix missing command
This commit is contained in:
parent
f2db30e7d0
commit
6db02ad730
1 changed files with 2 additions and 4 deletions
6
main.ts
6
main.ts
|
|
@ -397,7 +397,7 @@ export default class AICommanderPlugin extends Plugin {
|
|||
});
|
||||
|
||||
this.addCommand({
|
||||
id: 'img-line',
|
||||
id: 'text-line',
|
||||
name: 'Generate text from the current line',
|
||||
editorCallback: (editor: Editor, view: MarkdownView) => {
|
||||
const position = editor.getCursor();
|
||||
|
|
@ -417,7 +417,7 @@ export default class AICommanderPlugin extends Plugin {
|
|||
});
|
||||
|
||||
this.addCommand({
|
||||
id: 'prompt-text-selected',
|
||||
id: 'text-selected',
|
||||
name: 'Generate text from the selected text',
|
||||
editorCallback: (editor: Editor, view: MarkdownView) => {
|
||||
const selectedText = editor.getSelection();
|
||||
|
|
@ -478,7 +478,6 @@ export default class AICommanderPlugin extends Plugin {
|
|||
command = command.trim();
|
||||
if (command == null || command == undefined || command.length < 1) continue;
|
||||
const cid = command.toLowerCase().replace(/ /g, '-');
|
||||
console.log(cid);
|
||||
this.addCommand({
|
||||
id: cid,
|
||||
name: command,
|
||||
|
|
@ -495,7 +494,6 @@ export default class AICommanderPlugin extends Plugin {
|
|||
command = command.trim();
|
||||
if (command == null || command == undefined || command.length < 1) continue;
|
||||
const cid = command.toLowerCase().replace(/ /g, '-');
|
||||
console.log(cid);
|
||||
this.addCommand({
|
||||
id: cid,
|
||||
name: command,
|
||||
|
|
|
|||
Loading…
Reference in a new issue