Skip to content

Commit c855616

Browse files
authored
Merge pull request #198461 from microsoft/ulugbekna/yawning-mastodon
Replace `Date.now()` with UUID for `delegatingCommandId`
2 parents 71a8b99 + 4f41508 commit c855616

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/vs/workbench/api/common/extHostCommands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { StopWatch } from 'vs/base/common/stopwatch';
3131
import { ExtensionIdentifier, IExtensionDescription } from 'vs/platform/extensions/common/extensions';
3232
import { TelemetryTrustedValue } from 'vs/platform/telemetry/common/telemetryUtils';
3333
import { IExtHostTelemetry } from 'vs/workbench/api/common/extHostTelemetry';
34+
import { generateUuid } from 'vs/base/common/uuid';
3435

3536
interface CommandHandler {
3637
callback: Function;
@@ -342,7 +343,7 @@ export const IExtHostCommands = createDecorator<IExtHostCommands>('IExtHostComma
342343

343344
export class CommandsConverter implements extHostTypeConverter.Command.ICommandsConverter {
344345

345-
readonly delegatingCommandId: string = `__vsc${Date.now().toString(36)} `;
346+
readonly delegatingCommandId: string = `__vsc${generateUuid()}`;
346347
private readonly _cache = new Map<string, vscode.Command>();
347348
private _cachIdPool = 0;
348349

0 commit comments

Comments
 (0)