How to use the vsls.Role.Guest function in vsls

To help you get started, we’ve selected a few vsls examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eamodio / vscode-gitlens / src / vsls / vsls.ts View on Github external
this._host.dispose();
		}

		if (this._guest !== undefined) {
			this._guest.dispose();
		}

		switch (e.session.role) {
			case Role.Host:
				this.setReadonly(false);
				setCommandContext(CommandContext.Vsls, 'host');
				if (Container.config.liveshare.allowGuestAccess) {
					this._host = await VslsHostService.share(api);
				}
				break;
			case Role.Guest:
				this.setReadonly(true);
				setCommandContext(CommandContext.Vsls, 'guest');
				this._guest = await VslsGuestService.connect(api);
				break;

			default:
				this.setReadonly(false);
				setCommandContext(CommandContext.Vsls, true);
				break;
		}

		if (this._onReady !== undefined) {
			this._onReady();
			this._onReady = undefined;
		}
	}

vsls

Enables VS Code extensions to access Live Share capabilities.

CC-BY-4.0
Latest version published 3 years ago

Package Health Score

68 / 100
Full package analysis