mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
Trusted Workspaces Feature Branch Merge (#115961)
* draft trusted workspace service / model * renaming * add request model and action * err fix * add request handlers with mock actions * some quick fixes * adding badge icon to activity bar gear * Add Statusbar item to indicate trust * Cleanup code * Add background color * Use theme color for the status background color * adding basic editing experience * observe trust with startup tasks * Extension enablement * Add capability to provide a custom message * Remove old actions * explorer: if you can not undo, pass undo to editor fixes #111630 * Remove plug icon from ports view Part of https://github.com/microsoft/vscode-internalbacklog/issues/1689 * Fixed compilation error * Handle extension uninstall * Handle extension install * Ability to prompt when state is untrusted * Do not change state is the modal dialog is dismissed or the Cancel button is pressed * Refactored enablement code * Prompt when installing from VSIX * Prompt when installing from the Gallery * Move file into the browser folder * fixes and polish * restructure workspace contributions * restructure actions and use confirmations * Initial draft of the proposed APIs * Added stubs for the proposed api * Trusted Workspace proposed API * Fix a regression introduced by merge * status bar indicator improvements * remove helper command as we now have hooks * verbose messaging for the immediate request * add indication to global activity icon of pending request * try personal title * Add configuration setting * Add additional extension actions * Fix contributions * Removed context key that is not needed * Fixed issue with the dialog * Reduce arbitrary event limiter from 16ms down to 4.16666 (support for monitors up-to 240hz) #107016 * Fixes #115221: update emoji tests * Give a higher priority to language configuration set via API call (#114684) * debug console menu action polish * Avoid the CSS general sibling combinator ~ for perf reasons * more notebook todos * Use label as tooltip fallback properly Part of #115337 * Fixes microsoft/monaco-editor#2329: Move `registerThemingParticipant` call to `/editor/` * Fix port label not always getting set Part of microsoft/vscode-remote-release#4364 * simplify map creation, fyi @bpasero * Fix #114432: Multiple save dialogs appearing on Windows if Ctrl+S is pressed multiple times (#114450) * fix multiple save dialogs appearing on Windows when spamming Ctrl+S * remove old fix and instead keep track of windows with open dialogs in the dialogMainService * keep initialisation of activeWindowDialogs in constructor * remove unused variable * some changes * queue dialogs based on hash of options * simplify structure, fix comment typo * Apply suggestions from code review Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com> * remove unnecessary async/await for aquireFileDialogLock method * don't acquire file dialog lock for message boxes * use MessageBoxReturnValue | SaveDialogReturnValue | OpenDialogReturnValue instead of any type for getWindowDialogQueue * Apply suggestions from code review Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com> Co-authored-by: Benjamin Pasero <benjpas@microsoft.com> Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com> * 💄 dialog main service locks * debt - adopt some ? operator * Better hiding of custom hover in icon label * Limit to 8ms (120fps) * more API todos for notebooks * 💄 * Update grammars * chore - group notebook specific api proposals together * added unreleased fixes to endgame notebook * Add changes back to the modal dialog * Add back the workspace trust proposed APIs * Adjust dialog buttons * Standardize on WorkspaceTrust name across interfaces, classes, variables * Renamed some of the missing keys * Add TestWorkspaceTrust stub and fix failing tests * Add requiresWorkspaceTrust property to fix test failure * remove notebook change Co-authored-by: Ladislau Szomoru <lszomoru@microsoft.com> Co-authored-by: isidor <inikolic@microsoft.com> Co-authored-by: Alex Ross <alros@microsoft.com> Co-authored-by: TacticalDan <gorksorf@gmail.com> Co-authored-by: Alexandru Dima <alexdima@microsoft.com> Co-authored-by: Johannes Rieken <johannes.rieken@gmail.com> Co-authored-by: Cameron <cameron532@gmail.com> Co-authored-by: Benjamin Pasero <benjpas@microsoft.com> Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com>
This commit is contained in:
@@ -48,7 +48,7 @@ import { ExtHostUrls } from 'vs/workbench/api/common/extHostUrls';
|
||||
import { ExtHostWebviews } from 'vs/workbench/api/common/extHostWebview';
|
||||
import { IExtHostWindow } from 'vs/workbench/api/common/extHostWindow';
|
||||
import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
|
||||
import { throwProposedApiError, checkProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { throwProposedApiError, checkProposedApiEnabled, checkRequiresWorkspaceTrust } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { ProxyIdentifier } from 'vs/workbench/services/extensions/common/proxyIdentifier';
|
||||
import { ExtensionDescriptionRegistry } from 'vs/workbench/services/extensions/common/extensionDescriptionRegistry';
|
||||
import type * as vscode from 'vscode';
|
||||
@@ -881,11 +881,23 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
onDidChangeTunnels: (listener, thisArg?, disposables?) => {
|
||||
checkProposedApiEnabled(extension);
|
||||
return extHostTunnelService.onDidChangeTunnels(listener, thisArg, disposables);
|
||||
|
||||
},
|
||||
registerTimelineProvider: (scheme: string | string[], provider: vscode.TimelineProvider) => {
|
||||
checkProposedApiEnabled(extension);
|
||||
return extHostTimeline.registerTimelineProvider(scheme, provider, extension.identifier, extHostCommands.converter);
|
||||
},
|
||||
get trustState() {
|
||||
checkProposedApiEnabled(extension);
|
||||
checkRequiresWorkspaceTrust(extension);
|
||||
return extHostWorkspace.trustState;
|
||||
},
|
||||
requireWorkspaceTrust: (message?: string) => {
|
||||
checkProposedApiEnabled(extension);
|
||||
checkRequiresWorkspaceTrust(extension);
|
||||
return extHostWorkspace.requireWorkspaceTrust(message);
|
||||
},
|
||||
onDidChangeWorkspaceTrustState: (listener, thisArgs?, disposables?) => {
|
||||
return extHostWorkspace.onDidChangeWorkspaceTrustState(listener, thisArgs, disposables);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1284,6 +1296,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
// checkProposedApiEnabled(extension);
|
||||
return extHostTypes.TestState;
|
||||
},
|
||||
get WorkspaceTrustState() {
|
||||
// checkProposedApiEnabled(extension);
|
||||
return extHostTypes.WorkspaceTrustState;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user