@opensumi/ide-terminal-next 2.27.3-rc-1708395495.0 → 2.27.3-rc-1710386185.0
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/lib/browser/component/tab.item.d.ts.map +1 -1
- package/lib/browser/component/tab.item.js +12 -7
- package/lib/browser/component/tab.item.js.map +1 -1
- package/lib/browser/component/tab.module.less +5 -5
- package/lib/browser/component/tab.view.d.ts.map +1 -1
- package/lib/browser/component/tab.view.js +2 -1
- package/lib/browser/component/tab.view.js.map +1 -1
- package/lib/browser/component/terminal.widget.d.ts +1 -1
- package/lib/browser/component/terminal.widget.d.ts.map +1 -1
- package/lib/browser/contribution/terminal.command.d.ts +2 -2
- package/lib/browser/contribution/terminal.command.d.ts.map +1 -1
- package/lib/browser/contribution/terminal.lifecycle.d.ts.map +1 -1
- package/lib/browser/contribution/terminal.menu.d.ts +2 -2
- package/lib/browser/contribution/terminal.menu.d.ts.map +1 -1
- package/lib/browser/contribution/terminal.network.d.ts +2 -2
- package/lib/browser/contribution/terminal.network.d.ts.map +1 -1
- package/lib/browser/contribution/terminal.view.d.ts +1 -1
- package/lib/browser/contribution/terminal.view.d.ts.map +1 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/links/base.d.ts +1 -1
- package/lib/browser/links/base.d.ts.map +1 -1
- package/lib/browser/links/external-link-provider-adapter.d.ts +2 -2
- package/lib/browser/links/external-link-provider-adapter.d.ts.map +1 -1
- package/lib/browser/links/external-link-provider-adapter.js.map +1 -1
- package/lib/browser/links/helpers.d.ts +1 -1
- package/lib/browser/links/helpers.d.ts.map +1 -1
- package/lib/browser/links/link-manager.d.ts +1 -1
- package/lib/browser/links/link-manager.d.ts.map +1 -1
- package/lib/browser/links/link.d.ts +1 -1
- package/lib/browser/links/link.d.ts.map +1 -1
- package/lib/browser/links/link.js.map +1 -1
- package/lib/browser/links/protocol-link-provider.d.ts +1 -1
- package/lib/browser/links/protocol-link-provider.d.ts.map +1 -1
- package/lib/browser/links/protocol-link-provider.js.map +1 -1
- package/lib/browser/links/validated-local-link-provider.d.ts +2 -2
- package/lib/browser/links/validated-local-link-provider.d.ts.map +1 -1
- package/lib/browser/links/validated-local-link-provider.js.map +1 -1
- package/lib/browser/terminal.addon.d.ts +1 -1
- package/lib/browser/terminal.addon.d.ts.map +1 -1
- package/lib/browser/terminal.addon.js +1 -1
- package/lib/browser/terminal.addon.js.map +1 -1
- package/lib/browser/terminal.api.d.ts +2 -2
- package/lib/browser/terminal.api.d.ts.map +1 -1
- package/lib/browser/terminal.api.js.map +1 -1
- package/lib/browser/terminal.client.d.ts +2 -2
- package/lib/browser/terminal.client.d.ts.map +1 -1
- package/lib/browser/terminal.color.d.ts +1 -1
- package/lib/browser/terminal.color.d.ts.map +1 -1
- package/lib/browser/terminal.context-key.d.ts +1 -1
- package/lib/browser/terminal.context-key.d.ts.map +1 -1
- package/lib/browser/terminal.context-menu.d.ts.map +1 -1
- package/lib/browser/terminal.controller.d.ts +2 -2
- package/lib/browser/terminal.controller.d.ts.map +1 -1
- package/lib/browser/terminal.environment.service.d.ts.map +1 -1
- package/lib/browser/terminal.error.d.ts +1 -1
- package/lib/browser/terminal.error.d.ts.map +1 -1
- package/lib/browser/terminal.ext.host.proxy.d.ts +1 -1
- package/lib/browser/terminal.ext.host.proxy.d.ts.map +1 -1
- package/lib/browser/terminal.internal.service.d.ts +1 -1
- package/lib/browser/terminal.internal.service.d.ts.map +1 -1
- package/lib/browser/terminal.network.d.ts +2 -2
- package/lib/browser/terminal.network.d.ts.map +1 -1
- package/lib/browser/terminal.preference.d.ts +1 -1
- package/lib/browser/terminal.preference.d.ts.map +1 -1
- package/lib/browser/terminal.profile.d.ts +2 -2
- package/lib/browser/terminal.profile.d.ts.map +1 -1
- package/lib/browser/terminal.profile.js +2 -3
- package/lib/browser/terminal.profile.js.map +1 -1
- package/lib/browser/terminal.restore.d.ts +2 -2
- package/lib/browser/terminal.restore.d.ts.map +1 -1
- package/lib/browser/terminal.search.d.ts +1 -1
- package/lib/browser/terminal.search.d.ts.map +1 -1
- package/lib/browser/terminal.service.d.ts +2 -2
- package/lib/browser/terminal.service.d.ts.map +1 -1
- package/lib/browser/terminal.theme.d.ts +1 -1
- package/lib/browser/terminal.theme.d.ts.map +1 -1
- package/lib/browser/terminal.theme.js.map +1 -1
- package/lib/browser/terminal.typeAhead.addon.d.ts +2 -2
- package/lib/browser/terminal.typeAhead.addon.d.ts.map +1 -1
- package/lib/browser/terminal.typeAhead.addon.js.map +1 -1
- package/lib/browser/terminal.view.d.ts +2 -2
- package/lib/browser/terminal.view.d.ts.map +1 -1
- package/lib/browser/xterm.d.ts.map +1 -1
- package/lib/browser/xterm.js.map +1 -1
- package/lib/common/api.d.ts +1 -1
- package/lib/common/api.d.ts.map +1 -1
- package/lib/common/client.d.ts +2 -2
- package/lib/common/client.d.ts.map +1 -1
- package/lib/common/controller.d.ts +6 -6
- package/lib/common/controller.d.ts.map +1 -1
- package/lib/common/controller.js.map +1 -1
- package/lib/common/environmentVariable.d.ts +1 -1
- package/lib/common/environmentVariable.d.ts.map +1 -1
- package/lib/common/environmentVariableCollection.d.ts +1 -1
- package/lib/common/environmentVariableCollection.d.ts.map +1 -1
- package/lib/common/extension.d.ts +1 -1
- package/lib/common/extension.d.ts.map +1 -1
- package/lib/common/link-computer.d.ts.map +1 -1
- package/lib/common/preference.d.ts.map +1 -1
- package/lib/common/preference.js.map +1 -1
- package/lib/common/profile.d.ts +2 -2
- package/lib/common/profile.d.ts.map +1 -1
- package/lib/common/pty.d.ts +2 -2
- package/lib/common/pty.d.ts.map +1 -1
- package/lib/common/pty.js.map +1 -1
- package/lib/common/resize.d.ts +1 -2
- package/lib/common/resize.d.ts.map +1 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/pty.d.ts +1 -1
- package/lib/node/pty.d.ts.map +1 -1
- package/lib/node/shell.d.ts.map +1 -1
- package/lib/node/terminal.profile.service.d.ts.map +1 -1
- package/lib/node/terminal.profile.service.js.map +1 -1
- package/lib/node/terminal.service.client.d.ts +1 -1
- package/lib/node/terminal.service.client.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/browser/component/tab.item.tsx +22 -10
- package/src/browser/component/tab.module.less +5 -5
- package/src/browser/component/tab.view.tsx +4 -3
- package/src/browser/component/terminal.view.tsx +4 -4
- package/src/browser/component/terminal.widget.tsx +4 -4
- package/src/browser/contribution/terminal.command.ts +12 -12
- package/src/browser/contribution/terminal.lifecycle.ts +2 -2
- package/src/browser/contribution/terminal.menu.ts +8 -8
- package/src/browser/contribution/terminal.network.ts +4 -4
- package/src/browser/contribution/terminal.view.ts +5 -5
- package/src/browser/index.ts +16 -16
- package/src/browser/links/base.ts +2 -2
- package/src/browser/links/external-link-provider-adapter.ts +5 -5
- package/src/browser/links/helpers.ts +2 -2
- package/src/browser/links/link-manager.ts +12 -12
- package/src/browser/links/link.ts +6 -6
- package/src/browser/links/protocol-link-provider.ts +4 -4
- package/src/browser/links/validated-local-link-provider.ts +6 -7
- package/src/browser/terminal.addon.ts +4 -2
- package/src/browser/terminal.api.ts +8 -7
- package/src/browser/terminal.client.ts +20 -20
- package/src/browser/terminal.color.ts +3 -3
- package/src/browser/terminal.context-key.ts +2 -2
- package/src/browser/terminal.context-menu.ts +4 -4
- package/src/browser/terminal.controller.ts +28 -28
- package/src/browser/terminal.environment.service.ts +3 -3
- package/src/browser/terminal.error.ts +6 -6
- package/src/browser/terminal.ext.host.proxy.ts +3 -3
- package/src/browser/terminal.internal.service.ts +8 -8
- package/src/browser/terminal.network.ts +5 -5
- package/src/browser/terminal.preference.ts +3 -3
- package/src/browser/terminal.profile.internal.ts +2 -2
- package/src/browser/terminal.profile.ts +11 -11
- package/src/browser/terminal.render.ts +1 -1
- package/src/browser/terminal.restore.ts +3 -3
- package/src/browser/terminal.search.ts +4 -4
- package/src/browser/terminal.service.ts +13 -13
- package/src/browser/terminal.theme.ts +8 -6
- package/src/browser/terminal.typeAhead.addon.ts +5 -5
- package/src/browser/terminal.view.ts +6 -6
- package/src/browser/xterm.ts +5 -4
- package/src/common/api.ts +1 -1
- package/src/common/client.ts +2 -2
- package/src/common/controller.ts +8 -6
- package/src/common/environmentVariable.ts +1 -1
- package/src/common/environmentVariableCollection.ts +3 -3
- package/src/common/extension.ts +2 -2
- package/src/common/link-computer.ts +1 -1
- package/src/common/preference.ts +1 -2
- package/src/common/profile.ts +3 -3
- package/src/common/pty.ts +3 -2
- package/src/common/resize.ts +1 -2
- package/src/node/index.ts +3 -3
- package/src/node/pty.manager.ts +1 -1
- package/src/node/pty.proxy.ts +1 -1
- package/src/node/pty.ts +3 -3
- package/src/node/shell.ts +2 -2
- package/src/node/terminal.profile.service.ts +5 -4
- package/src/node/terminal.service.client.ts +6 -6
- package/src/node/terminal.service.ts +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Injectable, Autowired } from '@opensumi/di';
|
|
4
|
-
import { addDisposableListener, PreferenceService } from '@opensumi/ide-core-browser';
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
+
import { PreferenceService, addDisposableListener } from '@opensumi/ide-core-browser';
|
|
5
3
|
import {
|
|
6
4
|
Disposable,
|
|
7
|
-
IDisposable,
|
|
8
5
|
DisposableCollection,
|
|
9
6
|
Emitter,
|
|
10
7
|
Event,
|
|
11
|
-
|
|
8
|
+
IDisposable,
|
|
12
9
|
RunOnceScheduler,
|
|
10
|
+
isOSX,
|
|
13
11
|
localize,
|
|
14
12
|
} from '@opensumi/ide-core-common';
|
|
15
13
|
|
|
16
14
|
import { convertBufferRangeToViewport } from './helpers';
|
|
17
15
|
|
|
16
|
+
import type { IBufferRange, ILink, ILinkDecorations, IViewportRange, Terminal } from 'xterm';
|
|
17
|
+
|
|
18
18
|
// default delay time (ms) for showing tooltip when mouse is over a link
|
|
19
19
|
const DEFAULT_HOVER_DELAY = 500;
|
|
20
20
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { Injectable, Autowired, INJECTOR_TOKEN, Injector } from '@opensumi/di';
|
|
1
|
+
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
4
2
|
import { IDisposable } from '@opensumi/ide-core-common';
|
|
5
3
|
|
|
6
4
|
import { ILinkComputerTarget, LinkComputer } from '../../common';
|
|
7
5
|
|
|
8
6
|
import { TerminalBaseLinkProvider } from './base';
|
|
9
|
-
import {
|
|
7
|
+
import { convertLinkRangeToBuffer, getXtermLineContent } from './helpers';
|
|
10
8
|
import { TerminalLink } from './link';
|
|
11
9
|
|
|
10
|
+
import type { IBufferLine, IViewportRange, Terminal } from 'xterm';
|
|
11
|
+
|
|
12
12
|
@Injectable({ multiple: true })
|
|
13
13
|
export class TerminalProtocolLinkProvider extends TerminalBaseLinkProvider {
|
|
14
14
|
private _linkComputerTarget: ILinkComputerTarget | undefined;
|
|
@@ -4,21 +4,20 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
// Some code copied and modified from https://github.com/microsoft/vscode/blob/1.63.2/src/vs/workbench/contrib/terminal/browser/links/terminalValidatedLocalLinkProvider.ts
|
|
6
6
|
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import { Injectable, Autowired, INJECTOR_TOKEN, Injector } from '@opensumi/di';
|
|
7
|
+
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
10
8
|
import { AppConfig } from '@opensumi/ide-core-browser/lib/react-providers/config-provider';
|
|
11
9
|
import { IWindowService } from '@opensumi/ide-core-browser/lib/window';
|
|
12
|
-
import { CommandService, IDisposable,
|
|
10
|
+
import { CommandService, IDisposable, OperatingSystem, URI } from '@opensumi/ide-core-common';
|
|
13
11
|
import { IWorkspaceService } from '@opensumi/ide-workspace/lib/common/workspace.interface';
|
|
14
12
|
|
|
15
|
-
import type { TerminalClient } from '../terminal.client';
|
|
16
|
-
|
|
17
13
|
import { TerminalBaseLinkProvider } from './base';
|
|
18
|
-
import {
|
|
14
|
+
import { convertLinkRangeToBuffer, getXtermLineContent } from './helpers';
|
|
19
15
|
import { FOLDER_IN_WORKSPACE_LABEL, FOLDER_NOT_IN_WORKSPACE_LABEL, OPEN_FILE_LABEL, TerminalLink } from './link';
|
|
20
16
|
import { XtermLinkMatcherHandler } from './link-manager';
|
|
21
17
|
|
|
18
|
+
import type { TerminalClient } from '../terminal.client';
|
|
19
|
+
import type { IBufferLine, IViewportRange, Terminal } from 'xterm';
|
|
20
|
+
|
|
22
21
|
const pathPrefix = '(\\.\\.?|\\~)';
|
|
23
22
|
const pathSeparatorClause = '\\/';
|
|
24
23
|
// '":; are allowed in paths but they are often separators so ignore them
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITerminalAddon, Terminal } from 'xterm';
|
|
2
2
|
|
|
3
3
|
import { Disposable, Emitter } from '@opensumi/ide-core-common';
|
|
4
4
|
|
|
@@ -45,7 +45,9 @@ export class AttachAddon extends Disposable implements ITerminalAddon {
|
|
|
45
45
|
|
|
46
46
|
this._onData.fire(dataToWrite);
|
|
47
47
|
|
|
48
|
-
this._terminal.write(
|
|
48
|
+
this._terminal.write(
|
|
49
|
+
typeof dataToWrite === 'string' ? dataToWrite : new Uint8Array(dataToWrite, 0, dataToWrite.byteLength),
|
|
50
|
+
);
|
|
49
51
|
|
|
50
52
|
// connection.onData 的时候对 lastInputTime 进行差值运算,统计最后一次输入到收到回复的时间间隔
|
|
51
53
|
if (this._lastInputTime) {
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import capitalize from 'lodash/capitalize';
|
|
2
|
-
import type vscode from 'vscode';
|
|
3
2
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
4
|
+
import { Emitter, Event } from '@opensumi/ide-core-common';
|
|
6
5
|
|
|
7
6
|
import {
|
|
8
7
|
ITerminalApiService,
|
|
9
|
-
ITerminalGroupViewService,
|
|
10
8
|
ITerminalController,
|
|
11
|
-
|
|
9
|
+
ITerminalExitEvent,
|
|
12
10
|
ITerminalExternalClient,
|
|
11
|
+
ITerminalGroupViewService,
|
|
12
|
+
ITerminalInfo,
|
|
13
13
|
ITerminalInternalService,
|
|
14
14
|
ITerminalNetwork,
|
|
15
|
-
ITerminalExitEvent,
|
|
16
|
-
ITerminalTitleChangeEvent,
|
|
17
15
|
ITerminalProfileInternalService,
|
|
16
|
+
ITerminalTitleChangeEvent,
|
|
18
17
|
} from '../common';
|
|
19
18
|
|
|
19
|
+
import type vscode from 'vscode';
|
|
20
|
+
|
|
20
21
|
@Injectable()
|
|
21
22
|
export class TerminalApiService implements ITerminalApiService {
|
|
22
23
|
private _onDidOpenTerminal = new Emitter<ITerminalInfo>();
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeObservable, observable } from 'mobx';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
4
|
+
import { IEventBus, QuickPickService, TerminalClientAttachEvent } from '@opensumi/ide-core-browser';
|
|
5
5
|
import { PreferenceService } from '@opensumi/ide-core-browser/lib/preferences/types';
|
|
6
6
|
import {
|
|
7
|
-
Disposable,
|
|
8
7
|
Deferred,
|
|
8
|
+
Disposable,
|
|
9
9
|
Emitter,
|
|
10
10
|
Event,
|
|
11
|
-
debounce,
|
|
12
|
-
ILogger,
|
|
13
|
-
IDisposable,
|
|
14
|
-
URI,
|
|
15
11
|
IApplicationService,
|
|
12
|
+
IDisposable,
|
|
13
|
+
ILogger,
|
|
16
14
|
IReporter,
|
|
17
|
-
REPORT_NAME,
|
|
18
15
|
OperatingSystem,
|
|
16
|
+
REPORT_NAME,
|
|
17
|
+
URI,
|
|
18
|
+
debounce,
|
|
19
19
|
} from '@opensumi/ide-core-common';
|
|
20
20
|
import { WorkbenchEditorService } from '@opensumi/ide-editor/lib/common';
|
|
21
21
|
import { IFileServiceClient } from '@opensumi/ide-file-service/lib/common';
|
|
@@ -24,24 +24,24 @@ import { IVariableResolverService } from '@opensumi/ide-variable/lib/common';
|
|
|
24
24
|
import { IWorkspaceService } from '@opensumi/ide-workspace/lib/common';
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
ICreateTerminalOptions,
|
|
28
|
+
IShellLaunchConfig,
|
|
29
29
|
ITerminalClient,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
ITerminalInternalService,
|
|
33
|
-
IWidget,
|
|
30
|
+
ITerminalConnection,
|
|
31
|
+
ITerminalController,
|
|
34
32
|
ITerminalDataEvent,
|
|
35
33
|
ITerminalExitEvent,
|
|
36
|
-
ITerminalTitleChangeEvent,
|
|
37
|
-
ITerminalConnection,
|
|
38
34
|
ITerminalExternalLinkProvider,
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
ITerminalGroupViewService,
|
|
36
|
+
ITerminalInternalService,
|
|
41
37
|
ITerminalProfileInternalService,
|
|
38
|
+
ITerminalTheme,
|
|
39
|
+
ITerminalTitleChangeEvent,
|
|
40
|
+
IWidget,
|
|
41
|
+
TerminalOptions,
|
|
42
42
|
} from '../common';
|
|
43
43
|
import { EnvironmentVariableServiceToken, IEnvironmentVariableService } from '../common/environmentVariable';
|
|
44
|
-
import {
|
|
44
|
+
import { CodeTerminalSettingId, ITerminalPreference, SupportedOptions } from '../common/preference';
|
|
45
45
|
|
|
46
46
|
import { TerminalLinkManager } from './links/link-manager';
|
|
47
47
|
import { AttachAddon, DEFAULT_COL, DEFAULT_ROW } from './terminal.addon';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { localize } from '@opensumi/ide-core-common';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
ColorDefaults,
|
|
4
|
+
ColorIdentifier,
|
|
4
5
|
PANEL_BACKGROUND,
|
|
5
6
|
PANEL_BORDER,
|
|
6
|
-
ColorIdentifier,
|
|
7
|
-
ColorDefaults,
|
|
8
7
|
editorFindMatch,
|
|
9
8
|
editorFindMatchHighlight,
|
|
10
9
|
overviewRulerFindMatchForeground,
|
|
10
|
+
registerColor,
|
|
11
11
|
transparent,
|
|
12
12
|
} from '@opensumi/ide-theme';
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Autowired, Injectable, Optional } from '@opensumi/di';
|
|
2
|
+
import { IContextKey, IContextKeyService } from '@opensumi/ide-core-browser';
|
|
3
3
|
import { IsTerminalFocused, IsTerminalViewInitialized } from '@opensumi/ide-core-browser/lib/contextkey';
|
|
4
4
|
|
|
5
5
|
@Injectable()
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
+
import { IContextKeyService, memoize } from '@opensumi/ide-core-browser';
|
|
3
3
|
import {
|
|
4
4
|
AbstractMenuService,
|
|
5
|
-
IMenu,
|
|
6
5
|
ICtxMenuRenderer,
|
|
7
|
-
|
|
6
|
+
IMenu,
|
|
8
7
|
MenuId,
|
|
8
|
+
generateMergedCtxMenu,
|
|
9
9
|
} from '@opensumi/ide-core-browser/lib/menu/next';
|
|
10
10
|
import { Disposable } from '@opensumi/ide-core-common';
|
|
11
11
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeObservable, observable } from 'mobx';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { ResizeEvent, getSlotLocation
|
|
3
|
+
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
4
|
+
import { AppConfig, ResizeEvent, getSlotLocation } from '@opensumi/ide-core-browser';
|
|
5
5
|
import { TERMINAL_CONTAINER_ID } from '@opensumi/ide-core-browser/lib/common/container-id';
|
|
6
6
|
import { ICtxMenuRenderer, IMenuRegistry, MenuId } from '@opensumi/ide-core-browser/lib/menu/next';
|
|
7
7
|
import { generateCtxMenu } from '@opensumi/ide-core-browser/lib/menu/next/menu-util';
|
|
8
8
|
import { AbstractMenuService } from '@opensumi/ide-core-browser/lib/menu/next/menu.interface';
|
|
9
9
|
import { PreferenceService } from '@opensumi/ide-core-browser/lib/preferences/types';
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
Emitter,
|
|
11
|
+
CommandRegistry,
|
|
13
12
|
Deferred,
|
|
13
|
+
DisposableCollection,
|
|
14
|
+
DisposableStore,
|
|
15
|
+
Emitter,
|
|
14
16
|
Event,
|
|
17
|
+
IApplicationService,
|
|
15
18
|
IDisposable,
|
|
16
|
-
DisposableStore,
|
|
17
19
|
ILogger,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
Uri,
|
|
21
|
+
WithEventBus,
|
|
22
|
+
isThemeColor,
|
|
20
23
|
replaceLocalizePlaceholder,
|
|
21
24
|
withNullAsUndefined,
|
|
22
|
-
isThemeColor,
|
|
23
|
-
Uri,
|
|
24
|
-
IApplicationService,
|
|
25
25
|
} from '@opensumi/ide-core-common';
|
|
26
26
|
import { WorkbenchEditorService } from '@opensumi/ide-editor';
|
|
27
27
|
import { IMainLayoutService } from '@opensumi/ide-main-layout';
|
|
@@ -29,32 +29,32 @@ import { TabBarHandler } from '@opensumi/ide-main-layout/lib/browser/tabbar-hand
|
|
|
29
29
|
import { IThemeService } from '@opensumi/ide-theme';
|
|
30
30
|
|
|
31
31
|
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
IWidget,
|
|
35
|
-
ITerminalInfo,
|
|
36
|
-
ITerminalBrowserHistory,
|
|
37
|
-
ITerminalTheme,
|
|
38
|
-
ITerminalGroupViewService,
|
|
32
|
+
ICreateClientWithWidgetOptions,
|
|
33
|
+
ICreateTerminalOptions,
|
|
39
34
|
IShellLaunchConfig,
|
|
35
|
+
IStartExtensionTerminalRequest,
|
|
36
|
+
ITerminalBrowserHistory,
|
|
37
|
+
ITerminalClient,
|
|
38
|
+
ITerminalClientFactory2,
|
|
39
|
+
ITerminalController,
|
|
40
40
|
ITerminalErrorService,
|
|
41
|
+
ITerminalExitEvent,
|
|
42
|
+
ITerminalExternalLinkProvider,
|
|
43
|
+
ITerminalGroupViewService,
|
|
44
|
+
ITerminalInfo,
|
|
41
45
|
ITerminalInternalService,
|
|
42
46
|
ITerminalLaunchError,
|
|
43
47
|
ITerminalProcessExtHostProxy,
|
|
44
|
-
|
|
45
|
-
ITerminalExitEvent,
|
|
46
|
-
ITerminalTitleChangeEvent,
|
|
47
|
-
ITerminalExternalLinkProvider,
|
|
48
|
-
ICreateTerminalOptions,
|
|
49
|
-
ITerminalClientFactory2,
|
|
50
|
-
ICreateClientWithWidgetOptions,
|
|
48
|
+
ITerminalProfile,
|
|
51
49
|
ITerminalProfileService,
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
ITerminalTheme,
|
|
51
|
+
ITerminalTitleChangeEvent,
|
|
52
|
+
IWidget,
|
|
54
53
|
TERMINAL_ID_SEPARATOR,
|
|
55
|
-
ITerminalProfile,
|
|
56
54
|
TerminalCliterFilter,
|
|
57
55
|
TerminalLocation,
|
|
56
|
+
TerminalOptions,
|
|
57
|
+
asTerminalIcon,
|
|
58
58
|
} from '../common';
|
|
59
59
|
import { CodeTerminalSettingId } from '../common/preference';
|
|
60
60
|
|
|
@@ -2,8 +2,8 @@ import debounce from 'lodash/debounce';
|
|
|
2
2
|
import throttle from 'lodash/throttle';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
6
|
+
import { StatusBarAlignment, StatusBarEntryAccessor, TERMINAL_COMMANDS, getIcon } from '@opensumi/ide-core-browser';
|
|
7
7
|
import {
|
|
8
8
|
CommandService,
|
|
9
9
|
Emitter,
|
|
@@ -19,12 +19,12 @@ import { IWorkspaceStorageService } from '@opensumi/ide-workspace/lib/common';
|
|
|
19
19
|
|
|
20
20
|
import { ITerminalProcessPath, ITerminalProcessService } from '../common';
|
|
21
21
|
import {
|
|
22
|
-
deserializeEnvironmentVariableCollection,
|
|
23
22
|
IEnvironmentVariableCollectionWithPersistence,
|
|
24
23
|
IEnvironmentVariableService,
|
|
25
24
|
IMergedEnvironmentVariableCollection,
|
|
26
25
|
IMergedEnvironmentVariableCollectionDiff,
|
|
27
26
|
ISerializableEnvironmentVariableCollection,
|
|
27
|
+
deserializeEnvironmentVariableCollection,
|
|
28
28
|
mutatorTypeLabel,
|
|
29
29
|
serializeEnvironmentVariableCollection,
|
|
30
30
|
} from '../common/environmentVariable';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeObservable, observable } from 'mobx';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
IPtyExitEvent,
|
|
7
|
+
ITerminalController,
|
|
7
8
|
ITerminalError,
|
|
8
|
-
|
|
9
|
+
ITerminalErrorService,
|
|
9
10
|
ITerminalGroupViewService,
|
|
10
|
-
|
|
11
|
-
IPtyExitEvent,
|
|
11
|
+
ITerminalService,
|
|
12
12
|
} from '../common';
|
|
13
13
|
|
|
14
14
|
@Injectable()
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Disposable, Emitter, Event } from '@opensumi/ide-core-common';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
ITerminalController,
|
|
5
4
|
ITerminalChildProcess,
|
|
6
|
-
|
|
5
|
+
ITerminalController,
|
|
6
|
+
ITerminalDimensions,
|
|
7
7
|
ITerminalDimensionsOverride,
|
|
8
8
|
ITerminalLaunchError,
|
|
9
|
-
|
|
9
|
+
ITerminalProcessExtHostProxy,
|
|
10
10
|
} from '../common';
|
|
11
11
|
|
|
12
12
|
export class TerminalProcessExtHostProxy
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import { OperatingSystem } from '@opensumi/ide-core-common';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
generateSessionId,
|
|
6
|
-
ITerminalService,
|
|
7
|
-
ITerminalInternalService,
|
|
8
|
-
ITerminalError,
|
|
9
5
|
IPtyExitEvent,
|
|
10
|
-
|
|
11
|
-
ITerminalProfile,
|
|
6
|
+
IPtyProcessChangeEvent,
|
|
12
7
|
IShellLaunchConfig,
|
|
13
8
|
ITerminalConnection,
|
|
14
|
-
|
|
9
|
+
ITerminalController,
|
|
10
|
+
ITerminalError,
|
|
11
|
+
ITerminalInternalService,
|
|
12
|
+
ITerminalProfile,
|
|
13
|
+
ITerminalService,
|
|
14
|
+
generateSessionId,
|
|
15
15
|
} from '../common';
|
|
16
16
|
import { IXTerm } from '../common/xterm';
|
|
17
17
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Emitter, Event
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
+
import { Disposable, Emitter, Event } from '@opensumi/ide-core-common';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
+
ITerminalController,
|
|
6
|
+
ITerminalError,
|
|
5
7
|
ITerminalErrorService,
|
|
6
|
-
ITerminalNetwork,
|
|
7
8
|
ITerminalInternalService,
|
|
8
|
-
|
|
9
|
+
ITerminalNetwork,
|
|
9
10
|
ITerminalReconnectInfo,
|
|
10
|
-
ITerminalError,
|
|
11
11
|
TerminalNetworkStatus,
|
|
12
12
|
} from '../common';
|
|
13
13
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import pickBy from 'lodash/pickBy';
|
|
2
2
|
import { ITerminalOptions } from 'xterm';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
5
5
|
import { PreferenceService } from '@opensumi/ide-core-browser';
|
|
6
6
|
import { Emitter, Event } from '@opensumi/ide-core-common';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
|
|
9
|
+
CodeTerminalSettingId,
|
|
10
10
|
IPreferenceValue,
|
|
11
|
+
ITerminalPreference,
|
|
11
12
|
SupportedOptions,
|
|
12
13
|
SupportedOptionsName,
|
|
13
|
-
CodeTerminalSettingId,
|
|
14
14
|
} from '../common/preference';
|
|
15
15
|
|
|
16
16
|
@Injectable()
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* 但我们要在这个 Service 上做一些封装,比如解析 terminal.type 等来制造一个假的 Profile
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
7
|
+
import { OperatingSystem, PreferenceService, TerminalSettingsId, path } from '@opensumi/ide-core-browser';
|
|
8
8
|
|
|
9
9
|
import {
|
|
10
10
|
IResolveDefaultProfileOptions,
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import { PreferenceService } from '@opensumi/ide-core-browser';
|
|
3
3
|
import {
|
|
4
|
+
AutoOpenBarrier,
|
|
4
5
|
Disposable,
|
|
5
6
|
Emitter,
|
|
6
|
-
WithEventBus,
|
|
7
|
-
IDisposable,
|
|
8
7
|
Event,
|
|
9
|
-
|
|
10
|
-
arrays,
|
|
11
|
-
AutoOpenBarrier,
|
|
12
|
-
PreferenceScope,
|
|
8
|
+
IDisposable,
|
|
13
9
|
ILogger,
|
|
10
|
+
PreferenceScope,
|
|
11
|
+
URI,
|
|
12
|
+
WithEventBus,
|
|
13
|
+
arrays,
|
|
14
|
+
throttle,
|
|
14
15
|
} from '@opensumi/ide-core-common';
|
|
15
|
-
import { URI } from '@opensumi/ide-core-common';
|
|
16
16
|
|
|
17
17
|
import {
|
|
18
|
+
ICreateContributedTerminalProfileOptions,
|
|
18
19
|
IExtensionTerminalProfile,
|
|
19
20
|
ISaveContributedProfileArgs,
|
|
20
21
|
IShellLaunchConfig,
|
|
22
|
+
ITerminalContributions,
|
|
21
23
|
ITerminalProfile,
|
|
24
|
+
ITerminalProfileContribution,
|
|
22
25
|
ITerminalProfileObject,
|
|
23
26
|
ITerminalProfileProvider,
|
|
24
27
|
ITerminalProfileService,
|
|
25
28
|
ITerminalService,
|
|
26
29
|
terminalProfileArgsMatch,
|
|
27
|
-
ICreateContributedTerminalProfileOptions,
|
|
28
|
-
ITerminalProfileContribution,
|
|
29
|
-
ITerminalContributions,
|
|
30
30
|
} from '../common';
|
|
31
31
|
import { CodeTerminalSettingPrefix } from '../common/preference';
|
|
32
32
|
|
|
@@ -2,7 +2,7 @@ import { Injectable } from '@opensumi/di';
|
|
|
2
2
|
|
|
3
3
|
import { ITerminalRenderProvider } from '../common';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { renderAddItem, renderInfoItem } from './component/tab.item';
|
|
6
6
|
|
|
7
7
|
@Injectable()
|
|
8
8
|
export class TerminalRenderProvider implements ITerminalRenderProvider {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
+
import { Disposable, ScopedBrowserStorageService } from '@opensumi/ide-core-browser';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { ITerminalBrowserHistory, ITerminalController, ITerminalInternalService, ITerminalRestore } from '../common';
|
|
5
5
|
|
|
6
6
|
const DEFAULT_TERMINAL_STORE_KEY = 'OPENSUMI_TERMINAL_RESTORE';
|
|
7
7
|
@Injectable()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { makeObservable, observable } from 'mobx';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
4
|
+
import { Emitter, Event, debounce } from '@opensumi/ide-core-common';
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { ITerminalClient, ITerminalController, ITerminalGroupViewService, ITerminalSearchService } from '../common';
|
|
7
7
|
|
|
8
8
|
@Injectable()
|
|
9
9
|
export class TerminalSearchService implements ITerminalSearchService {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { Emitter as Dispatcher } from 'event-kit';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Emitter,
|
|
3
|
+
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
4
|
+
import { OperatingSystem, PreferenceService } from '@opensumi/ide-core-browser';
|
|
5
|
+
import { Emitter, Event, IApplicationService, ILogger } from '@opensumi/ide-core-common';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
IDetectProfileOptionsPreference,
|
|
9
|
+
INodePtyInstance,
|
|
10
|
+
IPtyExitEvent,
|
|
11
|
+
IPtyProcessChangeEvent,
|
|
12
|
+
IShellLaunchConfig,
|
|
13
|
+
ITerminalConnection,
|
|
10
14
|
ITerminalError,
|
|
15
|
+
ITerminalProfile,
|
|
16
|
+
ITerminalService,
|
|
11
17
|
ITerminalServiceClient,
|
|
12
18
|
ITerminalServicePath,
|
|
13
|
-
ITerminalConnection,
|
|
14
|
-
IPtyExitEvent,
|
|
15
|
-
INodePtyInstance,
|
|
16
|
-
isTerminalError,
|
|
17
|
-
ITerminalProfile,
|
|
18
|
-
IShellLaunchConfig,
|
|
19
|
-
IDetectProfileOptionsPreference,
|
|
20
|
-
IPtyProcessChangeEvent,
|
|
21
19
|
TERMINAL_ID_SEPARATOR,
|
|
20
|
+
generateSessionId,
|
|
21
|
+
isTerminalError,
|
|
22
22
|
} from '../common';
|
|
23
23
|
import { CodeTerminalSettingPrefix } from '../common/preference';
|
|
24
24
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { ITheme } from 'xterm';
|
|
2
|
-
|
|
3
1
|
import { Injectable } from '@opensumi/di';
|
|
4
2
|
import { Themable } from '@opensumi/ide-theme/lib/browser/workbench.theme.service';
|
|
5
3
|
import { Color } from '@opensumi/ide-theme/lib/common/color';
|
|
@@ -8,6 +6,8 @@ import { ITerminalTheme } from '../common';
|
|
|
8
6
|
|
|
9
7
|
import * as TERMINAL_COLOR from './terminal.color';
|
|
10
8
|
|
|
9
|
+
import type { ITheme } from 'xterm';
|
|
10
|
+
|
|
11
11
|
@Injectable()
|
|
12
12
|
export class TerminalTheme extends Themable implements ITerminalTheme {
|
|
13
13
|
get terminalTheme(): ITheme {
|
|
@@ -16,9 +16,11 @@ export class TerminalTheme extends Themable implements ITerminalTheme {
|
|
|
16
16
|
const termSelectionColor = this.getColorSync(TERMINAL_COLOR.TERMINAL_SELECTION_BACKGROUND_COLOR);
|
|
17
17
|
const termCursorColor = this.getColorSync(TERMINAL_COLOR.TERMINAL_CURSOR_FOREGROUND_COLOR) || termFgColor;
|
|
18
18
|
const termCursorAccentColor = this.getColorSync(TERMINAL_COLOR.TERMINAL_CURSOR_BACKGROUND_COLOR) || termBgColor;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const selectionBackgroundColor = this.getColorSync(TERMINAL_COLOR.TERMINAL_SELECTION_BACKGROUND_COLOR);
|
|
20
|
+
const selectionInactiveBackgroundColor = this.getColorSync(
|
|
21
|
+
TERMINAL_COLOR.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR,
|
|
22
|
+
);
|
|
23
|
+
const selectionForegroundColor = this.getColorSync(TERMINAL_COLOR.TERMINAL_SELECTION_FOREGROUND_COLOR) || undefined;
|
|
22
24
|
|
|
23
25
|
const ansiColorIdentifiers = TERMINAL_COLOR.ansiColorIdentifiers;
|
|
24
26
|
|
|
@@ -34,7 +36,7 @@ export class TerminalTheme extends Themable implements ITerminalTheme {
|
|
|
34
36
|
cursorAccent: Color.Format.CSS.formatHexA(termCursorAccentColor),
|
|
35
37
|
selectionBackground: selectionBackgroundColor?.toString(),
|
|
36
38
|
selectionInactiveBackground: selectionInactiveBackgroundColor?.toString(),
|
|
37
|
-
|
|
39
|
+
selectionForeground: selectionForegroundColor?.toString(),
|
|
38
40
|
black: this.getColorSync(ansiColorIdentifiers[0])?.toString(),
|
|
39
41
|
red: this.getColorSync(ansiColorIdentifiers[1])?.toString(),
|
|
40
42
|
green: this.getColorSync(ansiColorIdentifiers[2])?.toString(),
|
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
8
8
|
*--------------------------------------------------------------------------------------------*/
|
|
9
9
|
|
|
10
|
-
import type { IBuffer, IBufferCell, IDisposable, ITerminalAddon, Terminal } from 'xterm';
|
|
11
|
-
|
|
12
10
|
import { PreferenceChange } from '@opensumi/ide-core-browser/lib/preferences';
|
|
13
11
|
import {
|
|
14
|
-
|
|
12
|
+
Disposable,
|
|
15
13
|
DisposableCollection,
|
|
16
14
|
Emitter,
|
|
17
15
|
Event,
|
|
16
|
+
debounce,
|
|
18
17
|
disposableTimeout,
|
|
19
|
-
Disposable,
|
|
20
18
|
} from '@opensumi/ide-core-common';
|
|
21
19
|
|
|
22
20
|
import { CodeTerminalSettingId } from '../common/preference';
|
|
23
21
|
|
|
24
22
|
import { Color, RGBA } from './terminal.typeAhead.ext';
|
|
25
|
-
import {
|
|
23
|
+
import { IXtermCore, XtermAttributes } from './xterm-private';
|
|
24
|
+
|
|
25
|
+
import type { IBuffer, IBufferCell, IDisposable, ITerminalAddon, Terminal } from 'xterm';
|
|
26
26
|
|
|
27
27
|
export const DEFAULT_LOCAL_ECHO_EXCLUDE: ReadonlyArray<string> = ['vim', 'vi', 'nano', 'tmux'];
|
|
28
28
|
|