@codingame/monaco-vscode-api 21.3.2 → 21.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lifecycle.js +2 -4
- package/missing-services.js +1 -4
- package/package.json +8 -8
- package/services.d.ts +3 -2
- package/services.js +6 -4
- package/vscode/src/vs/base/browser/domStylesheets.js +1 -8
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/workbench/common/editor.js +5 -1
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/commands.js +41 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/configurationSchema.js +153 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.js +11 -0
- package/vscode/src/vs/workbench/contrib/extensions/common/extensions.js +1 -1
- package/vscode/src/vs/workbench/contrib/extensions/common/searchExtensionsTool.js +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +6 -6
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +20 -20
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +4 -4
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +4 -4
- package/vscode/src/vs/workbench/contrib/list/browser/listResizeColumnAction.js +2 -2
- package/vscode/src/vs/workbench/contrib/list/browser/tableColumnResizeQuickPick.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypes.js +4 -4
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +3 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +9 -9
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +29 -29
- package/vscode/src/vs/workbench/contrib/tasks/common/constants.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +5 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +4 -4
- package/vscode/src/vs/workbench/contrib/testing/common/constants.js +11 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +3 -3
- package/vscode/src/vs/workbench/services/accounts/common/defaultAccount.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +16 -16
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +87 -87
- package/vscode/src/vs/workbench/services/language/common/languageService.js +28 -28
- package/vscode/src/vs/workbench/services/log/common/logConstants.js +1 -1
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +8 -8
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +6 -6
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +1 -1
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +22 -22
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +13 -13
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +13 -13
package/lifecycle.js
CHANGED
|
@@ -41,9 +41,9 @@ async function startup(instantiationService) {
|
|
|
41
41
|
await instantiationService.invokeFunction(async (accessor) => {
|
|
42
42
|
setHoverDelegateFactory((placement, enableInstantHover) => instantiationService.createInstance(WorkbenchHoverDelegate, placement, { instantHover: enableInstantHover }, {}));
|
|
43
43
|
setBaseLayerHoverDelegate(accessor.get(IHoverService));
|
|
44
|
-
});
|
|
45
|
-
await instantiationService.invokeFunction(async (accessor) => {
|
|
46
44
|
const lifecycleService = accessor.get(ILifecycleService);
|
|
45
|
+
Registry.as(Extensions.Workbench).start(accessor);
|
|
46
|
+
Registry.as(EditorExtensions.EditorFactory).start(accessor);
|
|
47
47
|
await Promise.all(serviceInitializeParticipants.map((participant) => participant(accessor)));
|
|
48
48
|
lifecycleService.phase = LifecyclePhase.Ready;
|
|
49
49
|
});
|
|
@@ -54,8 +54,6 @@ async function startup(instantiationService) {
|
|
|
54
54
|
serviceInitializedEmitter.fire();
|
|
55
55
|
void instantiationService.invokeFunction(async (accessor) => {
|
|
56
56
|
const lifecycleService = accessor.get(ILifecycleService);
|
|
57
|
-
Registry.as(Extensions.Workbench).start(accessor);
|
|
58
|
-
Registry.as(EditorExtensions.EditorFactory).start(accessor);
|
|
59
57
|
onRenderWorkbench((accessor) => {
|
|
60
58
|
accessor.get(IInstantiationService).createInstance(WorkbenchContextKeysHandler);
|
|
61
59
|
});
|
package/missing-services.js
CHANGED
|
@@ -6809,6 +6809,7 @@ class LanguageModelToolsService {
|
|
|
6809
6809
|
this.onDidChangeTools = Event.None;
|
|
6810
6810
|
this.registerToolData = () => Disposable.None;
|
|
6811
6811
|
this.registerToolImplementation = () => Disposable.None;
|
|
6812
|
+
this.registerTool = () => Disposable.None;
|
|
6812
6813
|
this.getTools = () => [];
|
|
6813
6814
|
this.invokeTool = unsupported;
|
|
6814
6815
|
this.cancelToolCallsForRequest = unsupported;
|
|
@@ -6819,7 +6820,6 @@ class LanguageModelToolsService {
|
|
|
6819
6820
|
this.toolSets = constObservable([]);
|
|
6820
6821
|
this.toToolEnablementMap = unsupported;
|
|
6821
6822
|
this.toToolAndToolSetEnablementMap = unsupported;
|
|
6822
|
-
this.registerTool = unsupported;
|
|
6823
6823
|
this.getToolAutoConfirmation = unsupported;
|
|
6824
6824
|
this.getToolSet = () => undefined;
|
|
6825
6825
|
}
|
|
@@ -6845,9 +6845,6 @@ __decorate([
|
|
|
6845
6845
|
__decorate([
|
|
6846
6846
|
Unsupported
|
|
6847
6847
|
], LanguageModelToolsService.prototype, "toToolAndToolSetEnablementMap", void 0);
|
|
6848
|
-
__decorate([
|
|
6849
|
-
Unsupported
|
|
6850
|
-
], LanguageModelToolsService.prototype, "registerTool", void 0);
|
|
6851
6848
|
__decorate([
|
|
6852
6849
|
Unsupported
|
|
6853
6850
|
], LanguageModelToolsService.prototype, "getToolAutoConfirmation", void 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "21.3.
|
|
3
|
+
"version": "21.3.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-base-service-override": "21.3.
|
|
19
|
-
"@codingame/monaco-vscode-environment-service-override": "21.3.
|
|
20
|
-
"@codingame/monaco-vscode-extensions-service-override": "21.3.
|
|
21
|
-
"@codingame/monaco-vscode-files-service-override": "21.3.
|
|
22
|
-
"@codingame/monaco-vscode-host-service-override": "21.3.
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "21.3.
|
|
24
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "21.3.
|
|
18
|
+
"@codingame/monaco-vscode-base-service-override": "21.3.4",
|
|
19
|
+
"@codingame/monaco-vscode-environment-service-override": "21.3.4",
|
|
20
|
+
"@codingame/monaco-vscode-extensions-service-override": "21.3.4",
|
|
21
|
+
"@codingame/monaco-vscode-files-service-override": "21.3.4",
|
|
22
|
+
"@codingame/monaco-vscode-host-service-override": "21.3.4",
|
|
23
|
+
"@codingame/monaco-vscode-layout-service-override": "21.3.4",
|
|
24
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "21.3.4",
|
|
25
25
|
"@vscode/iconv-lite-umd": "0.7.0",
|
|
26
26
|
"dompurify": "3.2.7",
|
|
27
27
|
"jschardet": "3.1.4",
|
package/services.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ import { type IEditorOverrideServices } from "./vscode/src/vs/editor/standalone/
|
|
|
5
5
|
import { type GetLeadingNonServiceArgs, type ServiceIdentifier, type ServicesAccessor } from "./vscode/src/vs/platform/instantiation/common/instantiation.js";
|
|
6
6
|
import type { IAction } from "./vscode/src/vs/base/common/actions.js";
|
|
7
7
|
import { type IDisposable } from "./vscode/src/vs/base/common/lifecycle.js";
|
|
8
|
-
import type { IWorkbenchConstructionOptions, IWorkspaceProvider } from "./vscode/src/vs/workbench/browser/web.api.js";
|
|
9
8
|
import { type ILazyWorkbenchContributionInstantiation, type IOnEditorWorkbenchContributionInstantiation, type WorkbenchContributionInstantiation, WorkbenchPhase } from "./vscode/src/vs/workbench/common/contributions.js";
|
|
10
9
|
import { IProductService } from "./vscode/src/vs/platform/product/common/productService.service.js";
|
|
11
10
|
import type { IConfigurationChangeEvent } from "./vscode/src/vs/platform/configuration/common/configuration.js";
|
|
12
11
|
import type { IColorTheme } from "./vscode/src/vs/platform/theme/common/themeService.js";
|
|
13
12
|
import { type EnvironmentOverride } from "./workbench.js";
|
|
13
|
+
import { type IWorkbenchConstructionOptions } from "./vscode/src/vs/workbench/browser/web.api.js";
|
|
14
14
|
declare global {
|
|
15
15
|
interface Window {
|
|
16
16
|
monacoVscodeApiBuildId?: string;
|
|
@@ -114,7 +114,8 @@ export { ISecretStorageService } from "./vscode/src/vs/platform/secrets/common/s
|
|
|
114
114
|
export type { ISecretStorageProvider } from "@codingame/monaco-vscode-secret-storage-service-override/vscode/vs/platform/secrets/common/secrets";
|
|
115
115
|
export type { IProductConfiguration } from "./vscode/src/vs/base/common/product.js";
|
|
116
116
|
export { StorageScope, StorageTarget, Severity, IProductService, WorkbenchPhase };
|
|
117
|
-
export type { IAction, IConfigurationChangeEvent, ITextModelContentProvider, IColorTheme, IWorkbenchConstructionOptions,
|
|
117
|
+
export type { IAction, IConfigurationChangeEvent, ITextModelContentProvider, IColorTheme, IWorkbenchConstructionOptions, IEditorOverrideServices, WorkbenchContributionInstantiation, ILazyWorkbenchContributionInstantiation, IOnEditorWorkbenchContributionInstantiation, ServicesAccessor };
|
|
118
|
+
export * from "./vscode/src/vs/workbench/browser/web.api.js";
|
|
118
119
|
export { ConfigurationTarget } from "./vscode/src/vs/platform/configuration/common/configuration.js";
|
|
119
120
|
export { IRemoteExplorerService } from "./vscode/src/vs/workbench/services/remote/common/remoteExplorerService.service.js";
|
|
120
121
|
export { ITunnelService } from "./vscode/src/vs/platform/tunnel/common/tunnel.service.js";
|
package/services.js
CHANGED
|
@@ -27,6 +27,7 @@ import './vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js';
|
|
|
27
27
|
import './vscode/src/vs/workbench/contrib/contextmenu/browser/contextmenu.contribution.js';
|
|
28
28
|
import './vscode/src/vs/workbench/browser/actions/textInputActions.js';
|
|
29
29
|
import './vscode/src/vs/workbench/browser/actions/developerActions.js';
|
|
30
|
+
import './vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.js';
|
|
30
31
|
import './vscode/src/vs/editor/browser/coreCommands.js';
|
|
31
32
|
import './vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js';
|
|
32
33
|
import './vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js';
|
|
@@ -114,6 +115,7 @@ import { CommandsRegistry } from './vscode/src/vs/platform/commands/common/comma
|
|
|
114
115
|
import { asArray } from './vscode/src/vs/base/common/arrays.js';
|
|
115
116
|
import { MenuId, MenuRegistry } from './vscode/src/vs/platform/actions/common/actions.js';
|
|
116
117
|
import { Menu } from './vscode/src/vs/workbench/browser/web.api.js';
|
|
118
|
+
export { ColorScheme } from './vscode/src/vs/workbench/browser/web.api.js';
|
|
117
119
|
export { SyncDescriptor } from './vscode/src/vs/platform/instantiation/common/descriptors.js';
|
|
118
120
|
export { ICommandService } from './vscode/src/vs/platform/commands/common/commands.service.js';
|
|
119
121
|
export { INotificationService } from './vscode/src/vs/platform/notification/common/notification.service.js';
|
|
@@ -400,10 +402,10 @@ export { IInlineCompletionsUnificationService } from './vscode/src/vs/workbench/
|
|
|
400
402
|
export { IMcpGalleryManifestService } from './vscode/src/vs/platform/mcp/common/mcpGalleryManifest.service.js';
|
|
401
403
|
export { IDataChannelService } from './vscode/src/vs/platform/dataChannel/common/dataChannel.service.js';
|
|
402
404
|
|
|
403
|
-
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.104.2-
|
|
404
|
-
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.104.2-
|
|
405
|
+
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.104.2-40e5b938-3f79-4e2a-abd8-f26d12aed397") {
|
|
406
|
+
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.104.2-40e5b938-3f79-4e2a-abd8-f26d12aed397"}, ${window.monacoVscodeApiBuildId} is already loaded`);
|
|
405
407
|
}
|
|
406
|
-
window.monacoVscodeApiBuildId = "1.104.2-
|
|
408
|
+
window.monacoVscodeApiBuildId = "1.104.2-40e5b938-3f79-4e2a-abd8-f26d12aed397";
|
|
407
409
|
function registerCommands(options) {
|
|
408
410
|
function asMenuId(menu) {
|
|
409
411
|
switch (menu) {
|
|
@@ -482,4 +484,4 @@ const registerWorkbenchContribution = (id, contribution, instantiation) => {
|
|
|
482
484
|
registerWorkbenchContribution2(id, Contribution, instantiation);
|
|
483
485
|
};
|
|
484
486
|
|
|
485
|
-
export { IInstantiationService, IProductService, StandaloneServices, createInstance, createInstanceSync, getService, initialize, registerWorkbenchContribution, withReadyServices };
|
|
487
|
+
export { IInstantiationService, IProductService, Menu, StandaloneServices, createInstance, createInstanceSync, getService, initialize, registerWorkbenchContribution, withReadyServices };
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { toDisposable, DisposableStore } from '../common/lifecycle.js';
|
|
3
3
|
import '../common/observableInternal/index.js';
|
|
4
4
|
import { isShadowRoot, createElement, getWindows, sharedMutationObserver } from './dom.js';
|
|
5
|
-
import { isFirefox } from './browser.js';
|
|
6
5
|
import { mainWindow } from './window.js';
|
|
7
6
|
import { autorun } from '../common/observableInternal/reactions/autorun.js';
|
|
8
7
|
|
|
@@ -86,13 +85,7 @@ function cloneGlobalStyleSheet(globalStylesheet, globalStylesheetClones, windowE
|
|
|
86
85
|
for (const rule of getDynamicStyleSheetRules(globalStylesheet)) {
|
|
87
86
|
clone.sheet?.insertRule(rule.cssText, clone.sheet?.cssRules.length);
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
childList: true
|
|
91
|
-
};
|
|
92
|
-
if (isFirefox) {
|
|
93
|
-
observeInit = { ...observeInit, attributes: true, attributeFilter: ['data-version'] };
|
|
94
|
-
}
|
|
95
|
-
disposables.add(sharedMutationObserver.observe(globalStylesheet, disposables, observeInit)(() => {
|
|
88
|
+
disposables.add(sharedMutationObserver.observe(globalStylesheet, disposables, { childList: true, subtree: true, characterData: true })(() => {
|
|
96
89
|
clone.textContent = globalStylesheet.textContent;
|
|
97
90
|
}));
|
|
98
91
|
globalStylesheetClones.add(clone);
|
|
@@ -41,6 +41,10 @@ function isEditorPaneWithSelection(editorPane) {
|
|
|
41
41
|
const candidate = editorPane;
|
|
42
42
|
return !!candidate && typeof candidate.getSelection === 'function' && !!candidate.onDidChangeSelection;
|
|
43
43
|
}
|
|
44
|
+
function isEditorPaneWithScrolling(editorPane) {
|
|
45
|
+
const candidate = editorPane;
|
|
46
|
+
return !!candidate && typeof candidate.getScrollPosition === 'function' && typeof candidate.setScrollPosition === 'function' && !!candidate.onDidChangeScroll;
|
|
47
|
+
}
|
|
44
48
|
function findViewStateForEditor(input, group, editorService) {
|
|
45
49
|
for (const editorPane of editorService.visibleEditorPanes) {
|
|
46
50
|
if (editorPane.group.id === group && input.matches(editorPane.input)) {
|
|
@@ -464,4 +468,4 @@ function createEditorOpenError(messageOrError, actions, options) {
|
|
|
464
468
|
return error;
|
|
465
469
|
}
|
|
466
470
|
|
|
467
|
-
export { AbstractEditorInput, BINARY_DIFF_EDITOR_ID, CloseDirection, DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorCloseMethod, EditorExtensions, EditorInputCapabilities, EditorPaneSelectionChangeReason, EditorPaneSelectionCompareResult, EditorResourceAccessor, EditorsOrder, GroupModelChangeKind, SIDE_BY_SIDE_EDITOR_ID, SaveReason, SaveSourceRegistry, SideBySideEditor, TEXT_DIFF_EDITOR_ID, Verbosity, createEditorOpenError, createTooLargeFileError, findViewStateForEditor, isDiffEditorInput, isEditorCommandsContext, isEditorIdentifier, isEditorInput, isEditorInputWithOptions, isEditorInputWithOptionsAndGroup, isEditorOpenError, isEditorPaneWithSelection, isResourceDiffEditorInput, isResourceEditorInput, isResourceMergeEditorInput, isResourceMultiDiffEditorInput, isResourceSideBySideEditorInput, isSideBySideEditorInput, isTextEditorViewState, isUntitledResourceEditorInput, pathsToEditors, preventEditorClose };
|
|
471
|
+
export { AbstractEditorInput, BINARY_DIFF_EDITOR_ID, CloseDirection, DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorCloseMethod, EditorExtensions, EditorInputCapabilities, EditorPaneSelectionChangeReason, EditorPaneSelectionCompareResult, EditorResourceAccessor, EditorsOrder, GroupModelChangeKind, SIDE_BY_SIDE_EDITOR_ID, SaveReason, SaveSourceRegistry, SideBySideEditor, TEXT_DIFF_EDITOR_ID, Verbosity, createEditorOpenError, createTooLargeFileError, findViewStateForEditor, isDiffEditorInput, isEditorCommandsContext, isEditorIdentifier, isEditorInput, isEditorInputWithOptions, isEditorInputWithOptionsAndGroup, isEditorOpenError, isEditorPaneWithScrolling, isEditorPaneWithSelection, isResourceDiffEditorInput, isResourceEditorInput, isResourceMergeEditorInput, isResourceMultiDiffEditorInput, isResourceSideBySideEditorInput, isSideBySideEditorInput, isTextEditorViewState, isUntitledResourceEditorInput, pathsToEditors, preventEditorClose };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IWorkbenchContribution } from "../../../common/contributions.js";
|
|
2
|
+
import { IPreferencesService } from "../../../services/preferences/common/preferences.service.js";
|
|
3
|
+
export declare class DropOrPasteIntoCommands implements IWorkbenchContribution {
|
|
4
|
+
private readonly _preferencesService;
|
|
5
|
+
static ID: string;
|
|
6
|
+
constructor(_preferencesService: IPreferencesService);
|
|
7
|
+
private configurePreferredPasteAction;
|
|
8
|
+
private configurePreferredDropAction;
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
+
import { toAction } from '../../../../base/common/actions.js';
|
|
4
|
+
import { CopyPasteController, pasteAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/copyPasteController.js';
|
|
5
|
+
import { DropIntoEditorController, dropAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js';
|
|
6
|
+
import { localize } from '../../../../nls.js';
|
|
7
|
+
import { IPreferencesService } from '../../../services/preferences/common/preferences.service.js';
|
|
8
|
+
|
|
9
|
+
let DropOrPasteIntoCommands = class DropOrPasteIntoCommands {
|
|
10
|
+
static { this.ID = 'workbench.contrib.dropOrPasteInto'; }
|
|
11
|
+
constructor(_preferencesService) {
|
|
12
|
+
this._preferencesService = _preferencesService;
|
|
13
|
+
CopyPasteController.setConfigureDefaultAction(toAction({
|
|
14
|
+
id: 'workbench.action.configurePreferredPasteAction',
|
|
15
|
+
label: ( localize(6675, 'Configure preferred paste action...')),
|
|
16
|
+
run: () => this.configurePreferredPasteAction()
|
|
17
|
+
}));
|
|
18
|
+
DropIntoEditorController.setConfigureDefaultAction(toAction({
|
|
19
|
+
id: 'workbench.action.configurePreferredDropAction',
|
|
20
|
+
label: ( localize(6676, 'Configure preferred drop action...')),
|
|
21
|
+
run: () => this.configurePreferredDropAction()
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
configurePreferredPasteAction() {
|
|
25
|
+
return this._preferencesService.openUserSettings({
|
|
26
|
+
jsonEditor: true,
|
|
27
|
+
revealSetting: { key: pasteAsPreferenceConfig, edit: true }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
configurePreferredDropAction() {
|
|
31
|
+
return this._preferencesService.openUserSettings({
|
|
32
|
+
jsonEditor: true,
|
|
33
|
+
revealSetting: { key: dropAsPreferenceConfig, edit: true }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
DropOrPasteIntoCommands = ( __decorate([
|
|
38
|
+
( __param(0, IPreferencesService))
|
|
39
|
+
], DropOrPasteIntoCommands));
|
|
40
|
+
|
|
41
|
+
export { DropOrPasteIntoCommands };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Disposable } from "../../../../base/common/lifecycle.js";
|
|
2
|
+
import { ILanguageFeaturesService } from "../../../../editor/common/services/languageFeatures.service.js";
|
|
3
|
+
import { IConfigurationNode } from "../../../../platform/configuration/common/configurationRegistry.js";
|
|
4
|
+
import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
|
|
5
|
+
import { IWorkbenchContribution } from "../../../common/contributions.js";
|
|
6
|
+
export declare const editorConfiguration: Readonly<IConfigurationNode>;
|
|
7
|
+
export declare class DropOrPasteSchemaContribution extends Disposable implements IWorkbenchContribution {
|
|
8
|
+
private readonly languageFeatures;
|
|
9
|
+
static ID: string;
|
|
10
|
+
private readonly _onDidChangeSchemaContributions;
|
|
11
|
+
private _allProvidedDropKinds;
|
|
12
|
+
private _allProvidedPasteKinds;
|
|
13
|
+
constructor(keybindingService: IKeybindingService, languageFeatures: ILanguageFeaturesService);
|
|
14
|
+
private updateProvidedKinds;
|
|
15
|
+
private updateConfigurationSchema;
|
|
16
|
+
private getKeybindingSchemaAdditions;
|
|
17
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
+
import { Emitter, Event } from '../../../../base/common/event.js';
|
|
4
|
+
import { Disposable } from '../../../../base/common/lifecycle.js';
|
|
5
|
+
import { editorConfigurationBaseNode } from '../../../../editor/common/config/editorConfigurationSchema.js';
|
|
6
|
+
import { ILanguageFeaturesService } from '../../../../editor/common/services/languageFeatures.service.js';
|
|
7
|
+
import { pasteAsCommandId } from '../../../../editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js';
|
|
8
|
+
import { pasteAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/copyPasteController.js';
|
|
9
|
+
import { dropAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js';
|
|
10
|
+
import { localize } from '../../../../nls.js';
|
|
11
|
+
import { ConfigurationScope, Extensions } from '../../../../platform/configuration/common/configurationRegistry.js';
|
|
12
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
13
|
+
import { Registry } from '../../../../platform/registry/common/platform.js';
|
|
14
|
+
|
|
15
|
+
const dropEnumValues = [];
|
|
16
|
+
const dropAsPreferenceSchema = {
|
|
17
|
+
type: 'array',
|
|
18
|
+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,
|
|
19
|
+
description: ( localize(
|
|
20
|
+
6677,
|
|
21
|
+
"Configures the preferred type of edit to use when dropping content.\n\nThis is an ordered list of edit kinds. The first available edit of a preferred kind will be used."
|
|
22
|
+
)),
|
|
23
|
+
default: [],
|
|
24
|
+
items: {
|
|
25
|
+
description: ( localize(6678, "The kind identifier of the drop edit.")),
|
|
26
|
+
anyOf: [
|
|
27
|
+
{ type: 'string' },
|
|
28
|
+
{ enum: dropEnumValues }
|
|
29
|
+
],
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const pasteEnumValues = [];
|
|
33
|
+
const pasteAsPreferenceSchema = {
|
|
34
|
+
type: 'array',
|
|
35
|
+
scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,
|
|
36
|
+
description: ( localize(
|
|
37
|
+
6679,
|
|
38
|
+
"Configures the preferred type of edit to use when pasting content.\n\nThis is an ordered list of edit kinds. The first available edit of a preferred kind will be used."
|
|
39
|
+
)),
|
|
40
|
+
default: [],
|
|
41
|
+
items: {
|
|
42
|
+
description: ( localize(6680, "The kind identifier of the paste edit.")),
|
|
43
|
+
anyOf: [
|
|
44
|
+
{ type: 'string' },
|
|
45
|
+
{ enum: pasteEnumValues }
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const editorConfiguration = ( Object.freeze({
|
|
50
|
+
...editorConfigurationBaseNode,
|
|
51
|
+
properties: {
|
|
52
|
+
[pasteAsPreferenceConfig]: pasteAsPreferenceSchema,
|
|
53
|
+
[dropAsPreferenceConfig]: dropAsPreferenceSchema,
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
let DropOrPasteSchemaContribution = class DropOrPasteSchemaContribution extends Disposable {
|
|
57
|
+
static { this.ID = 'workbench.contrib.dropOrPasteIntoSchema'; }
|
|
58
|
+
constructor(keybindingService, languageFeatures) {
|
|
59
|
+
super();
|
|
60
|
+
this.languageFeatures = languageFeatures;
|
|
61
|
+
this._onDidChangeSchemaContributions = this._register(( new Emitter()));
|
|
62
|
+
this._allProvidedDropKinds = [];
|
|
63
|
+
this._allProvidedPasteKinds = [];
|
|
64
|
+
this._register(Event.runAndSubscribe(Event.debounce(Event.any(languageFeatures.documentPasteEditProvider.onDidChange, languageFeatures.documentPasteEditProvider.onDidChange), () => { }, 1000), () => {
|
|
65
|
+
this.updateProvidedKinds();
|
|
66
|
+
this.updateConfigurationSchema();
|
|
67
|
+
this._onDidChangeSchemaContributions.fire();
|
|
68
|
+
}));
|
|
69
|
+
this._register(keybindingService.registerSchemaContribution({
|
|
70
|
+
getSchemaAdditions: () => this.getKeybindingSchemaAdditions(),
|
|
71
|
+
onDidChange: this._onDidChangeSchemaContributions.event,
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
updateProvidedKinds() {
|
|
75
|
+
const dropKinds = ( new Map());
|
|
76
|
+
for (const provider of this.languageFeatures.documentDropEditProvider.allNoModel()) {
|
|
77
|
+
for (const kind of provider.providedDropEditKinds ?? []) {
|
|
78
|
+
dropKinds.set(kind.value, kind);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
this._allProvidedDropKinds = Array.from(( dropKinds.values()));
|
|
82
|
+
const pasteKinds = ( new Map());
|
|
83
|
+
for (const provider of this.languageFeatures.documentPasteEditProvider.allNoModel()) {
|
|
84
|
+
for (const kind of provider.providedPasteEditKinds ?? []) {
|
|
85
|
+
pasteKinds.set(kind.value, kind);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
this._allProvidedPasteKinds = Array.from(( pasteKinds.values()));
|
|
89
|
+
}
|
|
90
|
+
updateConfigurationSchema() {
|
|
91
|
+
pasteEnumValues.length = 0;
|
|
92
|
+
for (const codeActionKind of this._allProvidedPasteKinds) {
|
|
93
|
+
pasteEnumValues.push(codeActionKind.value);
|
|
94
|
+
}
|
|
95
|
+
dropEnumValues.length = 0;
|
|
96
|
+
for (const codeActionKind of this._allProvidedDropKinds) {
|
|
97
|
+
dropEnumValues.push(codeActionKind.value);
|
|
98
|
+
}
|
|
99
|
+
( Registry.as(Extensions.Configuration))
|
|
100
|
+
.notifyConfigurationSchemaUpdated(editorConfiguration);
|
|
101
|
+
}
|
|
102
|
+
getKeybindingSchemaAdditions() {
|
|
103
|
+
return [
|
|
104
|
+
{
|
|
105
|
+
if: {
|
|
106
|
+
required: ['command'],
|
|
107
|
+
properties: {
|
|
108
|
+
'command': { const: pasteAsCommandId }
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
then: {
|
|
112
|
+
properties: {
|
|
113
|
+
'args': {
|
|
114
|
+
oneOf: [
|
|
115
|
+
{
|
|
116
|
+
required: ['kind'],
|
|
117
|
+
properties: {
|
|
118
|
+
'kind': {
|
|
119
|
+
anyOf: [
|
|
120
|
+
{ enum: Array.from(( this._allProvidedPasteKinds.map(x => x.value))) },
|
|
121
|
+
{ type: 'string' },
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
required: ['preferences'],
|
|
128
|
+
properties: {
|
|
129
|
+
'preferences': {
|
|
130
|
+
type: 'array',
|
|
131
|
+
items: {
|
|
132
|
+
anyOf: [
|
|
133
|
+
{ enum: Array.from(( this._allProvidedPasteKinds.map(x => x.value))) },
|
|
134
|
+
{ type: 'string' },
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
];
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
DropOrPasteSchemaContribution = ( __decorate([
|
|
149
|
+
( __param(0, IKeybindingService)),
|
|
150
|
+
( __param(1, ILanguageFeaturesService))
|
|
151
|
+
], DropOrPasteSchemaContribution));
|
|
152
|
+
|
|
153
|
+
export { DropOrPasteSchemaContribution, editorConfiguration };
|
package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/vscode/src/vs/workbench/contrib/dropOrPasteInto/browser/dropOrPasteInto.contribution.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { Extensions } from '../../../../platform/configuration/common/configurationRegistry.js';
|
|
3
|
+
import { Registry } from '../../../../platform/registry/common/platform.js';
|
|
4
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from '../../../common/contributions.js';
|
|
5
|
+
import { DropOrPasteIntoCommands } from './commands.js';
|
|
6
|
+
import { DropOrPasteSchemaContribution, editorConfiguration } from './configurationSchema.js';
|
|
7
|
+
|
|
8
|
+
registerWorkbenchContribution2(DropOrPasteIntoCommands.ID, DropOrPasteIntoCommands, WorkbenchPhase.Eventually);
|
|
9
|
+
registerWorkbenchContribution2(DropOrPasteSchemaContribution.ID, DropOrPasteSchemaContribution, WorkbenchPhase.Eventually);
|
|
10
|
+
( Registry.as(Extensions.Configuration))
|
|
11
|
+
.registerConfiguration(editorConfiguration);
|
|
@@ -9,7 +9,7 @@ import { ExtensionGalleryManifestStatus } from '../../../../platform/extensionMa
|
|
|
9
9
|
import { IExtensionsWorkbenchService } from './extensions.service.js';
|
|
10
10
|
|
|
11
11
|
const VIEWLET_ID = 'workbench.view.extensions';
|
|
12
|
-
const EXTENSIONS_CATEGORY = ( localize2(
|
|
12
|
+
const EXTENSIONS_CATEGORY = ( localize2(7362, "Extensions"));
|
|
13
13
|
var ExtensionState;
|
|
14
14
|
(function (ExtensionState) {
|
|
15
15
|
ExtensionState[ExtensionState["Installing"] = 0] = "Installing";
|
|
@@ -15,12 +15,12 @@ const SearchExtensionsToolData = {
|
|
|
15
15
|
toolReferenceName: 'extensions',
|
|
16
16
|
canBeReferencedInPrompt: true,
|
|
17
17
|
icon: ThemeIcon.fromId(Codicon.extensions.id),
|
|
18
|
-
displayName: ( localize(
|
|
18
|
+
displayName: ( localize(7375, 'Search Extensions')),
|
|
19
19
|
modelDescription: ( localize(
|
|
20
|
-
|
|
20
|
+
7376,
|
|
21
21
|
"This is a tool for browsing Visual Studio Code Extensions Marketplace. It allows the model to search for extensions and retrieve detailed information about them. The model should use this tool whenever it needs to discover extensions or resolve information about known ones. To use the tool, the model has to provide the category of the extensions, relevant search keywords, or known extension IDs. Note that search results may include false positives, so reviewing and filtering is recommended."
|
|
22
22
|
)),
|
|
23
|
-
userDescription: ( localize(
|
|
23
|
+
userDescription: ( localize(7377, 'Search for VS Code extensions')),
|
|
24
24
|
source: ToolDataSource.Internal,
|
|
25
25
|
inputSchema: {
|
|
26
26
|
type: 'object',
|
|
@@ -57,7 +57,7 @@ let SearchExtensionsTool = class SearchExtensionsTool {
|
|
|
57
57
|
return {
|
|
58
58
|
content: [{
|
|
59
59
|
kind: 'text',
|
|
60
|
-
value: ( localize(
|
|
60
|
+
value: ( localize(7378, 'Please provide a category or keywords or ids to search for.'))
|
|
61
61
|
}]
|
|
62
62
|
};
|
|
63
63
|
}
|
|
@@ -13,13 +13,13 @@ const COMPARE_WITH_SAVED_COMMAND_ID = 'workbench.files.action.compareWithSaved';
|
|
|
13
13
|
const COPY_PATH_COMMAND_ID = 'copyFilePath';
|
|
14
14
|
const COPY_RELATIVE_PATH_COMMAND_ID = 'copyRelativeFilePath';
|
|
15
15
|
const SAVE_FILE_AS_COMMAND_ID = 'workbench.action.files.saveAs';
|
|
16
|
-
const SAVE_FILE_AS_LABEL = ( localize2(
|
|
16
|
+
const SAVE_FILE_AS_LABEL = ( localize2(7569, "Save As..."));
|
|
17
17
|
const SAVE_FILE_COMMAND_ID = 'workbench.action.files.save';
|
|
18
|
-
const SAVE_FILE_LABEL = ( localize2(
|
|
18
|
+
const SAVE_FILE_LABEL = ( localize2(7570, "Save"));
|
|
19
19
|
const SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID = 'workbench.action.files.saveWithoutFormatting';
|
|
20
|
-
const SAVE_FILE_WITHOUT_FORMATTING_LABEL = ( localize2(
|
|
20
|
+
const SAVE_FILE_WITHOUT_FORMATTING_LABEL = ( localize2(7571, "Save without Formatting"));
|
|
21
21
|
const SAVE_ALL_COMMAND_ID = 'saveAll';
|
|
22
|
-
const SAVE_ALL_LABEL = ( localize2(
|
|
22
|
+
const SAVE_ALL_LABEL = ( localize2(7572, "Save All"));
|
|
23
23
|
const SAVE_ALL_IN_GROUP_COMMAND_ID = 'workbench.files.action.saveAllInGroup';
|
|
24
24
|
const SAVE_FILES_COMMAND_ID = 'workbench.action.files.saveFiles';
|
|
25
25
|
const OpenEditorsGroupContext = ( new RawContextKey('groupFocusedInOpenEditors', false));
|
|
@@ -28,13 +28,13 @@ const OpenEditorsReadonlyEditorContext = ( new RawContextKey('readonlyEditorFocu
|
|
|
28
28
|
const OpenEditorsSelectedFileOrUntitledContext = ( new RawContextKey('openEditorsSelectedFileOrUntitled', true));
|
|
29
29
|
const ResourceSelectedForCompareContext = ( new RawContextKey('resourceSelectedForCompare', false));
|
|
30
30
|
const REMOVE_ROOT_FOLDER_COMMAND_ID = 'removeRootFolder';
|
|
31
|
-
const REMOVE_ROOT_FOLDER_LABEL = ( localize(
|
|
31
|
+
const REMOVE_ROOT_FOLDER_LABEL = ( localize(7573, "Remove Folder from Workspace"));
|
|
32
32
|
const PREVIOUS_COMPRESSED_FOLDER = 'previousCompressedFolder';
|
|
33
33
|
const NEXT_COMPRESSED_FOLDER = 'nextCompressedFolder';
|
|
34
34
|
const FIRST_COMPRESSED_FOLDER = 'firstCompressedFolder';
|
|
35
35
|
const LAST_COMPRESSED_FOLDER = 'lastCompressedFolder';
|
|
36
36
|
const NEW_UNTITLED_FILE_COMMAND_ID = 'workbench.action.files.newUntitledFile';
|
|
37
|
-
const NEW_UNTITLED_FILE_LABEL = ( localize2(
|
|
37
|
+
const NEW_UNTITLED_FILE_LABEL = ( localize2(7574, "New Untitled Text File"));
|
|
38
38
|
const NEW_FILE_COMMAND_ID = 'workbench.action.files.newFile';
|
|
39
39
|
|
|
40
40
|
export { COMPARE_RESOURCE_COMMAND_ID, COMPARE_SELECTED_COMMAND_ID, COMPARE_WITH_SAVED_COMMAND_ID, COPY_PATH_COMMAND_ID, COPY_RELATIVE_PATH_COMMAND_ID, FIRST_COMPRESSED_FOLDER, LAST_COMPRESSED_FOLDER, NEW_FILE_COMMAND_ID, NEW_UNTITLED_FILE_COMMAND_ID, NEW_UNTITLED_FILE_LABEL, NEXT_COMPRESSED_FOLDER, OPEN_TO_SIDE_COMMAND_ID, OPEN_WITH_EXPLORER_COMMAND_ID, OpenEditorsDirtyEditorContext, OpenEditorsGroupContext, OpenEditorsReadonlyEditorContext, OpenEditorsSelectedFileOrUntitledContext, PREVIOUS_COMPRESSED_FOLDER, REMOVE_ROOT_FOLDER_COMMAND_ID, REMOVE_ROOT_FOLDER_LABEL, REVEAL_IN_EXPLORER_COMMAND_ID, REVERT_FILE_COMMAND_ID, ResourceSelectedForCompareContext, SAVE_ALL_COMMAND_ID, SAVE_ALL_IN_GROUP_COMMAND_ID, SAVE_ALL_LABEL, SAVE_FILES_COMMAND_ID, SAVE_FILE_AS_COMMAND_ID, SAVE_FILE_AS_LABEL, SAVE_FILE_COMMAND_ID, SAVE_FILE_LABEL, SAVE_FILE_WITHOUT_FORMATTING_COMMAND_ID, SAVE_FILE_WITHOUT_FORMATTING_LABEL, SELECT_FOR_COMPARE_COMMAND_ID };
|
|
@@ -32,8 +32,8 @@ let DefaultFoldingRangeProvider = class DefaultFoldingRangeProvider extends Disp
|
|
|
32
32
|
DefaultFoldingRangeProvider_1.extensionItemLabels.length = 0;
|
|
33
33
|
DefaultFoldingRangeProvider_1.extensionDescriptions.length = 0;
|
|
34
34
|
DefaultFoldingRangeProvider_1.extensionIds.push(null);
|
|
35
|
-
DefaultFoldingRangeProvider_1.extensionItemLabels.push(( localize(
|
|
36
|
-
DefaultFoldingRangeProvider_1.extensionDescriptions.push(( localize(
|
|
35
|
+
DefaultFoldingRangeProvider_1.extensionItemLabels.push(( localize(7773, 'All')));
|
|
36
|
+
DefaultFoldingRangeProvider_1.extensionDescriptions.push(( localize(7774, "All active folding range providers")));
|
|
37
37
|
const languageExtensions = [];
|
|
38
38
|
const otherExtensions = [];
|
|
39
39
|
for (const extension of this._extensionService.extensions) {
|
|
@@ -75,7 +75,7 @@ DefaultFoldingRangeProvider = DefaultFoldingRangeProvider_1 = ( __decorate([
|
|
|
75
75
|
properties: {
|
|
76
76
|
[DefaultFoldingRangeProvider.configName]: {
|
|
77
77
|
description: ( localize(
|
|
78
|
-
|
|
78
|
+
7775,
|
|
79
79
|
"Defines a default folding range provider that takes precedence over all other folding range providers. Must be the identifier of an extension contributing a folding range provider."
|
|
80
80
|
)),
|
|
81
81
|
type: ['string', 'null'],
|