@opensumi/ide-terminal-next 3.7.2-next-1740052080.0 → 3.7.2-next-1740054042.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/LICENSE +21 -0
- package/lib/browser/component/resize.delegate.d.ts +14 -0
- package/lib/browser/component/resize.delegate.d.ts.map +1 -0
- package/lib/browser/component/resize.delegate.js +46 -0
- package/lib/browser/component/resize.delegate.js.map +1 -0
- package/lib/browser/component/resize.module.less +77 -0
- package/lib/browser/component/resize.view.d.ts +16 -0
- package/lib/browser/component/resize.view.d.ts.map +1 -0
- package/lib/browser/component/resize.view.js +55 -0
- package/lib/browser/component/resize.view.js.map +1 -0
- package/lib/browser/component/search.module.less +61 -0
- package/lib/browser/component/search.view.d.ts +3 -0
- package/lib/browser/component/search.view.d.ts.map +1 -0
- package/lib/browser/component/search.view.js +89 -0
- package/lib/browser/component/search.view.js.map +1 -0
- package/lib/browser/component/tab.item.d.ts +7 -0
- package/lib/browser/component/tab.item.d.ts.map +1 -0
- package/lib/browser/component/tab.item.js +121 -0
- package/lib/browser/component/tab.item.js.map +1 -0
- package/lib/browser/component/tab.module.less +174 -0
- package/lib/browser/component/tab.view.d.ts +4 -0
- package/lib/browser/component/tab.view.d.ts.map +1 -0
- package/lib/browser/component/tab.view.js +65 -0
- package/lib/browser/component/tab.view.js.map +1 -0
- package/lib/browser/component/terminal.module.less +50 -0
- package/lib/browser/component/terminal.variable.d.ts +8 -0
- package/lib/browser/component/terminal.variable.d.ts.map +1 -0
- package/lib/browser/component/terminal.variable.js +44 -0
- package/lib/browser/component/terminal.variable.js.map +1 -0
- package/lib/browser/component/terminal.view.d.ts +5 -0
- package/lib/browser/component/terminal.view.d.ts.map +1 -0
- package/lib/browser/component/terminal.view.js +63 -0
- package/lib/browser/component/terminal.view.js.map +1 -0
- package/lib/browser/component/terminal.widget.d.ts +10 -0
- package/lib/browser/component/terminal.widget.d.ts.map +1 -0
- package/lib/browser/component/terminal.widget.js +65 -0
- package/lib/browser/component/terminal.widget.js.map +1 -0
- package/lib/browser/component/variable.module.less +15 -0
- package/lib/browser/contribution/index.d.ts.map +1 -0
- package/lib/browser/contribution/index.js +11 -0
- package/lib/browser/contribution/index.js.map +1 -0
- package/lib/browser/contribution/terminal.command.js +328 -0
- package/lib/browser/contribution/terminal.keybinding.js +87 -0
- package/lib/browser/contribution/terminal.lifecycle.js +52 -0
- package/lib/browser/contribution/terminal.menu.js +168 -0
- package/lib/browser/contribution/terminal.network.js +44 -0
- package/lib/browser/contribution/terminal.preference.js +43 -0
- package/lib/browser/contribution/terminal.view.js +57 -0
- package/lib/browser/index.js +124 -0
- package/lib/browser/links/base.d.ts +8 -0
- package/lib/browser/links/base.d.ts.map +1 -0
- package/lib/browser/links/base.js +13 -0
- package/lib/browser/links/base.js.map +1 -0
- package/lib/browser/links/external-link-provider-adapter.d.ts +21 -0
- package/lib/browser/links/external-link-provider-adapter.d.ts.map +1 -0
- package/lib/browser/links/external-link-provider-adapter.js +74 -0
- package/lib/browser/links/external-link-provider-adapter.js.map +1 -0
- package/lib/browser/links/helpers.d.ts +7 -0
- package/lib/browser/links/helpers.d.ts.map +1 -0
- package/lib/browser/links/helpers.js +128 -0
- package/lib/browser/links/helpers.js.map +1 -0
- package/lib/browser/links/link-manager.d.ts +92 -0
- package/lib/browser/links/link-manager.d.ts.map +1 -0
- package/lib/browser/links/link-manager.js +342 -0
- package/lib/browser/links/link-manager.js.map +1 -0
- package/lib/browser/links/link.d.ts +31 -0
- package/lib/browser/links/link.d.ts.map +1 -0
- package/lib/browser/links/link.js +136 -0
- package/lib/browser/links/link.js.map +1 -0
- package/lib/browser/links/protocol-link-provider.d.ts +14 -0
- package/lib/browser/links/protocol-link-provider.d.ts.map +1 -0
- package/lib/browser/links/protocol-link-provider.js +71 -0
- package/lib/browser/links/protocol-link-provider.js.map +1 -0
- package/lib/browser/links/validated-local-link-provider.d.ts +41 -0
- package/lib/browser/links/validated-local-link-provider.d.ts.map +1 -0
- package/lib/browser/links/validated-local-link-provider.js +235 -0
- package/lib/browser/links/validated-local-link-provider.js.map +1 -0
- package/lib/browser/links/word-link-provider.d.ts +29 -0
- package/lib/browser/links/word-link-provider.d.ts.map +1 -0
- package/lib/browser/links/word-link-provider.js +153 -0
- package/lib/browser/links/word-link-provider.js.map +1 -0
- package/lib/browser/terminal.addon.js +83 -0
- package/lib/browser/terminal.api.js +162 -0
- package/lib/browser/terminal.client.js +680 -0
- package/lib/browser/terminal.color.js +240 -0
- package/lib/browser/terminal.context-key.js +29 -0
- package/lib/browser/terminal.context-menu.js +96 -0
- package/lib/browser/terminal.controller.js +669 -0
- package/lib/browser/terminal.environment.service.js +153 -0
- package/lib/browser/terminal.error.js +61 -0
- package/lib/browser/terminal.ext.host.proxy.js +108 -0
- package/lib/browser/terminal.hover.manager.js +85 -0
- package/lib/browser/terminal.input.js +32 -0
- package/lib/browser/terminal.internal.service.js +107 -0
- package/lib/browser/terminal.network.js +150 -0
- package/lib/browser/terminal.preference.js +136 -0
- package/lib/browser/terminal.profile.internal.js +104 -0
- package/lib/browser/terminal.profile.js +211 -0
- package/lib/browser/terminal.render.js +25 -0
- package/lib/browser/terminal.restore.js +49 -0
- package/lib/browser/terminal.search.js +109 -0
- package/lib/browser/terminal.service.js +163 -0
- package/lib/common/api.d.ts +22 -0
- package/lib/common/api.d.ts.map +1 -0
- package/lib/common/api.js +5 -0
- package/lib/common/api.js.map +1 -0
- package/lib/common/client.d.ts +199 -0
- package/lib/common/client.d.ts.map +1 -0
- package/lib/common/client.js +6 -0
- package/lib/common/client.js.map +1 -0
- package/lib/common/controller.d.ts +149 -0
- package/lib/common/controller.d.ts.map +1 -0
- package/lib/common/controller.js +8 -0
- package/lib/common/controller.js.map +1 -0
- package/lib/common/environmentVariable.d.ts +116 -0
- package/lib/common/environmentVariable.d.ts.map +1 -0
- package/lib/common/environmentVariable.js +30 -0
- package/lib/common/environmentVariable.js.map +1 -0
- package/lib/common/environmentVariableCollection.d.ts +9 -0
- package/lib/common/environmentVariableCollection.d.ts.map +1 -0
- package/lib/common/environmentVariableCollection.js +140 -0
- package/lib/common/environmentVariableCollection.js.map +1 -0
- package/lib/common/error.d.ts +41 -0
- package/lib/common/error.d.ts.map +1 -0
- package/lib/common/error.js +13 -0
- package/lib/common/error.js.map +1 -0
- package/lib/common/extension.d.ts +139 -0
- package/lib/common/extension.d.ts.map +1 -0
- package/lib/common/extension.js +57 -0
- package/lib/common/extension.js.map +1 -0
- package/lib/common/index.d.ts +17 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +20 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/link-computer.d.ts +56 -0
- package/lib/common/link-computer.d.ts.map +1 -0
- package/lib/common/link-computer.js +282 -0
- package/lib/common/link-computer.js.map +1 -0
- package/lib/common/network.d.ts +48 -0
- package/lib/common/network.d.ts.map +1 -0
- package/lib/common/network.js +10 -0
- package/lib/common/network.js.map +1 -0
- package/lib/common/preference.d.ts +134 -0
- package/lib/common/preference.d.ts.map +1 -0
- package/lib/common/preference.js +199 -0
- package/lib/common/preference.js.map +1 -0
- package/lib/common/process.d.ts +8 -0
- package/lib/common/process.d.ts.map +1 -0
- package/lib/common/process.js +3 -0
- package/lib/common/process.js.map +1 -0
- package/lib/common/profile.d.ts +99 -0
- package/lib/common/profile.d.ts.map +1 -0
- package/lib/common/profile.js +27 -0
- package/lib/common/profile.js.map +1 -0
- package/lib/common/pty.d.ts +525 -0
- package/lib/common/pty.d.ts.map +1 -0
- package/lib/common/pty.js +28 -0
- package/lib/common/pty.js.map +1 -0
- package/lib/common/render.d.ts +29 -0
- package/lib/common/render.d.ts.map +1 -0
- package/lib/common/render.js +10 -0
- package/lib/common/render.js.map +1 -0
- package/lib/common/resize.d.ts +43 -0
- package/lib/common/resize.d.ts.map +1 -0
- package/lib/common/resize.js +3 -0
- package/lib/common/resize.js.map +1 -0
- package/lib/common/restore.d.ts +6 -0
- package/lib/common/restore.d.ts.map +1 -0
- package/lib/common/restore.js +5 -0
- package/lib/common/restore.js.map +1 -0
- package/lib/common/service.d.ts +96 -0
- package/lib/common/service.d.ts.map +1 -0
- package/lib/common/service.js +6 -0
- package/lib/common/service.js.map +1 -0
- package/lib/common/shell.d.ts +11 -0
- package/lib/common/shell.d.ts.map +1 -0
- package/lib/common/shell.js +14 -0
- package/lib/common/shell.js.map +1 -0
- package/lib/common/theme.d.ts +6 -0
- package/lib/common/theme.d.ts.map +1 -0
- package/lib/common/theme.js +5 -0
- package/lib/common/theme.js.map +1 -0
- package/lib/common/utils.d.ts +4 -0
- package/lib/common/utils.d.ts.map +1 -0
- package/lib/common/utils.js +15 -0
- package/lib/common/utils.js.map +1 -0
- package/lib/common/xterm.d.ts +27 -0
- package/lib/common/xterm.d.ts.map +1 -0
- package/lib/common/xterm.js +10 -0
- package/lib/common/xterm.js.map +1 -0
- package/lib/index.js +5 -0
- package/lib/node/data-store.d.ts +13 -0
- package/lib/node/data-store.d.ts.map +1 -0
- package/lib/node/data-store.js +6 -0
- package/lib/node/data-store.js.map +1 -0
- package/lib/node/index.d.ts +10 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +64 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/pty.d.ts +42 -0
- package/lib/node/pty.d.ts.map +1 -0
- package/lib/node/pty.js +277 -0
- package/lib/node/pty.js.map +1 -0
- package/lib/node/pty.manager.d.ts +52 -0
- package/lib/node/pty.manager.d.ts.map +1 -0
- package/lib/node/pty.manager.js +157 -0
- package/lib/node/pty.manager.js.map +1 -0
- package/lib/node/pty.manager.remote.d.ts +23 -0
- package/lib/node/pty.manager.remote.d.ts.map +1 -0
- package/lib/node/pty.manager.remote.js +124 -0
- package/lib/node/pty.manager.remote.js.map +1 -0
- package/lib/node/pty.proxy.d.ts +45 -0
- package/lib/node/pty.proxy.d.ts.map +1 -0
- package/lib/node/pty.proxy.js +277 -0
- package/lib/node/pty.proxy.js.map +1 -0
- package/lib/node/pty.proxy.remote.exec.d.ts +2 -0
- package/lib/node/pty.proxy.remote.exec.d.ts.map +1 -0
- package/lib/node/pty.proxy.remote.exec.js +7 -0
- package/lib/node/pty.proxy.remote.exec.js.map +1 -0
- package/lib/node/shell-integration.service.d.ts +24 -0
- package/lib/node/shell-integration.service.d.ts.map +1 -0
- package/lib/node/shell-integration.service.js +187 -0
- package/lib/node/shell-integration.service.js.map +1 -0
- package/lib/node/shell.d.ts +20 -0
- package/lib/node/shell.d.ts.map +1 -0
- package/lib/node/shell.js +199 -0
- package/lib/node/shell.js.map +1 -0
- package/lib/node/terminal.process.service.d.ts +5 -0
- package/lib/node/terminal.process.service.d.ts.map +1 -0
- package/lib/node/terminal.process.service.js +15 -0
- package/lib/node/terminal.process.service.js.map +1 -0
- package/lib/node/terminal.profile.service.d.ts +19 -0
- package/lib/node/terminal.profile.service.d.ts.map +1 -0
- package/lib/node/terminal.profile.service.js +228 -0
- package/lib/node/terminal.profile.service.js.map +1 -0
- package/lib/node/terminal.service.client.d.ts +51 -0
- package/lib/node/terminal.service.client.d.ts.map +1 -0
- package/lib/node/terminal.service.client.js +159 -0
- package/lib/node/terminal.service.client.js.map +1 -0
- package/lib/node/terminal.service.d.ts +30 -0
- package/lib/node/terminal.service.d.ts.map +1 -0
- package/lib/node/terminal.service.js +246 -0
- package/lib/node/terminal.service.js.map +1 -0
- package/package.json +18 -18
|
@@ -0,0 +1,669 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TerminalController = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const di_1 = require("@opensumi/di");
|
|
6
|
+
const ide_core_browser_1 = require("@opensumi/ide-core-browser");
|
|
7
|
+
const container_id_1 = require("@opensumi/ide-core-browser/lib/common/container-id");
|
|
8
|
+
const next_1 = require("@opensumi/ide-core-browser/lib/menu/next");
|
|
9
|
+
const menu_util_1 = require("@opensumi/ide-core-browser/lib/menu/next/menu-util");
|
|
10
|
+
const menu_interface_1 = require("@opensumi/ide-core-browser/lib/menu/next/menu.interface");
|
|
11
|
+
const types_1 = require("@opensumi/ide-core-browser/lib/preferences/types");
|
|
12
|
+
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
13
|
+
const ide_editor_1 = require("@opensumi/ide-editor");
|
|
14
|
+
const ide_main_layout_1 = require("@opensumi/ide-main-layout");
|
|
15
|
+
const ide_theme_1 = require("@opensumi/ide-theme");
|
|
16
|
+
const common_1 = require("../common");
|
|
17
|
+
const terminal_context_key_1 = require("./terminal.context-key");
|
|
18
|
+
const terminal_view_1 = require("./terminal.view");
|
|
19
|
+
let TerminalController = class TerminalController extends ide_core_common_1.WithEventBus {
|
|
20
|
+
get themeBackground() {
|
|
21
|
+
return this._themeBackground;
|
|
22
|
+
}
|
|
23
|
+
set themeBackground(value) {
|
|
24
|
+
if (value !== this._themeBackground) {
|
|
25
|
+
this._themeBackground = value;
|
|
26
|
+
this._onThemeBackgroundChangeEmitter.fire(value);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
get clients() {
|
|
30
|
+
return this._clients;
|
|
31
|
+
}
|
|
32
|
+
get focused() {
|
|
33
|
+
return this._focus;
|
|
34
|
+
}
|
|
35
|
+
get ready() {
|
|
36
|
+
return this._ready;
|
|
37
|
+
}
|
|
38
|
+
get activeClient() {
|
|
39
|
+
if (this._activeClientId) {
|
|
40
|
+
return this._clients.get(this._activeClientId);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
get contextKeyService() {
|
|
44
|
+
if (this.terminalContextKey) {
|
|
45
|
+
return this.terminalContextKey.service;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
get clientId() {
|
|
49
|
+
if (this._clientId) {
|
|
50
|
+
return this._clientId;
|
|
51
|
+
}
|
|
52
|
+
this._clientId = this.applicationService.clientId;
|
|
53
|
+
return this._clientId;
|
|
54
|
+
}
|
|
55
|
+
get _tabBarHandler() {
|
|
56
|
+
return this.layoutService.getTabbarHandler(container_id_1.TERMINAL_CONTAINER_ID);
|
|
57
|
+
}
|
|
58
|
+
async _createClientOrIgnore(widget) {
|
|
59
|
+
if (this._clients.has(widget.id)) {
|
|
60
|
+
return this._clients.get(widget.id);
|
|
61
|
+
}
|
|
62
|
+
return await this._createClient(widget);
|
|
63
|
+
}
|
|
64
|
+
async _createClient(widget, options) {
|
|
65
|
+
const client = await this.clientFactory(widget, options);
|
|
66
|
+
this.logger.log('create client with ITerminalClientFactory2', client);
|
|
67
|
+
return this.setupClient(widget, client);
|
|
68
|
+
}
|
|
69
|
+
setupClient(widget, client) {
|
|
70
|
+
this._clients.set(client.id, client);
|
|
71
|
+
this.logger.log(`setup client ${client.id}`);
|
|
72
|
+
client.addDispose(client.onExit((e) => {
|
|
73
|
+
// 在这个函数内不要 removeWidget,会导致 TerminalTask 场景下任务执行完毕直接退出而不是用户手动触发 onKeyDown 退出
|
|
74
|
+
this._onDidCloseTerminal.fire({ id: client.id, code: e.code });
|
|
75
|
+
}));
|
|
76
|
+
client.addDispose(client.onTitleChange((e) => {
|
|
77
|
+
this._onDidTerminalTitleChange.fire({ id: client.id, name: e.name });
|
|
78
|
+
}));
|
|
79
|
+
client.addDispose({
|
|
80
|
+
dispose: () => {
|
|
81
|
+
this._clients.delete(client.id);
|
|
82
|
+
this._onDidCloseTerminal.fire({ id: client.id, code: -1 });
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
client.addDispose(client.onLinksReady(() => {
|
|
86
|
+
this._setInstanceLinkProviders(client);
|
|
87
|
+
}));
|
|
88
|
+
this._onDidOpenTerminal.fire({
|
|
89
|
+
id: client.id,
|
|
90
|
+
name: client.name,
|
|
91
|
+
isActive: false,
|
|
92
|
+
});
|
|
93
|
+
this.terminalView.selectWidget(widget.id);
|
|
94
|
+
return client;
|
|
95
|
+
}
|
|
96
|
+
_disposeClient(widget) {
|
|
97
|
+
const client = this.findClientFromWidgetId(widget.id);
|
|
98
|
+
client && client.dispose();
|
|
99
|
+
}
|
|
100
|
+
constructor() {
|
|
101
|
+
super();
|
|
102
|
+
this._onDidOpenTerminal = new ide_core_common_1.Emitter();
|
|
103
|
+
this._onDidCloseTerminal = new ide_core_common_1.Emitter();
|
|
104
|
+
this._onDidTerminalTitleChange = new ide_core_common_1.Emitter();
|
|
105
|
+
this._onDidChangeActiveTerminal = new ide_core_common_1.Emitter();
|
|
106
|
+
this._ready = new ide_core_common_1.Deferred();
|
|
107
|
+
this._linkProviders = new Set();
|
|
108
|
+
this._linkProviderDisposables = new Map();
|
|
109
|
+
this.onDidOpenTerminal = this._onDidOpenTerminal.event;
|
|
110
|
+
this.onDidCloseTerminal = this._onDidCloseTerminal.event;
|
|
111
|
+
this.onDidTerminalTitleChange = this._onDidTerminalTitleChange.event;
|
|
112
|
+
this.onDidChangeActiveTerminal = this._onDidChangeActiveTerminal.event;
|
|
113
|
+
this._onInstanceRequestStartExtensionTerminal = new ide_core_common_1.Emitter();
|
|
114
|
+
this.onInstanceRequestStartExtensionTerminal = this._onInstanceRequestStartExtensionTerminal.event;
|
|
115
|
+
this.viewReady = new ide_core_common_1.Deferred();
|
|
116
|
+
this._onThemeBackgroundChangeEmitter = new ide_core_common_1.Emitter();
|
|
117
|
+
this.onThemeBackgroundChange = this._onThemeBackgroundChangeEmitter.event;
|
|
118
|
+
this._focus = false;
|
|
119
|
+
this._clients = new Map();
|
|
120
|
+
}
|
|
121
|
+
_createOneGroup(options) {
|
|
122
|
+
const index = this.terminalView.createGroup(options);
|
|
123
|
+
const group = this.terminalView.getGroup(index);
|
|
124
|
+
return { group, index };
|
|
125
|
+
}
|
|
126
|
+
_reset() {
|
|
127
|
+
const { group } = this._createOneGroup();
|
|
128
|
+
const widget = this.terminalView.createWidget(group);
|
|
129
|
+
return widget;
|
|
130
|
+
}
|
|
131
|
+
async recovery(history) {
|
|
132
|
+
var _a, _b, _c, _d, _e;
|
|
133
|
+
// Electron的环境下,不启用终端恢复能力
|
|
134
|
+
// 而且在Electron的环境下,clientId的获取方式也不一样,但因为不启用恢复能力,所以后面的代码也无需做额外处理
|
|
135
|
+
if (this.config.isElectronRenderer && !this.config.isRemote) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
// 先对recovery数据做一个简单校验,因为之前groups数据可能是字符串或object,而现在抛弃了字符串的方式
|
|
139
|
+
// 所以为了避免旧逻辑写入localStorage的数据混乱,这里做一个简单的校验
|
|
140
|
+
if (!history.current || !((_c = (_b = (_a = history === null || history === void 0 ? void 0 : history.groups) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.client)) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
// HACK: 因为现在的终端重连是有问题的,是ClientID机制导致的,因此在拿出记录恢复终端的时候,需要把里面的ClientID替换为当前活跃窗口的ClientID
|
|
144
|
+
// 同时在独立PtyService中,把终端重连的标识转变为真正的realSessionId 也就是 ${clientId}|${realSessionId}
|
|
145
|
+
const currentRealSessionId = (_e = (_d = history.current) === null || _d === void 0 ? void 0 : _d.split(common_1.TERMINAL_ID_SEPARATOR)) === null || _e === void 0 ? void 0 : _e[1];
|
|
146
|
+
if (history.current && history.current.includes(common_1.TERMINAL_ID_SEPARATOR)) {
|
|
147
|
+
history.current = `${this.clientId}|${currentRealSessionId}`;
|
|
148
|
+
}
|
|
149
|
+
history.groups = history.groups.map((group) => {
|
|
150
|
+
if (Array.isArray(group)) {
|
|
151
|
+
// 替换clientId为当前窗口ClientID
|
|
152
|
+
return group
|
|
153
|
+
.map(({ client, ...other }) => {
|
|
154
|
+
var _a;
|
|
155
|
+
if (other.task) {
|
|
156
|
+
// #1531 不恢复 Task 类型的终端
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
client: client.includes(common_1.TERMINAL_ID_SEPARATOR)
|
|
161
|
+
? `${this.clientId}${common_1.TERMINAL_ID_SEPARATOR}${(_a = client === null || client === void 0 ? void 0 : client.split(common_1.TERMINAL_ID_SEPARATOR)) === null || _a === void 0 ? void 0 : _a[1]}`
|
|
162
|
+
: client,
|
|
163
|
+
...other,
|
|
164
|
+
};
|
|
165
|
+
})
|
|
166
|
+
.filter(Boolean);
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
return group;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
let currentWidgetId = '';
|
|
173
|
+
let firstAvailableId = '';
|
|
174
|
+
const { groups, current } = history;
|
|
175
|
+
for (const widgets of groups) {
|
|
176
|
+
if (!widgets) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (widgets.length === 0) {
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
const { group } = this._createOneGroup();
|
|
183
|
+
const promises = [];
|
|
184
|
+
for (const session of widgets) {
|
|
185
|
+
if (!session) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
promises.push((async () => {
|
|
189
|
+
/**
|
|
190
|
+
* widget 创建完成后会同时创建 client
|
|
191
|
+
*/
|
|
192
|
+
const widget = this.terminalView.createWidget(group, typeof session === 'string' ? session : session.client, !!session.task, false, true);
|
|
193
|
+
const client = await this.clientFactory(widget);
|
|
194
|
+
// 终端被Resume的场景下也要绑定终端事件,避免意料之外的BUG
|
|
195
|
+
this.setupClient(widget, client);
|
|
196
|
+
if (session.task) {
|
|
197
|
+
client.isTaskExecutor = true;
|
|
198
|
+
client.taskId = session.task;
|
|
199
|
+
}
|
|
200
|
+
this._clients.set(client.id, client);
|
|
201
|
+
if (current === client.id) {
|
|
202
|
+
currentWidgetId = widget.id;
|
|
203
|
+
}
|
|
204
|
+
if (!firstAvailableId) {
|
|
205
|
+
firstAvailableId = widget.id;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* 等待预先连接成功
|
|
209
|
+
*/
|
|
210
|
+
client.attached.promise.then(() => {
|
|
211
|
+
widget.rename(client.name);
|
|
212
|
+
// client.term.writeln('\x1b[2mTerminal restored\x1b[22m');
|
|
213
|
+
/**
|
|
214
|
+
* 不成功的时候则认为这个连接已经失效了,去掉这个 widget
|
|
215
|
+
*/
|
|
216
|
+
if (!client.ready) {
|
|
217
|
+
this.terminalView.removeWidget(widget.id);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
})());
|
|
221
|
+
}
|
|
222
|
+
await Promise.all(promises);
|
|
223
|
+
}
|
|
224
|
+
const selectedIndex = this.terminalView.groups.get().findIndex((group) => group.widgetsMap.has(currentWidgetId));
|
|
225
|
+
if (selectedIndex > -1 && currentWidgetId) {
|
|
226
|
+
this.terminalView.selectWidget(currentWidgetId);
|
|
227
|
+
}
|
|
228
|
+
else if (firstAvailableId) {
|
|
229
|
+
this.terminalView.selectWidget(firstAvailableId);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
initContextKey(dom) {
|
|
233
|
+
this.terminalContextKey = this.injector.get(terminal_context_key_1.TerminalContextKey, [dom]);
|
|
234
|
+
this.terminalContextKey.isTerminalFocused.set(this._focus);
|
|
235
|
+
this.terminalContextKey.isTerminalViewInitialized.set(true);
|
|
236
|
+
}
|
|
237
|
+
async firstInitialize() {
|
|
238
|
+
await Promise.race([
|
|
239
|
+
(async () => {
|
|
240
|
+
await this.layoutService.viewReady.promise;
|
|
241
|
+
await this.viewReady.promise;
|
|
242
|
+
})(),
|
|
243
|
+
new Promise((resolve) => {
|
|
244
|
+
setTimeout(() => {
|
|
245
|
+
this.logger.warn("TerminalView didn't initialize in 2s, skip waiting, but may cause some problem");
|
|
246
|
+
resolve();
|
|
247
|
+
}, 2000);
|
|
248
|
+
}),
|
|
249
|
+
]);
|
|
250
|
+
this.themeBackground = this.terminalTheme.terminalTheme.background || '';
|
|
251
|
+
this.addDispose(this.terminalView.onWidgetCreated((widget) => {
|
|
252
|
+
this._createClientOrIgnore(widget);
|
|
253
|
+
}));
|
|
254
|
+
this.addDispose(this.terminalView.onWidgetDisposed((widget) => {
|
|
255
|
+
this._disposeClient(widget);
|
|
256
|
+
}));
|
|
257
|
+
this.addDispose(this.terminalView.onWidgetEmpty(() => {
|
|
258
|
+
this.hideTerminalPanel();
|
|
259
|
+
}));
|
|
260
|
+
this.addDispose(this.terminalView.onWidgetSelected((widget) => {
|
|
261
|
+
const client = this.findClientFromWidgetId(widget.id);
|
|
262
|
+
if (client) {
|
|
263
|
+
this._onDidChangeActiveTerminal.fire(client.id);
|
|
264
|
+
if (client.ready) {
|
|
265
|
+
// 事件是同步触发的,事件发出时,界面可能还没更新完成,所以加个延迟
|
|
266
|
+
// 当前选中的 client 已经完成渲染,聚焦
|
|
267
|
+
setTimeout(() => {
|
|
268
|
+
client.focus();
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
this._activeClientId = client === null || client === void 0 ? void 0 : client.id;
|
|
273
|
+
}));
|
|
274
|
+
this.addDispose(this.themeService.onThemeChange(() => {
|
|
275
|
+
this._clients.forEach((client) => {
|
|
276
|
+
client.updateTheme();
|
|
277
|
+
});
|
|
278
|
+
this.themeBackground = this.terminalTheme.terminalTheme.background || '';
|
|
279
|
+
}));
|
|
280
|
+
this.addDispose(this.eventBus.onDirective(ide_core_browser_1.ResizeEvent.createDirective((0, ide_core_browser_1.getSlotLocation)('@opensumi/ide-terminal-next', this.config.layoutConfig)), () => {
|
|
281
|
+
if (this._tabBarHandler && this._tabBarHandler.isActivated()) {
|
|
282
|
+
this.terminalView.resize();
|
|
283
|
+
}
|
|
284
|
+
}));
|
|
285
|
+
this.registerContributedProfilesCommandAndMenu();
|
|
286
|
+
this.addDispose(this.profileService.onDidChangeAvailableProfiles(() => {
|
|
287
|
+
this.registerContributedProfilesCommandAndMenu();
|
|
288
|
+
}));
|
|
289
|
+
if (this._tabBarHandler) {
|
|
290
|
+
this.addDispose(this._tabBarHandler.onActivate(() => {
|
|
291
|
+
if (this.terminalView.empty()) {
|
|
292
|
+
const current = this._reset();
|
|
293
|
+
this.terminalView.selectWidget(current.id);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
this.terminalView.selectGroup(this.terminalView.currentGroupIndex.get() > -1 ? this.terminalView.currentGroupIndex.get() : 0);
|
|
297
|
+
}
|
|
298
|
+
}));
|
|
299
|
+
this.addDispose(this._tabBarHandler.onInActivate(() => {
|
|
300
|
+
if (this.editorService.currentEditor) {
|
|
301
|
+
this.editorService.currentEditor.monacoEditor.focus();
|
|
302
|
+
}
|
|
303
|
+
}));
|
|
304
|
+
if (this._tabBarHandler.isActivated()) {
|
|
305
|
+
if (this.terminalView.empty()) {
|
|
306
|
+
const widget = this._reset();
|
|
307
|
+
this.terminalView.selectWidget(widget.id);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
this.terminalView.selectGroup(this.terminalView.currentGroupIndex.get() > -1 ? this.terminalView.currentGroupIndex.get() : 0);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
this.terminalContextKey.isTerminalViewInitialized.set(true);
|
|
315
|
+
this._ready.resolve();
|
|
316
|
+
}
|
|
317
|
+
async reconnect() {
|
|
318
|
+
const clients = Array.from(this._clients.values());
|
|
319
|
+
// 在重连的时候检查终端的健康状态,如果不健康的话,展示相关信息提示用户
|
|
320
|
+
clients.forEach(async (client) => {
|
|
321
|
+
const clientHealthy = await client.checkHealthy();
|
|
322
|
+
if (!clientHealthy) {
|
|
323
|
+
client.displayUnHealthyMessage();
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
focus() {
|
|
328
|
+
this._focus = true;
|
|
329
|
+
this.terminalContextKey.isTerminalFocused.set(true);
|
|
330
|
+
}
|
|
331
|
+
blur() {
|
|
332
|
+
this._focus = false;
|
|
333
|
+
this.terminalContextKey.isTerminalFocused.set(false);
|
|
334
|
+
}
|
|
335
|
+
onContextMenu(e) {
|
|
336
|
+
e.preventDefault();
|
|
337
|
+
const menus = this.menuService.createMenu(next_1.MenuId.TerminalInstanceContext);
|
|
338
|
+
const menuNodes = (0, menu_util_1.generateCtxMenu)({ menus });
|
|
339
|
+
this.ctxMenuRenderer.show({
|
|
340
|
+
menuNodes: menuNodes[1],
|
|
341
|
+
anchor: {
|
|
342
|
+
x: e.clientX,
|
|
343
|
+
y: e.clientY,
|
|
344
|
+
},
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
toJSON() {
|
|
348
|
+
const groups = [];
|
|
349
|
+
let cClient = this._clients.get(this.terminalView.currentWidgetId.get());
|
|
350
|
+
this.terminalView.groups.get().forEach((wGroup) => {
|
|
351
|
+
const group = [];
|
|
352
|
+
const widgets = wGroup.widgets.get();
|
|
353
|
+
widgets.forEach((widget) => {
|
|
354
|
+
var _a;
|
|
355
|
+
const client = this._clients.get(widget.id);
|
|
356
|
+
const disablePersistence = !this.preferenceService.get("terminal.integrated.enablePersistentSessions" /* CodeTerminalSettingId.EnablePersistentSessions */) ||
|
|
357
|
+
((_a = client === null || client === void 0 ? void 0 : client.launchConfig) === null || _a === void 0 ? void 0 : _a.disablePersistence);
|
|
358
|
+
if (!client || disablePersistence || (client === null || client === void 0 ? void 0 : client.isTaskExecutor)) {
|
|
359
|
+
return;
|
|
360
|
+
}
|
|
361
|
+
if (!cClient) {
|
|
362
|
+
cClient = client;
|
|
363
|
+
}
|
|
364
|
+
const record = { client: client.id };
|
|
365
|
+
group.push(record);
|
|
366
|
+
});
|
|
367
|
+
if (group.length > 0) {
|
|
368
|
+
groups.push(group);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
return {
|
|
372
|
+
groups,
|
|
373
|
+
current: cClient && cClient.id,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
disposeTerminalClients(filter) {
|
|
377
|
+
const clients = Array.from(this.clients.values()).filter((client) => client.id === (filter === null || filter === void 0 ? void 0 : filter.id) || client.isTaskExecutor === (filter === null || filter === void 0 ? void 0 : filter.isTaskExecutor) || client.name === (filter === null || filter === void 0 ? void 0 : filter.name));
|
|
378
|
+
for (const client of clients) {
|
|
379
|
+
try {
|
|
380
|
+
client.dispose();
|
|
381
|
+
}
|
|
382
|
+
catch (err) {
|
|
383
|
+
//
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
findClientFromWidgetId(widgetId) {
|
|
388
|
+
return this._clients.get(widgetId);
|
|
389
|
+
}
|
|
390
|
+
convertTerminalOptionsToLaunchConfig(options) {
|
|
391
|
+
const shellLaunchConfig = {
|
|
392
|
+
name: options.name,
|
|
393
|
+
executable: (0, ide_core_common_1.withNullAsUndefined)(options.shellPath),
|
|
394
|
+
args: (0, ide_core_common_1.withNullAsUndefined)(options.shellArgs),
|
|
395
|
+
cwd: (0, ide_core_common_1.withNullAsUndefined)(options.cwd),
|
|
396
|
+
env: (0, ide_core_common_1.withNullAsUndefined)(options.env),
|
|
397
|
+
icon: (0, ide_core_common_1.withNullAsUndefined)((0, common_1.asTerminalIcon)(options.iconPath)),
|
|
398
|
+
color: (0, ide_core_common_1.isThemeColor)(options.color) ? options.color.id : undefined,
|
|
399
|
+
initialText: (0, ide_core_common_1.withNullAsUndefined)(options.message),
|
|
400
|
+
strictEnv: (0, ide_core_common_1.withNullAsUndefined)(options.strictEnv),
|
|
401
|
+
hideFromUser: (0, ide_core_common_1.withNullAsUndefined)(options.hideFromUser),
|
|
402
|
+
// isFeatureTerminal: withNullAsUndefined(options?.isFeatureTerminal),
|
|
403
|
+
isExtensionOwnedTerminal: options.isExtensionTerminal,
|
|
404
|
+
// useShellEnvironment: withNullAsUndefined(internalOptions?.useShellEnvironment),
|
|
405
|
+
// 只支持 Panel
|
|
406
|
+
location: common_1.TerminalLocation.Panel,
|
|
407
|
+
disablePersistence: (0, ide_core_common_1.withNullAsUndefined)(options.isTransient),
|
|
408
|
+
};
|
|
409
|
+
shellLaunchConfig.__fromTerminalOptions = options;
|
|
410
|
+
return shellLaunchConfig;
|
|
411
|
+
}
|
|
412
|
+
convertProfileToLaunchConfig(shellLaunchConfigOrProfile, cwd) {
|
|
413
|
+
if (!shellLaunchConfigOrProfile) {
|
|
414
|
+
return {};
|
|
415
|
+
}
|
|
416
|
+
// Profile was provided
|
|
417
|
+
if (shellLaunchConfigOrProfile && 'profileName' in shellLaunchConfigOrProfile) {
|
|
418
|
+
const profile = shellLaunchConfigOrProfile;
|
|
419
|
+
if (!profile.path) {
|
|
420
|
+
return shellLaunchConfigOrProfile;
|
|
421
|
+
}
|
|
422
|
+
return {
|
|
423
|
+
executable: profile.path,
|
|
424
|
+
args: profile.args,
|
|
425
|
+
env: profile.env,
|
|
426
|
+
// icon: profile.icon,
|
|
427
|
+
color: profile.color,
|
|
428
|
+
name: profile.overrideName ? profile.profileName : undefined,
|
|
429
|
+
cwd,
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
if (cwd) {
|
|
433
|
+
shellLaunchConfigOrProfile.cwd = cwd;
|
|
434
|
+
}
|
|
435
|
+
return shellLaunchConfigOrProfile;
|
|
436
|
+
}
|
|
437
|
+
async createTerminalWithWidgetByTerminalOptions(options) {
|
|
438
|
+
const launchConfig = this.convertTerminalOptionsToLaunchConfig(options.terminalOptions);
|
|
439
|
+
return this.createTerminalWithWidget({
|
|
440
|
+
...options,
|
|
441
|
+
config: launchConfig,
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
async createTerminal(options) {
|
|
445
|
+
const widgetId = options.id || this.service.generateSessionId();
|
|
446
|
+
const { group } = this._createOneGroup();
|
|
447
|
+
const widget = this.terminalView.createWidget(group, widgetId, false, true);
|
|
448
|
+
const client = await this._createClient(widget, options);
|
|
449
|
+
return client;
|
|
450
|
+
}
|
|
451
|
+
async createTerminalWithWidget(options) {
|
|
452
|
+
const widgetId = options.id ? this.clientId + common_1.TERMINAL_ID_SEPARATOR + options.id : this.service.generateSessionId();
|
|
453
|
+
// 这里转一遍是为了拿到 LaunchConfig,但是在 TerminalClient 内部还是会对 options.config 做可用检测并转换
|
|
454
|
+
const launchConfig = this.convertProfileToLaunchConfig(options.config);
|
|
455
|
+
const { group } = this._createOneGroup(launchConfig);
|
|
456
|
+
const widget = this.terminalView.createWidget(group, widgetId, options.isTaskExecutor || !options.closeWhenExited, true);
|
|
457
|
+
if (options.beforeCreate && typeof options.beforeCreate === 'function') {
|
|
458
|
+
options.beforeCreate(widgetId);
|
|
459
|
+
}
|
|
460
|
+
const client = await this._createClient(widget, {
|
|
461
|
+
id: widgetId,
|
|
462
|
+
config: launchConfig,
|
|
463
|
+
cwd: options === null || options === void 0 ? void 0 : options.cwd,
|
|
464
|
+
location: options === null || options === void 0 ? void 0 : options.location,
|
|
465
|
+
resource: options === null || options === void 0 ? void 0 : options.resource,
|
|
466
|
+
});
|
|
467
|
+
if (options.isTaskExecutor) {
|
|
468
|
+
client.isTaskExecutor = true;
|
|
469
|
+
client.taskId = options.taskId;
|
|
470
|
+
}
|
|
471
|
+
return client;
|
|
472
|
+
}
|
|
473
|
+
clearCurrentGroup() {
|
|
474
|
+
const group = this.terminalView.currentGroup.get();
|
|
475
|
+
if (group) {
|
|
476
|
+
const widgets = group.widgets.get();
|
|
477
|
+
widgets.forEach((widget) => {
|
|
478
|
+
const client = this._clients.get(widget.id);
|
|
479
|
+
if (client) {
|
|
480
|
+
client.clear();
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
clearAllGroups() {
|
|
486
|
+
this._clients.forEach((client) => {
|
|
487
|
+
if (client) {
|
|
488
|
+
client.clear();
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
showTerminalPanel() {
|
|
493
|
+
if (this._tabBarHandler) {
|
|
494
|
+
this._tabBarHandler.activate();
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
hideTerminalPanel() {
|
|
498
|
+
if (this._tabBarHandler && this._tabBarHandler.isActivated()) {
|
|
499
|
+
this._tabBarHandler.deactivate();
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
toggleTerminalPanel() {
|
|
503
|
+
if (!this._tabBarHandler) {
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
if (this._tabBarHandler.isActivated()) {
|
|
507
|
+
this._tabBarHandler.deactivate();
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
this._tabBarHandler.activate();
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
requestStartExtensionTerminal(proxy, cols, rows) {
|
|
514
|
+
// The initial request came from the extension host, no need to wait for it
|
|
515
|
+
return new Promise((callback) => {
|
|
516
|
+
this._onInstanceRequestStartExtensionTerminal.fire({ proxy, cols, rows, callback });
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
registerLinkProvider(linkProvider) {
|
|
520
|
+
const disposable = new ide_core_common_1.DisposableStore();
|
|
521
|
+
this._linkProviders.add(linkProvider);
|
|
522
|
+
for (const client of this._clients.values()) {
|
|
523
|
+
if (client.areLinksReady) {
|
|
524
|
+
disposable.add(client.registerLinkProvider(linkProvider));
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
this._linkProviderDisposables.set(linkProvider, disposable);
|
|
528
|
+
return {
|
|
529
|
+
dispose: () => {
|
|
530
|
+
const disposable = this._linkProviderDisposables.get(linkProvider);
|
|
531
|
+
disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
|
|
532
|
+
this._linkProviders.delete(linkProvider);
|
|
533
|
+
},
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
_setInstanceLinkProviders(instance) {
|
|
537
|
+
for (const linkProvider of this._linkProviders) {
|
|
538
|
+
const disposable = this._linkProviderDisposables.get(linkProvider);
|
|
539
|
+
const provider = instance.registerLinkProvider(linkProvider);
|
|
540
|
+
disposable === null || disposable === void 0 ? void 0 : disposable.add(provider);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
registerContributedProfilesCommandAndMenu() {
|
|
544
|
+
if (this.commandAndMenuDisposeCollection) {
|
|
545
|
+
this.commandAndMenuDisposeCollection.dispose();
|
|
546
|
+
}
|
|
547
|
+
this.commandAndMenuDisposeCollection = new ide_core_common_1.DisposableCollection();
|
|
548
|
+
// 展示在下拉列表的数据
|
|
549
|
+
const notAutoDetectedProfiles = this.profileService.availableProfiles.filter((profile) => !profile.isAutoDetected);
|
|
550
|
+
notAutoDetectedProfiles.forEach((profile) => {
|
|
551
|
+
const id = `TerminalProfilesCommand:${profile.path}:${profile.profileName}`;
|
|
552
|
+
this.commandAndMenuDisposeCollection.push(this.commandRegistry.registerCommand({
|
|
553
|
+
id,
|
|
554
|
+
}, {
|
|
555
|
+
execute: async () => {
|
|
556
|
+
await this.createTerminal({
|
|
557
|
+
config: profile,
|
|
558
|
+
});
|
|
559
|
+
},
|
|
560
|
+
}));
|
|
561
|
+
this.commandAndMenuDisposeCollection.push(this.menuRegistry.registerMenuItem(next_1.MenuId.TerminalNewDropdownContext, {
|
|
562
|
+
command: {
|
|
563
|
+
id,
|
|
564
|
+
label: profile.profileName || 'unknown profile',
|
|
565
|
+
},
|
|
566
|
+
}));
|
|
567
|
+
});
|
|
568
|
+
this.profileService.contributedProfiles.forEach((profile) => {
|
|
569
|
+
const id = `TerminalProfilesCommand:${profile.extensionIdentifier}:${profile.id}`;
|
|
570
|
+
this.commandAndMenuDisposeCollection.push(this.commandRegistry.registerCommand({
|
|
571
|
+
id,
|
|
572
|
+
}, {
|
|
573
|
+
execute: async () => {
|
|
574
|
+
await this.profileService.createContributedTerminalProfile(profile.extensionIdentifier, profile.id, {
|
|
575
|
+
icon: profile.icon,
|
|
576
|
+
});
|
|
577
|
+
},
|
|
578
|
+
}));
|
|
579
|
+
this.commandAndMenuDisposeCollection.push(this.menuRegistry.registerMenuItem(next_1.MenuId.TerminalNewDropdownContext, {
|
|
580
|
+
command: {
|
|
581
|
+
id,
|
|
582
|
+
label: (0, ide_core_common_1.replaceLocalizePlaceholder)(profile.title) || profile.title || 'unknown profile',
|
|
583
|
+
},
|
|
584
|
+
}));
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
exports.TerminalController = TerminalController;
|
|
589
|
+
tslib_1.__decorate([
|
|
590
|
+
(0, di_1.Autowired)(ide_main_layout_1.IMainLayoutService),
|
|
591
|
+
tslib_1.__metadata("design:type", Object)
|
|
592
|
+
], TerminalController.prototype, "layoutService", void 0);
|
|
593
|
+
tslib_1.__decorate([
|
|
594
|
+
(0, di_1.Autowired)(ide_theme_1.IThemeService),
|
|
595
|
+
tslib_1.__metadata("design:type", Object)
|
|
596
|
+
], TerminalController.prototype, "themeService", void 0);
|
|
597
|
+
tslib_1.__decorate([
|
|
598
|
+
(0, di_1.Autowired)(ide_editor_1.WorkbenchEditorService),
|
|
599
|
+
tslib_1.__metadata("design:type", ide_editor_1.WorkbenchEditorService)
|
|
600
|
+
], TerminalController.prototype, "editorService", void 0);
|
|
601
|
+
tslib_1.__decorate([
|
|
602
|
+
(0, di_1.Autowired)(common_1.ITerminalTheme),
|
|
603
|
+
tslib_1.__metadata("design:type", Object)
|
|
604
|
+
], TerminalController.prototype, "terminalTheme", void 0);
|
|
605
|
+
tslib_1.__decorate([
|
|
606
|
+
(0, di_1.Autowired)(common_1.ITerminalGroupViewService),
|
|
607
|
+
tslib_1.__metadata("design:type", terminal_view_1.TerminalGroupViewService)
|
|
608
|
+
], TerminalController.prototype, "terminalView", void 0);
|
|
609
|
+
tslib_1.__decorate([
|
|
610
|
+
(0, di_1.Autowired)(common_1.ITerminalClientFactory2),
|
|
611
|
+
tslib_1.__metadata("design:type", Function)
|
|
612
|
+
], TerminalController.prototype, "clientFactory", void 0);
|
|
613
|
+
tslib_1.__decorate([
|
|
614
|
+
(0, di_1.Autowired)(common_1.ITerminalInternalService),
|
|
615
|
+
tslib_1.__metadata("design:type", Object)
|
|
616
|
+
], TerminalController.prototype, "service", void 0);
|
|
617
|
+
tslib_1.__decorate([
|
|
618
|
+
(0, di_1.Autowired)(common_1.ITerminalErrorService),
|
|
619
|
+
tslib_1.__metadata("design:type", Object)
|
|
620
|
+
], TerminalController.prototype, "errorService", void 0);
|
|
621
|
+
tslib_1.__decorate([
|
|
622
|
+
(0, di_1.Autowired)(common_1.ITerminalProfileService),
|
|
623
|
+
tslib_1.__metadata("design:type", Object)
|
|
624
|
+
], TerminalController.prototype, "profileService", void 0);
|
|
625
|
+
tslib_1.__decorate([
|
|
626
|
+
(0, di_1.Autowired)(ide_core_common_1.CommandRegistry),
|
|
627
|
+
tslib_1.__metadata("design:type", Object)
|
|
628
|
+
], TerminalController.prototype, "commandRegistry", void 0);
|
|
629
|
+
tslib_1.__decorate([
|
|
630
|
+
(0, di_1.Autowired)(next_1.IMenuRegistry),
|
|
631
|
+
tslib_1.__metadata("design:type", next_1.IMenuRegistry)
|
|
632
|
+
], TerminalController.prototype, "menuRegistry", void 0);
|
|
633
|
+
tslib_1.__decorate([
|
|
634
|
+
(0, di_1.Autowired)(ide_core_common_1.IApplicationService),
|
|
635
|
+
tslib_1.__metadata("design:type", Object)
|
|
636
|
+
], TerminalController.prototype, "applicationService", void 0);
|
|
637
|
+
tslib_1.__decorate([
|
|
638
|
+
(0, di_1.Autowired)(di_1.INJECTOR_TOKEN),
|
|
639
|
+
tslib_1.__metadata("design:type", di_1.Injector)
|
|
640
|
+
], TerminalController.prototype, "injector", void 0);
|
|
641
|
+
tslib_1.__decorate([
|
|
642
|
+
(0, di_1.Autowired)(ide_core_browser_1.AppConfig),
|
|
643
|
+
tslib_1.__metadata("design:type", Object)
|
|
644
|
+
], TerminalController.prototype, "config", void 0);
|
|
645
|
+
tslib_1.__decorate([
|
|
646
|
+
(0, di_1.Autowired)(ide_core_common_1.ILogger),
|
|
647
|
+
tslib_1.__metadata("design:type", Object)
|
|
648
|
+
], TerminalController.prototype, "logger", void 0);
|
|
649
|
+
tslib_1.__decorate([
|
|
650
|
+
(0, di_1.Autowired)(menu_interface_1.AbstractMenuService),
|
|
651
|
+
tslib_1.__metadata("design:type", menu_interface_1.AbstractMenuService)
|
|
652
|
+
], TerminalController.prototype, "menuService", void 0);
|
|
653
|
+
tslib_1.__decorate([
|
|
654
|
+
(0, di_1.Autowired)(next_1.ICtxMenuRenderer),
|
|
655
|
+
tslib_1.__metadata("design:type", next_1.ICtxMenuRenderer)
|
|
656
|
+
], TerminalController.prototype, "ctxMenuRenderer", void 0);
|
|
657
|
+
tslib_1.__decorate([
|
|
658
|
+
(0, di_1.Autowired)(types_1.PreferenceService),
|
|
659
|
+
tslib_1.__metadata("design:type", Object)
|
|
660
|
+
], TerminalController.prototype, "preferenceService", void 0);
|
|
661
|
+
tslib_1.__decorate([
|
|
662
|
+
(0, di_1.Autowired)(ide_core_browser_1.AppConfig),
|
|
663
|
+
tslib_1.__metadata("design:type", Object)
|
|
664
|
+
], TerminalController.prototype, "appConfig", void 0);
|
|
665
|
+
exports.TerminalController = TerminalController = tslib_1.__decorate([
|
|
666
|
+
(0, di_1.Injectable)(),
|
|
667
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
668
|
+
], TerminalController);
|
|
669
|
+
//# sourceMappingURL=terminal.controller.js.map
|