From 73fd54d821ed7e36d1344aef74dd1098d9e9967e Mon Sep 17 00:00:00 2001 From: Jack Griffiths Date: Sat, 7 Sep 2024 16:51:46 +0100 Subject: [PATCH] Add command to clear history --- packages/renderer-vue/playground/App.vue | 5 +++++ packages/renderer-vue/src/commandList.ts | 4 ++-- packages/renderer-vue/src/history/index.ts | 11 +++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/renderer-vue/playground/App.vue b/packages/renderer-vue/playground/App.vue index 04ae73d1..a9f70f0b 100644 --- a/packages/renderer-vue/playground/App.vue +++ b/packages/renderer-vue/playground/App.vue @@ -14,6 +14,7 @@ + @@ -149,6 +150,10 @@ const changeSidebarWidth = () => { baklavaView.settings.sidebar.width = Math.round(Math.random() * 500) + 300; baklavaView.settings.sidebar.resizable = !baklavaView.settings.sidebar.resizable; }; + +const clearHistory = () => { + baklavaView.commandHandler.executeCommand(Commands.CLEAR_HISTORY_COMMAND); +};