Skip to content

Commit 34a4b24

Browse files
committed
Allows users to open the output channel directly from error launchpad item.
(#4492, #4748)
1 parent 620117c commit 34a4b24

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/plus/launchpad/launchpad.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import { openUrl } from '../../system/-webview/vscode/uris';
5252
import { getScopedCounter } from '../../system/counter';
5353
import { fromNow } from '../../system/date';
5454
import { some } from '../../system/iterable';
55+
import { Logger } from '../../system/logger';
5556
import { interpolate, pluralize } from '../../system/string';
5657
import { ProviderBuildStatusState, ProviderPullRequestReviewState } from '../integrations/providers/models';
5758
import type { LaunchpadCategorizedResult, LaunchpadItem } from './launchpadProvider';
@@ -157,6 +158,11 @@ const instanceCounter = getScopedCounter();
157158

158159
const defaultCollapsedGroups: LaunchpadGroup[] = ['draft', 'other', 'snoozed'];
159160

161+
const OpenLogsQuickInputButton: QuickInputButton = {
162+
iconPath: new ThemeIcon('output'),
163+
tooltip: 'Open Logs',
164+
};
165+
160166
export class LaunchpadCommand extends QuickCommand<State> {
161167
private readonly source: Source;
162168
private readonly telemetryContext: LaunchpadTelemetryContext | undefined;
@@ -628,6 +634,7 @@ export class LaunchpadCommand extends QuickCommand<State> {
628634
typeof result.error.status === 'number'
629635
? `${result.error.status}: ${String(result.error)}`
630636
: String(result.error),
637+
buttons: [OpenLogsQuickInputButton],
631638
})
632639
: undefined;
633640

@@ -851,6 +858,11 @@ export class LaunchpadCommand extends QuickCommand<State> {
851858
return;
852859
}
853860

861+
if (button === OpenLogsQuickInputButton) {
862+
Logger.showOutputChannel();
863+
return;
864+
}
865+
854866
if (!item) return;
855867

856868
switch (button) {

0 commit comments

Comments
 (0)