Skip to content

Commit 705661b

Browse files
Fixes launchpad/open event always being sent on extension load (#3289)
1 parent 695adba commit 705661b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/system/command.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { isWebviewContext } from './webview';
99

1010
export type CommandCallback = Parameters<typeof commands.registerCommand>[1];
1111

12-
type CommandConstructor = new (container: Container) => Command;
12+
type CommandConstructor = new (container: Container, ...args: any[]) => Command;
1313
const registrableCommands: CommandConstructor[] = [];
1414

1515
export function command(): ClassDecorator {
@@ -54,7 +54,9 @@ export function registerWebviewCommand(command: string, callback: CommandCallbac
5454
}
5555

5656
export function registerCommands(container: Container): Disposable[] {
57-
return registrableCommands.map(c => new c(container));
57+
return registrableCommands.map(c =>
58+
c.name === 'FocusCommand' ? new c(container, undefined, true) : new c(container),
59+
);
5860
}
5961

6062
export function asCommand<T extends unknown[]>(

0 commit comments

Comments
 (0)