mirror of
https://github.com/coder/code-server.git
synced 2026-06-25 11:27:11 +02:00
Update to VS Code 1.52.1
This commit is contained in:
@@ -25,14 +25,8 @@ import { IBackupFileService, IResolvedBackup } from 'vs/workbench/services/backu
|
||||
import { ITextSnapshot } from 'vs/editor/common/model';
|
||||
import { IExtensionService, NullExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { ClassifiedEvent, GDPRClassification, StrictPropertyChecker } from 'vs/platform/telemetry/common/gdprTypings';
|
||||
import { IKeyboardLayoutInfo, IKeymapService, ILinuxKeyboardLayoutInfo, ILinuxKeyboardMapping, IMacKeyboardLayoutInfo, IMacKeyboardMapping, IWindowsKeyboardLayoutInfo, IWindowsKeyboardMapping } from 'vs/workbench/services/keybinding/common/keymapInfo';
|
||||
import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { DispatchConfig } from 'vs/workbench/services/keybinding/common/dispatchConfig';
|
||||
import { IKeyboardMapper } from 'vs/workbench/services/keybinding/common/keyboardMapper';
|
||||
import { ChordKeybinding, ResolvedKeybinding, SimpleKeybinding } from 'vs/base/common/keyCodes';
|
||||
import { ScanCodeBinding } from 'vs/base/common/scanCode';
|
||||
import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding';
|
||||
import { isWindows, OS } from 'vs/base/common/platform';
|
||||
import { IKeyboardLayoutService } from 'vs/platform/keyboardLayout/common/keyboardLayout';
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
import { IWebviewService, WebviewContentOptions, WebviewElement, WebviewExtensionDescription, WebviewIcons, WebviewOptions, WebviewOverlay } from 'vs/workbench/contrib/webview/browser/webview';
|
||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { AbstractTextFileService } from 'vs/workbench/services/textfile/browser/textFileService';
|
||||
@@ -50,7 +44,7 @@ import { CustomTask, ContributedTask, InMemoryTask, TaskRunSource, ConfiguringTa
|
||||
import { TaskSystemInfo } from 'vs/workbench/contrib/tasks/common/taskSystem';
|
||||
import { IExtensionTipsService, IConfigBasedExtensionTip, IExecutableBasedExtensionTip, IWorkspaceTips } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { IWorkspaceTagsService, Tags } from 'vs/workbench/contrib/tags/common/workspaceTags';
|
||||
import { AsbtractOutputChannelModelService, IOutputChannelModelService } from 'vs/workbench/services/output/common/outputChannelModel';
|
||||
import { AbstractOutputChannelModelService, IOutputChannelModelService } from 'vs/workbench/contrib/output/common/outputChannelModel';
|
||||
import { joinPath } from 'vs/base/common/resources';
|
||||
import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { IIntegrityService, IntegrityTestResult } from 'vs/workbench/services/integrity/common/integrity';
|
||||
@@ -59,7 +53,9 @@ import { NativeParsedArgs } from 'vs/platform/environment/common/argv';
|
||||
import { IExtensionHostDebugParams } from 'vs/platform/environment/common/environment';
|
||||
import type { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
|
||||
import { BrowserKeyboardLayoutService } from 'vs/workbench/services/keybinding/browser/keyboardLayoutService';
|
||||
import { TerminalInstanceService } from 'vs/workbench/contrib/terminal/browser/terminalInstanceService';
|
||||
import { ITerminalInstanceService } from 'vs/workbench/contrib/terminal/browser/terminal';
|
||||
|
||||
|
||||
//#region Environment
|
||||
@@ -87,12 +83,10 @@ export class SimpleNativeWorkbenchEnvironmentService implements INativeWorkbench
|
||||
get tmpDir(): URI { return joinPath(this.userRoamingDataHome, 'tmp'); }
|
||||
get logsPath(): string { return joinPath(this.userRoamingDataHome, 'logs').path; }
|
||||
|
||||
get backupWorkspaceHome(): URI { return joinPath(this.userRoamingDataHome, 'Backups', 'workspace'); }
|
||||
updateBackupPath(newPath: string | undefined): void { }
|
||||
|
||||
sessionId = this.configuration.sessionId;
|
||||
machineId = this.configuration.machineId;
|
||||
remoteAuthority = this.configuration.remoteAuthority;
|
||||
os = { release: 'unknown' };
|
||||
|
||||
options?: IWorkbenchConstructionOptions | undefined;
|
||||
logExtensionHostCommunication?: boolean | undefined;
|
||||
@@ -127,7 +121,7 @@ export class SimpleNativeWorkbenchEnvironmentService implements INativeWorkbench
|
||||
|
||||
sharedIPCHandle: string = undefined!;
|
||||
|
||||
extensionsPath?: string | undefined;
|
||||
extensionsPath: string = undefined!;
|
||||
extensionsDownloadPath: string = undefined!;
|
||||
builtinExtensionsPath: string = undefined!;
|
||||
extraExtensionPaths: string[] = undefined!;
|
||||
@@ -435,6 +429,7 @@ export class SimpleRemoteAgentService implements IRemoteAgentService {
|
||||
async getRawEnvironment(): Promise<IRemoteAgentEnvironment | null> { return null; }
|
||||
async scanExtensions(skipExtensions?: ExtensionIdentifier[]): Promise<IExtensionDescription[]> { return []; }
|
||||
async scanSingleExtension(extensionLocation: URI, isBuiltin: boolean): Promise<IExtensionDescription | null> { return null; }
|
||||
async whenExtensionsReady(): Promise<void> { }
|
||||
}
|
||||
|
||||
//#endregion
|
||||
@@ -501,37 +496,11 @@ registerSingleton(ITelemetryService, SimpleTelemetryService);
|
||||
//#endregion
|
||||
|
||||
|
||||
//#region Keymap Service
|
||||
//#region Keymap Service (borrowed from browser for now to enable keyboard access)
|
||||
|
||||
class SimpleKeyboardMapper implements IKeyboardMapper {
|
||||
dumpDebugInfo(): string { return ''; }
|
||||
resolveKeybinding(keybinding: ChordKeybinding): ResolvedKeybinding[] { return []; }
|
||||
resolveKeyboardEvent(keyboardEvent: IKeyboardEvent): ResolvedKeybinding {
|
||||
let keybinding = new SimpleKeybinding(
|
||||
keyboardEvent.ctrlKey,
|
||||
keyboardEvent.shiftKey,
|
||||
keyboardEvent.altKey,
|
||||
keyboardEvent.metaKey,
|
||||
keyboardEvent.keyCode
|
||||
).toChord();
|
||||
return new USLayoutResolvedKeybinding(keybinding, OS);
|
||||
}
|
||||
resolveUserBinding(firstPart: (SimpleKeybinding | ScanCodeBinding)[]): ResolvedKeybinding[] { return []; }
|
||||
}
|
||||
class SimpleKeyboardLayoutService extends BrowserKeyboardLayoutService { }
|
||||
|
||||
class SimpleKeymapService implements IKeymapService {
|
||||
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChangeKeyboardMapper = Event.None;
|
||||
getKeyboardMapper(dispatchConfig: DispatchConfig): IKeyboardMapper { return new SimpleKeyboardMapper(); }
|
||||
getCurrentKeyboardLayout(): (IWindowsKeyboardLayoutInfo & { isUserKeyboardLayout?: boolean | undefined; isUSStandard?: true | undefined; }) | (ILinuxKeyboardLayoutInfo & { isUserKeyboardLayout?: boolean | undefined; isUSStandard?: true | undefined; }) | (IMacKeyboardLayoutInfo & { isUserKeyboardLayout?: boolean | undefined; isUSStandard?: true | undefined; }) | null { return null; }
|
||||
getAllKeyboardLayouts(): IKeyboardLayoutInfo[] { return []; }
|
||||
getRawKeyboardMapping(): IWindowsKeyboardMapping | ILinuxKeyboardMapping | IMacKeyboardMapping | null { return null; }
|
||||
validateCurrentKeyboardMapping(keyboardEvent: IKeyboardEvent): void { }
|
||||
}
|
||||
|
||||
registerSingleton(IKeymapService, SimpleKeymapService);
|
||||
registerSingleton(IKeyboardLayoutService, SimpleKeyboardLayoutService);
|
||||
|
||||
//#endregion
|
||||
|
||||
@@ -685,7 +654,7 @@ registerSingleton(IUserDataAutoSyncService, SimpleUserDataAutoSyncAccountService
|
||||
|
||||
//#region User Data Sync Store Management
|
||||
|
||||
class SimpleIUserDataSyncStoreManagementService implements IUserDataSyncStoreManagementService {
|
||||
class SimpleUserDataSyncStoreManagementService implements IUserDataSyncStoreManagementService {
|
||||
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
@@ -698,36 +667,10 @@ class SimpleIUserDataSyncStoreManagementService implements IUserDataSyncStoreMan
|
||||
async getPreviousUserDataSyncStore(): Promise<IUserDataSyncStore | undefined> { return undefined; }
|
||||
}
|
||||
|
||||
registerSingleton(IUserDataSyncStoreManagementService, SimpleIUserDataSyncStoreManagementService);
|
||||
registerSingleton(IUserDataSyncStoreManagementService, SimpleUserDataSyncStoreManagementService);
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region IStorageKeysSyncRegistryService
|
||||
|
||||
class SimpleIStorageKeysSyncRegistryService implements IStorageKeysSyncRegistryService {
|
||||
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChangeStorageKeys = Event.None;
|
||||
|
||||
storageKeys = [];
|
||||
|
||||
registerStorageKey(): void { }
|
||||
|
||||
onDidChangeExtensionStorageKeys = Event.None;
|
||||
|
||||
extensionsStorageKeys = [];
|
||||
|
||||
getExtensioStorageKeys() { return undefined; }
|
||||
|
||||
registerExtensionStorageKeys(): void { }
|
||||
}
|
||||
|
||||
registerSingleton(IStorageKeysSyncRegistryService, SimpleIStorageKeysSyncRegistryService);
|
||||
|
||||
//#endregion
|
||||
|
||||
|
||||
//#region Task
|
||||
|
||||
class SimpleTaskService implements ITaskService {
|
||||
@@ -756,6 +699,7 @@ class SimpleTaskService implements ITaskService {
|
||||
tryResolveTask(configuringTask: ConfiguringTask): Promise<CustomTask | ContributedTask | InMemoryTask | undefined> { throw new Error('Method not implemented.'); }
|
||||
getTasksForGroup(group: string): Promise<Task[]> { throw new Error('Method not implemented.'); }
|
||||
getRecentlyUsedTasks(): LinkedMap<string, string> { throw new Error('Method not implemented.'); }
|
||||
removeRecentlyUsedTask(taskRecentlyUsedKey: string): void { throw new Error('Method not implemented.'); }
|
||||
migrateRecentTasks(tasks: Task[]): Promise<void> { throw new Error('Method not implemented.'); }
|
||||
createSorter(): TaskSorter { throw new Error('Method not implemented.'); }
|
||||
getTaskDescription(task: CustomTask | ContributedTask | InMemoryTask | ConfiguringTask): string | undefined { throw new Error('Method not implemented.'); }
|
||||
@@ -800,7 +744,7 @@ class SimpleWorkspaceTagsService implements IWorkspaceTagsService {
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
async getTags(): Promise<Tags> { return Object.create(null); }
|
||||
getTelemetryWorkspaceId(workspace: IWorkspace, state: WorkbenchState): string | undefined { return undefined; }
|
||||
async getTelemetryWorkspaceId(workspace: IWorkspace, state: WorkbenchState): Promise<string | undefined> { return undefined; }
|
||||
async getHashedRemotesFromUri(workspaceUri: URI, stripEndingDotGit?: boolean): Promise<string[]> { return []; }
|
||||
}
|
||||
|
||||
@@ -811,7 +755,7 @@ registerSingleton(IWorkspaceTagsService, SimpleWorkspaceTagsService);
|
||||
|
||||
//#region Output Channel
|
||||
|
||||
class SimpleOutputChannelModelService extends AsbtractOutputChannelModelService {
|
||||
class SimpleOutputChannelModelService extends AbstractOutputChannelModelService {
|
||||
declare readonly _serviceBrand: undefined;
|
||||
}
|
||||
|
||||
@@ -834,3 +778,9 @@ class SimpleIntegrityService implements IIntegrityService {
|
||||
registerSingleton(IIntegrityService, SimpleIntegrityService);
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Terminal Instance
|
||||
|
||||
class SimpleTerminalInstanceService extends TerminalInstanceService { }
|
||||
|
||||
registerSingleton(ITerminalInstanceService, SimpleTerminalInstanceService);
|
||||
|
||||
Reference in New Issue
Block a user