diff --git a/package.json b/package.json index 21f78d8..e26e6b6 100644 --- a/package.json +++ b/package.json @@ -5370,6 +5370,12 @@ "category": "GitLens" }, { + "command": "gitlens.views.home.refresh", + "title": "Refresh", + "category": "GitLens", + "icon": "$(refresh)" + }, + { "command": "gitlens.views.lineHistory.changeBase", "title": "Change Base...", "category": "GitLens", @@ -5835,6 +5841,12 @@ "category": "GitLens" }, { + "command": "gitlens.views.timeline.refresh", + "title": "Refresh", + "category": "GitLens", + "icon": "$(refresh)" + }, + { "command": "gitlens.views.worktrees.copy", "title": "Copy", "category": "GitLens" @@ -7054,6 +7066,10 @@ "when": "false" }, { + "command": "gitlens.views.home.refresh", + "when": "false" + }, + { "command": "gitlens.views.lineHistory.changeBase", "when": "false" }, @@ -7382,6 +7398,10 @@ "when": "false" }, { + "command": "gitlens.views.timeline.refresh", + "when": "false" + }, + { "command": "gitlens.views.worktrees.copy", "when": "false" }, @@ -8099,6 +8119,11 @@ "group": "5_gitlens@0" }, { + "command": "gitlens.views.home.refresh", + "when": "view =~ /^gitlens\\.views\\.home/", + "group": "navigation@99" + }, + { "command": "gitlens.showLineHistoryView", "when": "!gitlens:hasVirtualFolders && view =~ /^gitlens\\.views\\.fileHistory/", "group": "8_gitlens_toggles@0" @@ -8374,6 +8399,11 @@ "group": "5_gitlens@0" }, { + "command": "gitlens.views.timeline.refresh", + "when": "view =~ /^gitlens\\.views\\.timeline/", + "group": "navigation@99" + }, + { "command": "gitlens.views.createWorktree", "when": "view =~ /^gitlens\\.views\\.worktrees/", "group": "navigation@10" diff --git a/src/premium/webviews/timeline/timelineWebviewView.ts b/src/premium/webviews/timeline/timelineWebviewView.ts index ccd833a..406355b 100644 --- a/src/premium/webviews/timeline/timelineWebviewView.ts +++ b/src/premium/webviews/timeline/timelineWebviewView.ts @@ -62,6 +62,10 @@ export class TimelineWebviewView extends WebviewViewBase { return this.getState(this._context); } + protected override registerCommands(): Disposable[] { + return [commands.registerCommand(`${this.id}.refresh`, () => this.refresh(), this)]; + } + @debug({ args: false }) private onActiveEditorChanged(editor: TextEditor | undefined) { if (!this.updatePendingEditor(editor)) return; diff --git a/src/webviews/home/homeWebviewView.ts b/src/webviews/home/homeWebviewView.ts index 1b8da78..0198685 100644 --- a/src/webviews/home/homeWebviewView.ts +++ b/src/webviews/home/homeWebviewView.ts @@ -43,6 +43,7 @@ export class HomeWebviewView extends WebviewViewBase { protected override registerCommands(): Disposable[] { return [ + commands.registerCommand(`${this.id}.refresh`, () => this.refresh(), this), commands.registerCommand('gitlens.home.toggleWelcome', async () => { const welcomeVisible = this.container.storage.get(SyncedStorageKeys.HomeViewWelcomeVisible, true); await this.container.storage.store(SyncedStorageKeys.HomeViewWelcomeVisible, !welcomeVisible);