@opensumi/ide-terminal-next 2.27.3-next-1707134083.0 → 2.27.3-next-1709176858.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 +2 -2
- package/lib/browser/component/tab.item.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.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 +4 -4
- package/src/browser/component/tab.view.tsx +1 -1
- 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 +1 -1
- 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,29 +1,29 @@
|
|
|
1
1
|
import { Autowired } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
|
-
URI,
|
|
4
|
-
Domain,
|
|
5
|
-
getIcon,
|
|
6
3
|
AppConfig,
|
|
7
|
-
CommandService,
|
|
8
4
|
COMMON_COMMANDS,
|
|
9
|
-
CommandRegistry,
|
|
10
|
-
PreferenceService,
|
|
11
5
|
CommandContribution,
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
CommandRegistry,
|
|
7
|
+
CommandService,
|
|
8
|
+
Domain,
|
|
14
9
|
IClipboardService,
|
|
15
|
-
|
|
10
|
+
ILogger,
|
|
11
|
+
IPreferenceSettingsService,
|
|
12
|
+
PreferenceService,
|
|
16
13
|
TERMINAL_COMMANDS,
|
|
14
|
+
TerminalSettingsId,
|
|
15
|
+
URI,
|
|
16
|
+
getIcon,
|
|
17
17
|
} from '@opensumi/ide-core-browser';
|
|
18
18
|
import { IMainLayoutService } from '@opensumi/ide-main-layout';
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
+
ITerminalApiService,
|
|
22
|
+
ITerminalClient,
|
|
21
23
|
ITerminalController,
|
|
22
|
-
ITerminalRestore,
|
|
23
24
|
ITerminalGroupViewService,
|
|
25
|
+
ITerminalRestore,
|
|
24
26
|
ITerminalSearchService,
|
|
25
|
-
ITerminalApiService,
|
|
26
|
-
ITerminalClient,
|
|
27
27
|
} from '../../common';
|
|
28
28
|
import { TerminalEnvironmentService } from '../terminal.environment.service';
|
|
29
29
|
import { TerminalKeyBoardInputService } from '../terminal.input';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Autowired } from '@opensumi/di';
|
|
2
|
-
import {
|
|
2
|
+
import { ClientAppContribution, Domain } from '@opensumi/ide-core-browser';
|
|
3
3
|
import { MainLayoutContribution } from '@opensumi/ide-main-layout';
|
|
4
4
|
|
|
5
5
|
import { ITerminalController, ITerminalRestore } from '../../common';
|
|
6
|
-
import {
|
|
6
|
+
import { EnvironmentVariableServiceToken, IEnvironmentVariableService } from '../../common/environmentVariable';
|
|
7
7
|
import { registerTerminalColors } from '../terminal.color';
|
|
8
8
|
import { TerminalKeyBoardInputService } from '../terminal.input';
|
|
9
9
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Autowired } from '@opensumi/di';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
PreferenceService,
|
|
3
|
+
AppConfig,
|
|
5
4
|
IPreferenceSettingsService,
|
|
5
|
+
PreferenceService,
|
|
6
|
+
TERMINAL_COMMANDS,
|
|
6
7
|
getSlotLocation,
|
|
7
|
-
AppConfig,
|
|
8
8
|
getTabbarCtxKey,
|
|
9
|
-
|
|
9
|
+
localize,
|
|
10
10
|
} from '@opensumi/ide-core-browser';
|
|
11
11
|
import { TERMINAL_CONTAINER_ID } from '@opensumi/ide-core-browser/lib/common/container-id';
|
|
12
12
|
import {
|
|
13
|
-
MenuContribution,
|
|
14
|
-
IMenuRegistry,
|
|
15
|
-
getTabbarCommonMenuId,
|
|
16
13
|
MenuId as CoreMenuId,
|
|
14
|
+
IMenuRegistry,
|
|
15
|
+
MenuContribution,
|
|
17
16
|
MenuId,
|
|
17
|
+
getTabbarCommonMenuId,
|
|
18
18
|
} from '@opensumi/ide-core-browser/lib/menu/next';
|
|
19
|
-
import {
|
|
19
|
+
import { CommandService, Domain, isWindows } from '@opensumi/ide-core-common';
|
|
20
20
|
|
|
21
21
|
import { ITerminalController, ITerminalGroupViewService, ITerminalSearchService } from '../../common';
|
|
22
22
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Autowired } from '@opensumi/di';
|
|
2
|
-
import {
|
|
2
|
+
import { ClientAppContribution, Domain } from '@opensumi/ide-core-browser';
|
|
3
3
|
import {
|
|
4
|
+
BrowserConnectionCloseEvent,
|
|
5
|
+
BrowserConnectionOpenEvent,
|
|
4
6
|
OnEvent,
|
|
5
7
|
WithEventBus,
|
|
6
|
-
BrowserConnectionOpenEvent,
|
|
7
|
-
BrowserConnectionCloseEvent,
|
|
8
8
|
} from '@opensumi/ide-core-common';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { ITerminalInternalService, ITerminalNetwork, TerminalNetworkStatus } from '../../common';
|
|
11
11
|
|
|
12
12
|
@Domain(ClientAppContribution)
|
|
13
13
|
export class TerminalNetworkContribution extends WithEventBus implements ClientAppContribution {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Domain,
|
|
3
|
-
localize,
|
|
4
|
-
ToolbarRegistry,
|
|
5
|
-
ComponentRegistry,
|
|
6
2
|
ComponentContribution,
|
|
7
|
-
|
|
3
|
+
ComponentRegistry,
|
|
4
|
+
Domain,
|
|
8
5
|
TERMINAL_COMMANDS,
|
|
6
|
+
TabBarToolbarContribution,
|
|
7
|
+
ToolbarRegistry,
|
|
8
|
+
localize,
|
|
9
9
|
} from '@opensumi/ide-core-browser';
|
|
10
10
|
import { TERMINAL_CONTAINER_ID } from '@opensumi/ide-core-browser/lib/common/container-id';
|
|
11
11
|
|
package/src/browser/index.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injectable, Provider } from '@opensumi/di';
|
|
2
2
|
import { BrowserModule } from '@opensumi/ide-core-browser';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
ITerminalController,
|
|
6
|
-
ITerminalService,
|
|
7
|
-
ITerminalRestore,
|
|
8
|
-
ITerminalTheme,
|
|
9
|
-
ITerminalServicePath,
|
|
10
|
-
ITerminalProcessPath,
|
|
11
5
|
ITerminalApiService,
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
ITerminalClientFactory2,
|
|
7
|
+
ITerminalController,
|
|
14
8
|
ITerminalErrorService,
|
|
9
|
+
ITerminalGroupViewService,
|
|
10
|
+
ITerminalHoverManagerService,
|
|
15
11
|
ITerminalInternalService,
|
|
16
|
-
ITerminalRenderProvider,
|
|
17
12
|
ITerminalNetwork,
|
|
18
|
-
|
|
19
|
-
ITerminalProfileService,
|
|
20
|
-
ITerminalClientFactory2,
|
|
13
|
+
ITerminalProcessPath,
|
|
21
14
|
ITerminalProfileInternalService,
|
|
15
|
+
ITerminalProfileService,
|
|
16
|
+
ITerminalRenderProvider,
|
|
17
|
+
ITerminalRestore,
|
|
18
|
+
ITerminalSearchService,
|
|
19
|
+
ITerminalService,
|
|
20
|
+
ITerminalServicePath,
|
|
21
|
+
ITerminalTheme,
|
|
22
22
|
} from '../common';
|
|
23
23
|
import { EnvironmentVariableServiceToken } from '../common/environmentVariable';
|
|
24
24
|
import { ITerminalPreference } from '../common/preference';
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
27
|
TerminalCommandContribution,
|
|
28
|
-
TerminalMenuContribution,
|
|
29
|
-
TerminalLifeCycleContribution,
|
|
30
|
-
TerminalRenderContribution,
|
|
31
28
|
TerminalKeybindingContribution,
|
|
29
|
+
TerminalLifeCycleContribution,
|
|
30
|
+
TerminalMenuContribution,
|
|
32
31
|
TerminalNetworkContribution,
|
|
33
32
|
TerminalPreferenceContribution,
|
|
33
|
+
TerminalRenderContribution,
|
|
34
34
|
} from './contribution';
|
|
35
35
|
import { TerminalApiService } from './terminal.api';
|
|
36
36
|
import { createTerminalClientFactory2 } from './terminal.client';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ILinkProvider, ILink } from 'xterm';
|
|
2
|
-
|
|
3
1
|
import { TerminalLink } from './link';
|
|
4
2
|
|
|
3
|
+
import type { ILink, ILinkProvider } from 'xterm';
|
|
4
|
+
|
|
5
5
|
export abstract class TerminalBaseLinkProvider implements ILinkProvider {
|
|
6
6
|
private _activeLinks: TerminalLink[] | undefined;
|
|
7
7
|
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
-
import {
|
|
4
|
+
import { ITerminalClient, ITerminalExternalLinkProvider } 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
|
import { XtermLinkMatcherHandler } from './link-manager';
|
|
12
10
|
|
|
11
|
+
import type { IBufferLine, IViewportRange, Terminal } from 'xterm';
|
|
12
|
+
|
|
13
13
|
/**
|
|
14
14
|
* An adapter to convert a simple external link provider into an internal link provider that
|
|
15
15
|
* manages link lifecycle, hovers, etc. and gets registered in xterm.js.
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
// Some code copied and modified from https://github.com/microsoft/vscode/blob/1.44.0/src/vs/workbench/contrib/terminal/browser/links/terminalLinkHelpers.ts
|
|
6
6
|
|
|
7
|
-
import type { IViewportRange, IBufferRange, IBufferLine, IBuffer, IBufferCellPosition } from 'xterm';
|
|
8
|
-
|
|
9
7
|
import { IRange } from '@opensumi/ide-core-common/lib/types';
|
|
10
8
|
|
|
9
|
+
import type { IBuffer, IBufferCellPosition, IBufferLine, IBufferRange, IViewportRange } from 'xterm';
|
|
10
|
+
|
|
11
11
|
export function convertLinkRangeToBuffer(lines: IBufferLine[], bufferWidth: number, range: IRange, startLine: number) {
|
|
12
12
|
const bufferRange: IBufferRange = {
|
|
13
13
|
start: {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ILinkProvider, IViewportRange, Terminal } from 'xterm';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Autowired, INJECTOR_TOKEN, Injectable, Injector } from '@opensumi/di';
|
|
4
4
|
import { IOpenerService, PreferenceService } from '@opensumi/ide-core-browser';
|
|
5
5
|
import {
|
|
6
|
-
URI,
|
|
7
6
|
Disposable,
|
|
8
|
-
IDisposable,
|
|
9
7
|
DisposableCollection,
|
|
10
|
-
isOSX,
|
|
11
8
|
FileUri,
|
|
12
|
-
|
|
13
|
-
path,
|
|
9
|
+
IDisposable,
|
|
14
10
|
OperatingSystem,
|
|
15
|
-
isWindows,
|
|
16
|
-
isMacintosh,
|
|
17
11
|
Schemes,
|
|
12
|
+
URI,
|
|
13
|
+
isMacintosh,
|
|
14
|
+
isOSX,
|
|
15
|
+
isWindows,
|
|
16
|
+
localize,
|
|
17
|
+
path,
|
|
18
18
|
} from '@opensumi/ide-core-common';
|
|
19
19
|
import { WorkbenchEditorService } from '@opensumi/ide-editor/lib/common';
|
|
20
20
|
import { IFileServiceClient } from '@opensumi/ide-file-service';
|
|
@@ -29,12 +29,12 @@ import { TerminalProtocolLinkProvider } from './protocol-link-provider';
|
|
|
29
29
|
import {
|
|
30
30
|
TerminalValidatedLocalLinkProvider,
|
|
31
31
|
lineAndColumnClause,
|
|
32
|
+
lineAndColumnClauseGroupCount,
|
|
33
|
+
unixLineAndColumnMatchIndex,
|
|
32
34
|
unixLocalLinkClause,
|
|
33
|
-
winLocalLinkClause,
|
|
34
35
|
winDrivePrefix,
|
|
35
36
|
winLineAndColumnMatchIndex,
|
|
36
|
-
|
|
37
|
-
lineAndColumnClauseGroupCount,
|
|
37
|
+
winLocalLinkClause,
|
|
38
38
|
} from './validated-local-link-provider';
|
|
39
39
|
|
|
40
40
|
const { posix, win32 } = path;
|
|
@@ -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,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
|