Path: blob/main/extensions/copilot/src/platform/open/common/opener.ts
13401 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { createServiceIdentifier } from '../../../util/common/services';67export const IUrlOpener = createServiceIdentifier<IUrlOpener>('IUrlOpener');89/**10* Encapsulates all the functionality related opening urls in a browser.11*/12export interface IUrlOpener {13readonly _serviceBrand: undefined;14open(target: string): void;15}1617export class NullUrlOpener implements IUrlOpener {1819declare readonly _serviceBrand: undefined;2021public readonly openedUrls: string[] = [];2223open(target: string): void {24this.openedUrls.push(target);25}26}272829