@codingame/monaco-vscode-api 1.83.15-next.0 → 1.83.16
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/README.md +430 -0
- package/contributions.js +3 -0
- package/localExtensionHost.js +3 -2
- package/missing-services.js +57 -1
- package/monaco-editor-treemending.patch +3375 -3375
- package/package.json +6 -6
- package/vscode/src/vs/base/common/prefixTree.js +130 -0
- package/vscode/src/vs/platform/actions/browser/floatingMenu.js +26 -2
- package/vscode/src/vs/platform/terminal/common/capabilities/bufferMarkCapability.js +41 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetectionCapability.js +566 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/cwdDetectionCapability.js +29 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/partialCommandDetectionCapability.js +48 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/terminalCapabilityStore.js +94 -0
- package/vscode/src/vs/platform/terminal/common/terminalEnvironment.js +37 -0
- package/vscode/src/vs/platform/terminal/common/terminalStrings.js +16 -0
- package/vscode/src/vs/platform/terminal/common/xterm/shellIntegrationAddon.js +319 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.js +91 -1
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +423 -0
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsNone.js +82 -0
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +564 -11
- package/vscode/src/vs/workbench/contrib/scm/common/scm.js +9 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/detachedTerminal.js +67 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalExtensions.js +25 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcons.js +64 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/widgets/widgetManager.js +36 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +538 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +104 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +416 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +390 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +799 -0
- package/vscode/src/vs/workbench/contrib/testing/common/getComputedState.js +101 -0
- package/vscode/src/vs/workbench/contrib/testing/common/observableValue.js +30 -0
- package/vscode/src/vs/workbench/contrib/testing/common/storedValue.js +36 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testExplorerFilterState.js +116 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +172 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +384 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResultService.js +156 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +156 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testService.js +75 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +9 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testingContextKeys.js +179 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingContinuousRunService.js +102 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingDecorations.js +29 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingPeekOpener.js +3 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testingStates.js +47 -0
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +594 -2
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +307 -1
- package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +4 -0
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +10 -0
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +98 -0
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +428 -0
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +83 -0
- package/vscode/src/vs/workbench/services/textfile/common/textfiles.js +6 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Delayer } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
3
|
+
import { onUnexpectedError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
4
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
|
+
import { MicrotaskDelay } from 'monaco-editor/esm/vs/base/common/symbols.js';
|
|
6
|
+
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
7
|
+
import { TerminalCapabilityStore } from '../../../../platform/terminal/common/capabilities/terminalCapabilityStore.js';
|
|
8
|
+
import { TerminalExtensionsRegistry } from './terminalExtensions.js';
|
|
9
|
+
import { TerminalWidgetManager } from './widgets/widgetManager.js';
|
|
10
|
+
let DeatachedTerminal = class DeatachedTerminal extends Disposable {
|
|
11
|
+
get xterm() {
|
|
12
|
+
return this._xterm;
|
|
13
|
+
}
|
|
14
|
+
constructor(_xterm, options, instantiationService) {
|
|
15
|
+
super();
|
|
16
|
+
this._xterm = _xterm;
|
|
17
|
+
this._widgets = this._register(( new TerminalWidgetManager()));
|
|
18
|
+
this.capabilities = ( new TerminalCapabilityStore());
|
|
19
|
+
this._contributions = ( new Map());
|
|
20
|
+
this._register(_xterm);
|
|
21
|
+
const contributionDescs = TerminalExtensionsRegistry.getTerminalContributions();
|
|
22
|
+
for (const desc of contributionDescs) {
|
|
23
|
+
if (( this._contributions.has(desc.id))) {
|
|
24
|
+
onUnexpectedError(( new Error(`Cannot have two terminal contributions with the same id ${desc.id}`)));
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (desc.canRunInDetachedTerminals === false) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
let contribution;
|
|
31
|
+
try {
|
|
32
|
+
contribution = instantiationService.createInstance(desc.ctor, this, options.processInfo, this._widgets);
|
|
33
|
+
this._contributions.set(desc.id, contribution);
|
|
34
|
+
this._register(contribution);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
onUnexpectedError(err);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
this._register(( new Delayer(MicrotaskDelay))).trigger(() => {
|
|
41
|
+
for (const contr of ( this._contributions.values())) {
|
|
42
|
+
contr.xtermReady?.(this._xterm);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
attachToElement(container, options) {
|
|
47
|
+
const screenElement = this._xterm.attachToElement(container, options);
|
|
48
|
+
this._widgets.attachToElement(screenElement);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
DeatachedTerminal = ( __decorate([
|
|
52
|
+
( __param(2, IInstantiationService))
|
|
53
|
+
], DeatachedTerminal));
|
|
54
|
+
class DetachedProcessInfo {
|
|
55
|
+
constructor(initialValues) {
|
|
56
|
+
this.processState = 3 ;
|
|
57
|
+
this.ptyProcessReady = Promise.resolve();
|
|
58
|
+
this.initialCwd = '';
|
|
59
|
+
this.shouldPersist = false;
|
|
60
|
+
this.hasWrittenData = false;
|
|
61
|
+
this.hasChildProcesses = false;
|
|
62
|
+
this.capabilities = ( new TerminalCapabilityStore());
|
|
63
|
+
this.shellIntegrationNonce = '';
|
|
64
|
+
Object.assign(this, initialValues);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export { DeatachedTerminal, DetachedProcessInfo };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
2
|
+
function registerTerminalContribution(id, ctor, canRunInDetachedTerminals = false) {
|
|
3
|
+
TerminalContributionRegistry.INSTANCE.registerTerminalContribution({ id, ctor, canRunInDetachedTerminals });
|
|
4
|
+
}
|
|
5
|
+
var TerminalExtensionsRegistry;
|
|
6
|
+
( (function(TerminalExtensionsRegistry) {
|
|
7
|
+
function getTerminalContributions() {
|
|
8
|
+
return TerminalContributionRegistry.INSTANCE.getTerminalContributions();
|
|
9
|
+
}
|
|
10
|
+
TerminalExtensionsRegistry.getTerminalContributions = getTerminalContributions;
|
|
11
|
+
})(TerminalExtensionsRegistry || (TerminalExtensionsRegistry = {})));
|
|
12
|
+
class TerminalContributionRegistry {
|
|
13
|
+
static { this.INSTANCE = ( new TerminalContributionRegistry()); }
|
|
14
|
+
constructor() {
|
|
15
|
+
this._terminalContributions = [];
|
|
16
|
+
}
|
|
17
|
+
registerTerminalContribution(description) {
|
|
18
|
+
this._terminalContributions.push(description);
|
|
19
|
+
}
|
|
20
|
+
getTerminalContributions() {
|
|
21
|
+
return this._terminalContributions.slice(0);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
Registry.add("terminal.contributions" , TerminalContributionRegistry.INSTANCE);
|
|
25
|
+
export { TerminalExtensionsRegistry, registerTerminalContribution };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
4
|
+
const terminalViewIcon = registerIcon('terminal-view-icon', Codicon.terminal, ( localizeWithPath(
|
|
5
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
6
|
+
'terminalViewIcon',
|
|
7
|
+
'View icon of the terminal view.'
|
|
8
|
+
)));
|
|
9
|
+
const renameTerminalIcon = registerIcon('terminal-rename', Codicon.gear, ( localizeWithPath(
|
|
10
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
11
|
+
'renameTerminalIcon',
|
|
12
|
+
'Icon for rename in the terminal quick menu.'
|
|
13
|
+
)));
|
|
14
|
+
const killTerminalIcon = registerIcon('terminal-kill', Codicon.trash, ( localizeWithPath(
|
|
15
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
16
|
+
'killTerminalIcon',
|
|
17
|
+
'Icon for killing a terminal instance.'
|
|
18
|
+
)));
|
|
19
|
+
const newTerminalIcon = registerIcon('terminal-new', Codicon.add, ( localizeWithPath(
|
|
20
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
21
|
+
'newTerminalIcon',
|
|
22
|
+
'Icon for creating a new terminal instance.'
|
|
23
|
+
)));
|
|
24
|
+
const configureTerminalProfileIcon = registerIcon('terminal-configure-profile', Codicon.gear, ( localizeWithPath(
|
|
25
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
26
|
+
'configureTerminalProfileIcon',
|
|
27
|
+
'Icon for creating a new terminal profile.'
|
|
28
|
+
)));
|
|
29
|
+
const terminalDecorationMark = registerIcon('terminal-decoration-mark', Codicon.circleSmallFilled, ( localizeWithPath(
|
|
30
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
31
|
+
'terminalDecorationMark',
|
|
32
|
+
'Icon for a terminal decoration mark.'
|
|
33
|
+
)));
|
|
34
|
+
const terminalDecorationIncomplete = registerIcon('terminal-decoration-incomplete', Codicon.circle, ( localizeWithPath(
|
|
35
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
36
|
+
'terminalDecorationIncomplete',
|
|
37
|
+
'Icon for a terminal decoration of a command that was incomplete.'
|
|
38
|
+
)));
|
|
39
|
+
const terminalDecorationError = registerIcon('terminal-decoration-error', Codicon.errorSmall, ( localizeWithPath(
|
|
40
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
41
|
+
'terminalDecorationError',
|
|
42
|
+
'Icon for a terminal decoration of a command that errored.'
|
|
43
|
+
)));
|
|
44
|
+
const terminalDecorationSuccess = registerIcon('terminal-decoration-success', Codicon.circleFilled, ( localizeWithPath(
|
|
45
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
46
|
+
'terminalDecorationSuccess',
|
|
47
|
+
'Icon for a terminal decoration of a command that was successful.'
|
|
48
|
+
)));
|
|
49
|
+
const commandHistoryRemoveIcon = registerIcon('terminal-command-history-remove', Codicon.close, ( localizeWithPath(
|
|
50
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
51
|
+
'terminalCommandHistoryRemove',
|
|
52
|
+
'Icon for removing a terminal command from command history.'
|
|
53
|
+
)));
|
|
54
|
+
const commandHistoryOutputIcon = registerIcon('terminal-command-history-output', Codicon.output, ( localizeWithPath(
|
|
55
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
56
|
+
'terminalCommandHistoryOutput',
|
|
57
|
+
'Icon for viewing output of a terminal command.'
|
|
58
|
+
)));
|
|
59
|
+
const commandHistoryFuzzySearchIcon = registerIcon('terminal-command-history-fuzzy-search', Codicon.searchFuzzy, ( localizeWithPath(
|
|
60
|
+
'vs/workbench/contrib/terminal/browser/terminalIcons',
|
|
61
|
+
'terminalCommandHistoryFuzzySearch',
|
|
62
|
+
'Icon for toggling fuzzy search of command history.'
|
|
63
|
+
)));
|
|
64
|
+
export { commandHistoryFuzzySearchIcon, commandHistoryOutputIcon, commandHistoryRemoveIcon, configureTerminalProfileIcon, killTerminalIcon, newTerminalIcon, renameTerminalIcon, terminalDecorationError, terminalDecorationIncomplete, terminalDecorationMark, terminalDecorationSuccess, terminalViewIcon };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class TerminalWidgetManager {
|
|
2
|
+
constructor() {
|
|
3
|
+
this._attached = ( new Map());
|
|
4
|
+
}
|
|
5
|
+
attachToElement(terminalWrapper) {
|
|
6
|
+
if (!this._container) {
|
|
7
|
+
this._container = document.createElement('div');
|
|
8
|
+
this._container.classList.add('terminal-widget-container');
|
|
9
|
+
terminalWrapper.appendChild(this._container);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
dispose() {
|
|
13
|
+
if (this._container && this._container.parentElement) {
|
|
14
|
+
this._container.parentElement.removeChild(this._container);
|
|
15
|
+
this._container = undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
attachWidget(widget) {
|
|
19
|
+
if (!this._container) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
this._attached.get(widget.id)?.dispose();
|
|
23
|
+
widget.attach(this._container);
|
|
24
|
+
this._attached.set(widget.id, widget);
|
|
25
|
+
return {
|
|
26
|
+
dispose: () => {
|
|
27
|
+
const current = this._attached.get(widget.id);
|
|
28
|
+
if (current === widget) {
|
|
29
|
+
this._attached.delete(widget.id);
|
|
30
|
+
widget.dispose();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export { TerminalWidgetManager };
|