diff --git a/packages/plugin-core/package.json b/packages/plugin-core/package.json index e46154675c..9df9e8f5e1 100644 --- a/packages/plugin-core/package.json +++ b/packages/plugin-core/package.json @@ -56,7 +56,7 @@ }, { "view": "dendron.treeView", - "contents": "Open a Dendron note to see the tree view." + "contents": "First open a Dendron note to see the tree view." } ], "viewsContainers": { @@ -599,6 +599,10 @@ { "command": "dendron.dev.validateEngine", "title": "Dendron:Dev: Validate Engine" + }, + { + "command": "dendron.showInfo", + "title": "Dendron:: Show Info" } ], "menus": { diff --git a/packages/plugin-core/src/commands/ShowInfo.ts b/packages/plugin-core/src/commands/ShowInfo.ts new file mode 100644 index 0000000000..d671dd017f --- /dev/null +++ b/packages/plugin-core/src/commands/ShowInfo.ts @@ -0,0 +1,23 @@ +import { DENDRON_COMMANDS } from "../constants"; +import { BasicCommand } from "./base"; + +type CommandOpts = {}; + +type CommandInput = {}; + +type CommandOutput = void; + +export class ShowInfo extends BasicCommand { + key = DENDRON_COMMANDS.SHOW_INFO.key; + async gatherInputs(): Promise { + return {}; + } + async execute() { + console.log("new command being executed"); + // env.openExternal( + // Uri.parse( + // "https://www.dendron.so/notes/f9540bb6-7a5a-46db-ae7c-e1a606f28c73.html" + // ) + // ); + } +} diff --git a/packages/plugin-core/src/commands/index.ts b/packages/plugin-core/src/commands/index.ts index 0e03504a33..6087df200b 100644 --- a/packages/plugin-core/src/commands/index.ts +++ b/packages/plugin-core/src/commands/index.ts @@ -85,6 +85,7 @@ import { VaultRemoveCommand } from "./VaultRemoveCommand"; import { RenameNoteCommand } from "./RenameNoteCommand"; import { CreateNoteCommand } from "./CreateNoteCommand"; import { MergeNoteCommand } from "./MergeNoteCommand"; +import { ShowInfo } from "./ShowInfo"; /** * Note: this does not contain commands that have parametered constructors, as @@ -177,6 +178,7 @@ const ALL_COMMANDS = [ ValidateEngineCommand, MergeNoteCommand, CreateNoteCommand, + ShowInfo, ] as CodeCommandConstructor[]; export { ALL_COMMANDS }; diff --git a/packages/plugin-core/src/constants.ts b/packages/plugin-core/src/constants.ts index fffe4701d6..baf98137c4 100644 --- a/packages/plugin-core/src/constants.ts +++ b/packages/plugin-core/src/constants.ts @@ -1051,6 +1051,10 @@ export const DENDRON_COMMANDS: { [key: string]: CommandEntry } = { title: `${CMD_PREFIX}Dev: Validate Engine`, when: `${DendronContext.PLUGIN_ACTIVE} && shellExecutionSupported`, }, + SHOW_INFO: { + key: "dendron.showInfo", + title: `${CMD_PREFIX}: Show Info`, + }, }; export const DENDRON_CHANNEL_NAME = "Dendron";