@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,525 @@
|
|
|
1
|
+
import { Terminal as XTerm } from '@xterm/xterm';
|
|
2
|
+
import { IPty as INodePty } from 'node-pty';
|
|
3
|
+
import * as pty from 'node-pty';
|
|
4
|
+
import { MaybePromise, OperatingSystem, Uri } from '@opensumi/ide-core-common';
|
|
5
|
+
import { ITerminalError } from './error';
|
|
6
|
+
import { ITerminalEnvironment, ITerminalProcessExtHostProxy, TerminalLocation } from './extension';
|
|
7
|
+
import { IDetectProfileOptions, ITerminalProfile } from './profile';
|
|
8
|
+
import { WindowsShellType } from './shell';
|
|
9
|
+
import type vscode from 'vscode';
|
|
10
|
+
export interface IPtySpawnOptions {
|
|
11
|
+
/**
|
|
12
|
+
* 恢复终端的历史记录的特性
|
|
13
|
+
*
|
|
14
|
+
* 在 Task 启动终端的时候我们要关掉这个特性,因为我们期望每一次 Task 仅返回当次执行的结果
|
|
15
|
+
*
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
preserveHistory?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* 保存的终端历史记录的行数
|
|
21
|
+
* TODO: 可以通过设置项改变
|
|
22
|
+
* @default 500
|
|
23
|
+
*/
|
|
24
|
+
ptyLineCacheSize?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IPtyProcessProxy extends INodePty {
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated 请使用 `IPty.launchConfig` 的 shellPath 字段
|
|
29
|
+
*/
|
|
30
|
+
bin: string;
|
|
31
|
+
launchConfig: IShellLaunchConfig;
|
|
32
|
+
parsedName: string;
|
|
33
|
+
getProcessDynamically(): MaybePromise<string>;
|
|
34
|
+
getCwd(): Promise<string | undefined>;
|
|
35
|
+
}
|
|
36
|
+
export declare const ITerminalServicePath = "ITerminalServicePath";
|
|
37
|
+
export declare const ITerminalProcessPath = "ITerminalProcessPath";
|
|
38
|
+
export declare const PTY_SERVICE_PROXY_PROTOCOL = "PTY_SERVICE_PROXY_PROTOCOL";
|
|
39
|
+
export declare const PTY_SERVICE_PROXY_CALLBACK_PROTOCOL = "PTY_SERVICE_PROXY_CALLBACK_PROTOCOL";
|
|
40
|
+
export declare const PTY_SERVICE_PROXY_SERVER_PORT = 10111;
|
|
41
|
+
export interface IPtyProxyRPCService {
|
|
42
|
+
/**
|
|
43
|
+
* 远程spawn pty进程,开启终端,返回符合IPty接口的远程执行对象
|
|
44
|
+
* @param file 启动的程序 如/bin/bash
|
|
45
|
+
* @param args 启动参数 argv (具体参考node-pty参数文档)
|
|
46
|
+
* @param options 启动终端options (具体参考node-pty参数文档)
|
|
47
|
+
* @param sessionId (可选)传入启动终端的sessionId,通常用于terminal重连的场景
|
|
48
|
+
* @returns 返回符合IPty接口的远程执行RPC对象,实际上内容是IPty的静态常量,没有function,需要做二次包装
|
|
49
|
+
*/
|
|
50
|
+
$spawn(file: string, args: string[] | string, options: pty.IPtyForkOptions | pty.IWindowsPtyForkOptions, sessionId?: string, spawnOptions?: IPtySpawnOptions): Promise<pty.IPty>;
|
|
51
|
+
/**
|
|
52
|
+
* pty数据onData回调代理
|
|
53
|
+
* @param callId 指定callId的方法回调注册
|
|
54
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
55
|
+
*/
|
|
56
|
+
$onData(callId: number, pid: number): void;
|
|
57
|
+
/**
|
|
58
|
+
* pty数据onExit回调代理
|
|
59
|
+
* @param callId 指定callId的方法回调注册
|
|
60
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
61
|
+
*/
|
|
62
|
+
$onExit(callId: number, pid: number): void;
|
|
63
|
+
/**
|
|
64
|
+
* resize方法RPC转发
|
|
65
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
66
|
+
* @param columns 列数
|
|
67
|
+
* @param rows 行数
|
|
68
|
+
*/
|
|
69
|
+
$resize(pid: number, columns: number, rows: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* 远程pty写入数据的RPC转发
|
|
72
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
73
|
+
* @param data 终端stdin写入的数据
|
|
74
|
+
*/
|
|
75
|
+
$write(pid: number, data: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* kill pty 的RPC转发
|
|
78
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
79
|
+
* @param signal The signal to use, defaults to SIGHUP. This parameter is not supported onWindows.
|
|
80
|
+
*/
|
|
81
|
+
$kill(pid: number, signal?: string): void;
|
|
82
|
+
/**
|
|
83
|
+
* pause pty 的RPC转发
|
|
84
|
+
* Pauses the pty for customizable flow control.
|
|
85
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
86
|
+
*/
|
|
87
|
+
$pause(pid: number): void;
|
|
88
|
+
/**
|
|
89
|
+
* resume pty 的RPC转发
|
|
90
|
+
* Resumes the pty for customizable flow control.
|
|
91
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
92
|
+
*/
|
|
93
|
+
$resume(pid: number): void;
|
|
94
|
+
/**
|
|
95
|
+
* 清理 pty
|
|
96
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
97
|
+
*/
|
|
98
|
+
$clear(pid: number): void;
|
|
99
|
+
/**
|
|
100
|
+
* 实时性通过Pid获取ProcessName
|
|
101
|
+
* @param pid pty进程的pid,用于辨识pty进程
|
|
102
|
+
*/
|
|
103
|
+
$getProcess(pid: number): string;
|
|
104
|
+
/**
|
|
105
|
+
* Get the current working directory for the given process ID.
|
|
106
|
+
*/
|
|
107
|
+
$getCwd(pid: number): Promise<string | undefined>;
|
|
108
|
+
/**
|
|
109
|
+
* 检查Session对应的进程是否存活
|
|
110
|
+
* @param sessionId 终端的sessionId
|
|
111
|
+
*/
|
|
112
|
+
$checkSession(sessionId: string): boolean;
|
|
113
|
+
}
|
|
114
|
+
export interface Terminal {
|
|
115
|
+
readonly xterm: XTerm;
|
|
116
|
+
/**
|
|
117
|
+
* The name of the terminal.
|
|
118
|
+
*/
|
|
119
|
+
readonly name: string;
|
|
120
|
+
/**
|
|
121
|
+
* The process ID of the shell process.
|
|
122
|
+
*/
|
|
123
|
+
readonly processId: Promise<number>;
|
|
124
|
+
/**
|
|
125
|
+
* Send text to the terminal. The text is written to the stdin of the underlying pty process
|
|
126
|
+
* (shell) of the terminal.
|
|
127
|
+
*
|
|
128
|
+
* @param text The text to send.
|
|
129
|
+
* @param addNewLine Whether to add a new line to the text being sent, this is normally
|
|
130
|
+
* required to run a command in the terminal. The character(s) added are \n or \r\n
|
|
131
|
+
* depending on the platform. This defaults to `true`.
|
|
132
|
+
*/
|
|
133
|
+
sendText(text: string, addNewLine?: boolean): void;
|
|
134
|
+
/**
|
|
135
|
+
* Show the terminal panel and reveal this terminal in the UI.
|
|
136
|
+
*
|
|
137
|
+
* @param preserveFocus When `true` the terminal will not take focus.
|
|
138
|
+
*/
|
|
139
|
+
show(preserveFocus?: boolean): void;
|
|
140
|
+
/**
|
|
141
|
+
* Hide the terminal panel if this terminal is currently showing.
|
|
142
|
+
*/
|
|
143
|
+
hide(): void;
|
|
144
|
+
isActive: boolean;
|
|
145
|
+
id: string;
|
|
146
|
+
serviceInitPromise: Promise<void> | null;
|
|
147
|
+
finishServiceInitPromise(): any;
|
|
148
|
+
setName(name: string): any;
|
|
149
|
+
setProcessId(id: number): any;
|
|
150
|
+
/**
|
|
151
|
+
* Dispose and free associated resources.
|
|
152
|
+
*/
|
|
153
|
+
dispose(): void;
|
|
154
|
+
clear(): void;
|
|
155
|
+
}
|
|
156
|
+
export interface TerminalOptions {
|
|
157
|
+
/**
|
|
158
|
+
* A human-readable string which will be used to represent the terminal in the UI.
|
|
159
|
+
*/
|
|
160
|
+
name?: string;
|
|
161
|
+
/**
|
|
162
|
+
* A path to a custom shell executable to be used in the terminal.
|
|
163
|
+
*/
|
|
164
|
+
shellPath?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Args for the custom shell executable. A string can be used on Windows only which allows
|
|
167
|
+
* specifying shell args in [command-line format](https://msdn.microsoft.com/en-au/08dfcab2-eb6e-49a4-80eb-87d4076c98c6).
|
|
168
|
+
*/
|
|
169
|
+
shellArgs?: string[] | string;
|
|
170
|
+
/**
|
|
171
|
+
* A path or Uri for the current working directory to be used for the terminal.
|
|
172
|
+
*/
|
|
173
|
+
cwd?: string | Uri;
|
|
174
|
+
/**
|
|
175
|
+
* Object with environment variables that will be added to the VS Code process.
|
|
176
|
+
*/
|
|
177
|
+
env?: {
|
|
178
|
+
[key: string]: string | null;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Whether an extension is controlling the terminal via a `vscode.Pseudoterminal`.
|
|
182
|
+
*/
|
|
183
|
+
isExtensionTerminal?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Whether the terminal process environment should be exactly as provided in
|
|
186
|
+
* `TerminalOptions.env`. When this is false (default), the environment will be based on the
|
|
187
|
+
* window's environment and also apply configured platform settings like
|
|
188
|
+
* `terminal.integrated.windows.env` on top. When this is true, the complete environment
|
|
189
|
+
* must be provided as nothing will be inherited from the process or any configuration.
|
|
190
|
+
*/
|
|
191
|
+
strictEnv?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* When enabled the terminal will run the process as normal but not be surfaced to the user
|
|
194
|
+
* until `Terminal.show` is called. The typical usage for this is when you need to run
|
|
195
|
+
* something that may need interactivity but only want to tell the user about it when
|
|
196
|
+
* interaction is needed. Note that the terminals will still be exposed to all extensions
|
|
197
|
+
* as normal.
|
|
198
|
+
*/
|
|
199
|
+
hideFromUser?: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* A message to write to the terminal on first launch, note that this is not sent to the
|
|
202
|
+
* process but, rather written directly to the terminal. This supports escape sequences such
|
|
203
|
+
* a setting text style.
|
|
204
|
+
*/
|
|
205
|
+
message?: string;
|
|
206
|
+
/**
|
|
207
|
+
* The icon path or {@link ThemeIcon} for the terminal.
|
|
208
|
+
*/
|
|
209
|
+
iconPath?: Uri | {
|
|
210
|
+
light: Uri;
|
|
211
|
+
dark: Uri;
|
|
212
|
+
} | vscode.ThemeIcon;
|
|
213
|
+
/**
|
|
214
|
+
* The CLI arguments to use with executable, a string[] is in argv format and will be escaped,
|
|
215
|
+
* a string is in "CommandLine" pre-escaped format and will be used as is. The string option is
|
|
216
|
+
* only supported on Windows and will throw an exception if used on macOS or Linux.
|
|
217
|
+
*/
|
|
218
|
+
args?: any;
|
|
219
|
+
/**
|
|
220
|
+
* The icon {@link ThemeColor} for the terminal.
|
|
221
|
+
* The `terminal.ansi*` theme keys are
|
|
222
|
+
* recommended for the best contrast and consistency across themes.
|
|
223
|
+
*/
|
|
224
|
+
color?: vscode.ThemeColor;
|
|
225
|
+
/**
|
|
226
|
+
* @deprecated Use `ICreateClientWithWidgetOptions.closeWhenExited` instead. Will removed in 2.17.0
|
|
227
|
+
* pty 进程退出后是否自动关闭 terminal 控件
|
|
228
|
+
*/
|
|
229
|
+
closeWhenExited?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* @deprecated Use `ICreateClientWithWidgetOptions.beforeCreate` instead. Will removed in 2.17.0
|
|
232
|
+
* 自定义的参数,由上层集成方自行控制
|
|
233
|
+
*/
|
|
234
|
+
beforeCreate?: (terminalId: string) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Opt-out of the default terminal persistence on restart and reload.
|
|
237
|
+
*/
|
|
238
|
+
isTransient?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* The {@link TerminalLocation} or {@link TerminalEditorLocationOptions} or {@link TerminalSplitLocationOptions} for the terminal.
|
|
241
|
+
*/
|
|
242
|
+
location?: TerminalLocation | vscode.TerminalEditorLocationOptions | vscode.TerminalSplitLocationOptions;
|
|
243
|
+
}
|
|
244
|
+
export declare const ITerminalNodeService: unique symbol;
|
|
245
|
+
export interface ITerminalNodeService {
|
|
246
|
+
create2(id: string, cols: number, rows: number, options: IShellLaunchConfig): Promise<IPtyProcessProxy | undefined>;
|
|
247
|
+
onMessage(id: string, msg: string): void;
|
|
248
|
+
resize(id: string, rows: number, cols: number): void;
|
|
249
|
+
getShellName(id: string): string;
|
|
250
|
+
getCwd(id: string): Promise<string | undefined>;
|
|
251
|
+
getProcessId(id: string): number;
|
|
252
|
+
disposeById(id: string): void;
|
|
253
|
+
dispose(): void;
|
|
254
|
+
setClient(clientId: string, client: ITerminalServiceClient): void;
|
|
255
|
+
closeClient(clientId: string): void;
|
|
256
|
+
ensureClientTerminal(clientId: string, terminalIdArr: string[]): Promise<boolean>;
|
|
257
|
+
}
|
|
258
|
+
export declare const ITerminalProcessService: unique symbol;
|
|
259
|
+
export interface ITerminalProcessService {
|
|
260
|
+
getEnv(): Promise<{
|
|
261
|
+
[key in string]: string | undefined;
|
|
262
|
+
}>;
|
|
263
|
+
}
|
|
264
|
+
export interface INodePtyInstance {
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
pid: number;
|
|
268
|
+
process: string;
|
|
269
|
+
shellPath?: string;
|
|
270
|
+
}
|
|
271
|
+
export declare const ITerminalServiceClient: unique symbol;
|
|
272
|
+
export interface ITerminalServiceClient {
|
|
273
|
+
create2(id: string, cols: number, rows: number, launchConfig: IShellLaunchConfig): Promise<INodePtyInstance | undefined>;
|
|
274
|
+
onMessage(id: string, msg: string): void;
|
|
275
|
+
resize(id: string, rows: number, cols: number): void;
|
|
276
|
+
disposeById(id: string): void;
|
|
277
|
+
getProcessId(id: string): number;
|
|
278
|
+
clientMessage(id: string, data: string): void;
|
|
279
|
+
closeClient(sessionId: string, data?: ITerminalError | {
|
|
280
|
+
code?: number;
|
|
281
|
+
signal?: number;
|
|
282
|
+
} | number, signal?: number): void;
|
|
283
|
+
processChange(clientId: string, processName: string): void;
|
|
284
|
+
setConnectionClientId(clientId: string): void;
|
|
285
|
+
dispose(): void;
|
|
286
|
+
getShellName(id: string): string;
|
|
287
|
+
ensureTerminal(terminalIdArr: string[]): Promise<boolean>;
|
|
288
|
+
$resolveWindowsShellPath(type: WindowsShellType): Promise<string | undefined>;
|
|
289
|
+
$resolveUnixShellPath(type: string): Promise<string | undefined>;
|
|
290
|
+
$resolveShellPath(paths: string[]): Promise<string | undefined>;
|
|
291
|
+
detectAvailableProfiles(options: IDetectProfileOptions): Promise<ITerminalProfile[]>;
|
|
292
|
+
getDefaultSystemShell(os: OperatingSystem): Promise<string>;
|
|
293
|
+
getOS(): OperatingSystem;
|
|
294
|
+
getCodePlatformKey(): Promise<'osx' | 'windows' | 'linux'>;
|
|
295
|
+
getCwd(id: string): Promise<string | undefined>;
|
|
296
|
+
}
|
|
297
|
+
export interface ITerminalInfo {
|
|
298
|
+
id: string;
|
|
299
|
+
name: string;
|
|
300
|
+
isActive: boolean;
|
|
301
|
+
}
|
|
302
|
+
export declare const IExternalTerminalService: unique symbol;
|
|
303
|
+
/**
|
|
304
|
+
* 使用依赖注入的方式复写这个类型,
|
|
305
|
+
* 支持更多形式的 terminal 实现。
|
|
306
|
+
* 搜了一下代码,在 OpenSumi 里已经没有地方引用了。
|
|
307
|
+
*/
|
|
308
|
+
export interface IExternalTerminalService {
|
|
309
|
+
/**
|
|
310
|
+
* 创建一个新的 terminal,需要手动的将 xterm 和 pty 的通信关联起来。
|
|
311
|
+
*
|
|
312
|
+
* @param id
|
|
313
|
+
* @param terminal
|
|
314
|
+
* @param rows
|
|
315
|
+
* @param cols
|
|
316
|
+
* @param options
|
|
317
|
+
*/
|
|
318
|
+
create(id: string, terminal: Terminal, rows: number, cols: number, options: TerminalOptions): Promise<boolean>;
|
|
319
|
+
/**
|
|
320
|
+
* 发送一段文字到后端,用于外部调用
|
|
321
|
+
*
|
|
322
|
+
* @param id
|
|
323
|
+
* @param text
|
|
324
|
+
* @param addNewLine
|
|
325
|
+
*/
|
|
326
|
+
sendText(id: string, text: string, addNewLine?: boolean): void;
|
|
327
|
+
/**
|
|
328
|
+
* resize
|
|
329
|
+
*
|
|
330
|
+
* @param id
|
|
331
|
+
* @param rows
|
|
332
|
+
* @param cols
|
|
333
|
+
*/
|
|
334
|
+
resize(id: string, rows: number, cols: number): void;
|
|
335
|
+
/**
|
|
336
|
+
* 销毁一个已有的 terminal 进程
|
|
337
|
+
*
|
|
338
|
+
* @param id
|
|
339
|
+
*/
|
|
340
|
+
disposeById(id: string): void;
|
|
341
|
+
/**
|
|
342
|
+
* 获取已知 terminal 的进程号
|
|
343
|
+
*
|
|
344
|
+
* @param id
|
|
345
|
+
*/
|
|
346
|
+
getProcessId(id: string): Promise<number>;
|
|
347
|
+
}
|
|
348
|
+
export type TerminalIcon = Uri | {
|
|
349
|
+
light: Uri;
|
|
350
|
+
dark: Uri;
|
|
351
|
+
} | vscode.ThemeIcon;
|
|
352
|
+
export type ITerminalLocationOptions = TerminalLocation | {
|
|
353
|
+
splitActiveTerminal: boolean;
|
|
354
|
+
};
|
|
355
|
+
export interface IShellLaunchConfig {
|
|
356
|
+
/**
|
|
357
|
+
* The name of the terminal, if this is not set the name of the process will be used.
|
|
358
|
+
*/
|
|
359
|
+
name?: string;
|
|
360
|
+
/**
|
|
361
|
+
* An string to follow the name of the terminal with, indicating a special kind of terminal
|
|
362
|
+
*/
|
|
363
|
+
description?: string;
|
|
364
|
+
/**
|
|
365
|
+
* The shell executable (bash, cmd, etc.).
|
|
366
|
+
*/
|
|
367
|
+
executable?: string;
|
|
368
|
+
/**
|
|
369
|
+
* The CLI arguments to use with executable, a string[] is in argv format and will be escaped,
|
|
370
|
+
* a string is in "CommandLine" pre-escaped format and will be used as is. The string option is
|
|
371
|
+
* only supported on Windows and will throw an exception if used on macOS or Linux.
|
|
372
|
+
*/
|
|
373
|
+
args?: string[] | string;
|
|
374
|
+
/**
|
|
375
|
+
* The current working directory of the terminal, this overrides the `terminal.integrated.cwd`
|
|
376
|
+
* settings key.
|
|
377
|
+
*/
|
|
378
|
+
cwd?: string | Uri;
|
|
379
|
+
/**
|
|
380
|
+
* A custom environment for the terminal, if this is not set the environment will be inherited
|
|
381
|
+
* from the VS Code process.
|
|
382
|
+
*/
|
|
383
|
+
env?: ITerminalEnvironment;
|
|
384
|
+
/**
|
|
385
|
+
* Whether to ignore a custom cwd from the `terminal.integrated.cwd` settings key (e.g. if the
|
|
386
|
+
* shell is being launched by an extension).
|
|
387
|
+
*/
|
|
388
|
+
ignoreConfigurationCwd?: boolean;
|
|
389
|
+
/** Whether to wait for a key press before closing the terminal. */
|
|
390
|
+
waitOnExit?: boolean | string;
|
|
391
|
+
/**
|
|
392
|
+
* A string including ANSI escape sequences that will be written to the terminal emulator
|
|
393
|
+
* _before_ the terminal process has launched, a trailing \n is added at the end of the string.
|
|
394
|
+
* This allows for example the terminal instance to display a styled message as the first line
|
|
395
|
+
* of the terminal. Use \x1b over \033 or \e for the escape control character.
|
|
396
|
+
*/
|
|
397
|
+
initialText?: string;
|
|
398
|
+
/**
|
|
399
|
+
* Custom PTY/pseudoterminal process to use.
|
|
400
|
+
*/
|
|
401
|
+
customPtyImplementation?: (sessionId: string, cols: number, rows: number) => ITerminalProcessExtHostProxy;
|
|
402
|
+
/**
|
|
403
|
+
* A UUID generated by the extension host process for terminals created on the extension host process.
|
|
404
|
+
*/
|
|
405
|
+
extHostTerminalId?: string;
|
|
406
|
+
/**
|
|
407
|
+
* This is a terminal that attaches to an already running terminal.
|
|
408
|
+
*/
|
|
409
|
+
/**
|
|
410
|
+
* Whether the terminal process environment should be exactly as provided in
|
|
411
|
+
* `TerminalOptions.env`. When this is false (default), the environment will be based on the
|
|
412
|
+
* window's environment and also apply configured platform settings like
|
|
413
|
+
* `terminal.integrated.windows.env` on top. When this is true, the complete environment must be
|
|
414
|
+
* provided as nothing will be inherited from the process or any configuration.
|
|
415
|
+
*/
|
|
416
|
+
strictEnv?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* Whether the terminal process environment will inherit VS Code's "shell environment" that may
|
|
419
|
+
* get sourced from running a login shell depnding on how the application was launched.
|
|
420
|
+
* Consumers that rely on development tools being present in the $PATH should set this to true.
|
|
421
|
+
* This will overwrite the value of the inheritEnv setting.
|
|
422
|
+
*/
|
|
423
|
+
useShellEnvironment?: boolean;
|
|
424
|
+
/**
|
|
425
|
+
* When enabled the terminal will run the process as normal but not be surfaced to the user
|
|
426
|
+
* until `Terminal.show` is called. The typical usage for this is when you need to run
|
|
427
|
+
* something that may need interactivity but only want to tell the user about it when
|
|
428
|
+
* interaction is needed. Note that the terminals will still be exposed to all extensions
|
|
429
|
+
* as normal.
|
|
430
|
+
*/
|
|
431
|
+
hideFromUser?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Whether this terminal is not a terminal that the user directly created and uses, but rather
|
|
434
|
+
* a terminal used to drive some VS Code feature.
|
|
435
|
+
*/
|
|
436
|
+
isFeatureTerminal?: boolean;
|
|
437
|
+
/**
|
|
438
|
+
* Whether this terminal was created by an extension.
|
|
439
|
+
*/
|
|
440
|
+
isExtensionOwnedTerminal?: boolean;
|
|
441
|
+
/**
|
|
442
|
+
* The icon for the terminal, used primarily in the terminal tab.
|
|
443
|
+
*/
|
|
444
|
+
icon?: TerminalIcon;
|
|
445
|
+
/**
|
|
446
|
+
* The color ID to use for this terminal. If not specified it will use the default fallback
|
|
447
|
+
*/
|
|
448
|
+
color?: string | vscode.ThemeColor;
|
|
449
|
+
/**
|
|
450
|
+
* When a parent terminal is provided via API, the group needs
|
|
451
|
+
* to find the index in order to place the child
|
|
452
|
+
* directly to the right of its parent.
|
|
453
|
+
*/
|
|
454
|
+
parentTerminalId?: number;
|
|
455
|
+
/**
|
|
456
|
+
* The dimensions for the instance as set by the user
|
|
457
|
+
* or via Size to Content Width
|
|
458
|
+
*/
|
|
459
|
+
/**
|
|
460
|
+
* Opt-out of the default terminal persistence on restart and reload
|
|
461
|
+
*/
|
|
462
|
+
disablePersistence?: boolean;
|
|
463
|
+
/**
|
|
464
|
+
* 禁用保持 Shell 历史的特性
|
|
465
|
+
*/
|
|
466
|
+
disablePreserveHistory?: boolean;
|
|
467
|
+
location?: TerminalLocation;
|
|
468
|
+
__fromTerminalOptions?: TerminalOptions;
|
|
469
|
+
}
|
|
470
|
+
export interface ICreateTerminalOptions {
|
|
471
|
+
/**
|
|
472
|
+
* unique long id
|
|
473
|
+
* longId = clientId + '|' + uuid()
|
|
474
|
+
*/
|
|
475
|
+
id?: string;
|
|
476
|
+
/**
|
|
477
|
+
* The shell launch config or profile to launch with, when not specified the default terminal
|
|
478
|
+
* profile will be used.
|
|
479
|
+
*/
|
|
480
|
+
config?: IShellLaunchConfig | ITerminalProfile;
|
|
481
|
+
/**
|
|
482
|
+
* The current working directory to start with, this will override IShellLaunchConfig.cwd if
|
|
483
|
+
* specified.
|
|
484
|
+
*/
|
|
485
|
+
cwd?: string | Uri;
|
|
486
|
+
/**
|
|
487
|
+
* The terminal's resource, passed when the terminal has moved windows.
|
|
488
|
+
*/
|
|
489
|
+
resource?: Uri;
|
|
490
|
+
/**
|
|
491
|
+
* The terminal's location (editor or panel), it's terminal parent (split to the right), or editor group
|
|
492
|
+
*/
|
|
493
|
+
location?: ITerminalLocationOptions;
|
|
494
|
+
/**
|
|
495
|
+
* pty 进程退出后是否自动关闭 terminal 控件
|
|
496
|
+
*/
|
|
497
|
+
closeWhenExited?: boolean;
|
|
498
|
+
/**
|
|
499
|
+
* 是否为 TaskExecutor
|
|
500
|
+
*/
|
|
501
|
+
isTaskExecutor?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* 作为 TaskExecutor 时对应的 taskId
|
|
504
|
+
*/
|
|
505
|
+
taskId?: string;
|
|
506
|
+
/**
|
|
507
|
+
* 自定义的参数,由上层集成方自行控制
|
|
508
|
+
*/
|
|
509
|
+
args?: any;
|
|
510
|
+
beforeCreate?: (terminalId: string) => void;
|
|
511
|
+
}
|
|
512
|
+
export declare function asTerminalIcon(iconPath?: Uri | {
|
|
513
|
+
light: Uri;
|
|
514
|
+
dark: Uri;
|
|
515
|
+
} | vscode.ThemeIcon): TerminalIcon | undefined;
|
|
516
|
+
export declare const IPtyService: unique symbol;
|
|
517
|
+
export interface IPtyService {
|
|
518
|
+
onMessage(data: string): void;
|
|
519
|
+
resize(rows: number, cols: number): boolean;
|
|
520
|
+
getCwd(): Promise<string | undefined>;
|
|
521
|
+
getPid(): number;
|
|
522
|
+
getShellName(): string;
|
|
523
|
+
kill(): Promise<void>;
|
|
524
|
+
}
|
|
525
|
+
//# sourceMappingURL=pty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pty.d.ts","sourceRoot":"","sources":["../../src/common/pty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,KAAK,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAEhC,OAAO,EAA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Ac,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;IAEX,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,cAAc,CAC5B,QAAQ,CAAC,EAAE,GAAG,GAAG;IAAE,KAAK,EAAE,GAAG,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,GAAG,MAAM,CAAC,SAAS,GAC5D,YAAY,GAAG,SAAS,CAa1B;AAED,eAAO,MAAM,WAAW,eAAwB,CAAC;AACjD,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5C,MAAM,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtC,MAAM,IAAI,MAAM,CAAC;IACjB,YAAY,IAAI,MAAM,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IPtyService = exports.IExternalTerminalService = exports.ITerminalServiceClient = exports.ITerminalProcessService = exports.ITerminalNodeService = exports.PTY_SERVICE_PROXY_SERVER_PORT = exports.PTY_SERVICE_PROXY_CALLBACK_PROTOCOL = exports.PTY_SERVICE_PROXY_PROTOCOL = exports.ITerminalProcessPath = exports.ITerminalServicePath = void 0;
|
|
4
|
+
exports.asTerminalIcon = asTerminalIcon;
|
|
5
|
+
exports.ITerminalServicePath = 'ITerminalServicePath';
|
|
6
|
+
exports.ITerminalProcessPath = 'ITerminalProcessPath';
|
|
7
|
+
exports.PTY_SERVICE_PROXY_PROTOCOL = 'PTY_SERVICE_PROXY_PROTOCOL';
|
|
8
|
+
exports.PTY_SERVICE_PROXY_CALLBACK_PROTOCOL = 'PTY_SERVICE_PROXY_CALLBACK_PROTOCOL';
|
|
9
|
+
exports.PTY_SERVICE_PROXY_SERVER_PORT = 10111;
|
|
10
|
+
exports.ITerminalNodeService = Symbol('ITerminalNodeService');
|
|
11
|
+
exports.ITerminalProcessService = Symbol('ITerminalProcessService');
|
|
12
|
+
exports.ITerminalServiceClient = Symbol('ITerminalServiceClient');
|
|
13
|
+
// 搜了一下代码,在 OpenSumi 里已经没有地方引用了
|
|
14
|
+
exports.IExternalTerminalService = Symbol('IExternalTerminalService');
|
|
15
|
+
function asTerminalIcon(iconPath) {
|
|
16
|
+
if (!iconPath || typeof iconPath === 'string') {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
if (!('id' in iconPath)) {
|
|
20
|
+
return iconPath;
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
id: iconPath.id,
|
|
24
|
+
color: iconPath.color,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.IPtyService = Symbol('IPtyService');
|
|
28
|
+
//# sourceMappingURL=pty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pty.js","sourceRoot":"","sources":["../../src/common/pty.ts"],"names":[],"mappings":";;;AA2mBA,wCAeC;AAhlBY,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAC9C,QAAA,oBAAoB,GAAG,sBAAsB,CAAC;AAE9C,QAAA,0BAA0B,GAAG,4BAA4B,CAAC;AAC1D,QAAA,mCAAmC,GAAG,qCAAqC,CAAC;AAC5E,QAAA,6BAA6B,GAAG,KAAK,CAAC;AAuPtC,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAetD,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;AAa5D,QAAA,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC;AA6CvE,+BAA+B;AAClB,QAAA,wBAAwB,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAAC;AA2P3E,SAAgB,cAAc,CAC5B,QAA6D;IAE7D,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,CAAC,CAAC,IAAI,IAAI,QAAQ,CAAC,EAAE,CAAC;QACxB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO;QACL,EAAE,EAAE,QAAQ,CAAC,EAAE;QACf,KAAK,EAAE,QAAQ,CAAC,KAAoB;KACrC,CAAC;AACJ,CAAC;AAEY,QAAA,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ThemeType } from '@opensumi/ide-theme/lib/common';
|
|
2
|
+
import { IWidgetGroup } from '../index';
|
|
3
|
+
export declare enum ItemType {
|
|
4
|
+
info = 0,
|
|
5
|
+
add = 1
|
|
6
|
+
}
|
|
7
|
+
export interface ItemProps {
|
|
8
|
+
group?: IWidgetGroup;
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
type?: ItemType;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
onInputBlur?: (id: string) => void;
|
|
14
|
+
onInputEnter?: (id: string, name: string) => void;
|
|
15
|
+
onDropdown?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
16
|
+
onContextMenu?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
17
|
+
getKeybinding?: (command: string) => string;
|
|
18
|
+
onDrop?: (event: React.DragEvent) => void;
|
|
19
|
+
onDragStart?: (event: React.DragEvent) => void;
|
|
20
|
+
provider: ITerminalRenderProvider;
|
|
21
|
+
theme: ThemeType;
|
|
22
|
+
draggable?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const ITerminalRenderProvider: unique symbol;
|
|
25
|
+
export interface ITerminalRenderProvider {
|
|
26
|
+
infoItemRender: React.FunctionComponent<ItemProps>;
|
|
27
|
+
addItemRender: React.FunctionComponent<ItemProps>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/common/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,oBAAY,QAAQ;IAClB,IAAI,IAAI;IACR,GAAG,IAAA;CACJ;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC5D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC/D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,uBAAuB,CAAC;IAClC,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,uBAAuB,eAAmC,CAAC;AACxE,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACnD,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;CACnD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ITerminalRenderProvider = exports.ItemType = void 0;
|
|
4
|
+
var ItemType;
|
|
5
|
+
(function (ItemType) {
|
|
6
|
+
ItemType[ItemType["info"] = 0] = "info";
|
|
7
|
+
ItemType[ItemType["add"] = 1] = "add";
|
|
8
|
+
})(ItemType || (exports.ItemType = ItemType = {}));
|
|
9
|
+
exports.ITerminalRenderProvider = Symbol('TerminalRenderProvider');
|
|
10
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/common/render.ts"],"names":[],"mappings":";;;AAIA,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,uCAAQ,CAAA;IACR,qCAAG,CAAA;AACL,CAAC,EAHW,QAAQ,wBAAR,QAAQ,QAGnB;AAoBY,QAAA,uBAAuB,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Disposable, Event } from '@opensumi/ide-core-common';
|
|
2
|
+
import { IObservable, ISettableObservable } from '@opensumi/ide-monaco/lib/common/observable';
|
|
3
|
+
import { IShellLaunchConfig } from './pty';
|
|
4
|
+
export interface IWidget extends Disposable {
|
|
5
|
+
dynamic: IObservable<number>;
|
|
6
|
+
shadowDynamic: IObservable<number>;
|
|
7
|
+
name: ISettableObservable<string>;
|
|
8
|
+
processName: ISettableObservable<string>;
|
|
9
|
+
id: string;
|
|
10
|
+
element: HTMLDivElement;
|
|
11
|
+
group: IWidgetGroup;
|
|
12
|
+
reuse: boolean;
|
|
13
|
+
recovery: boolean;
|
|
14
|
+
show: boolean;
|
|
15
|
+
error: boolean;
|
|
16
|
+
resize: (dynamic?: number) => void;
|
|
17
|
+
increase: (increment: number) => void;
|
|
18
|
+
rename(name: string): void;
|
|
19
|
+
dispose: () => void;
|
|
20
|
+
onRender: Event<void>;
|
|
21
|
+
onResize: Event<void>;
|
|
22
|
+
onShow: Event<boolean>;
|
|
23
|
+
onError: Event<boolean>;
|
|
24
|
+
}
|
|
25
|
+
export interface IWidgetGroup extends Disposable {
|
|
26
|
+
name: IObservable<string>;
|
|
27
|
+
snapshot: IObservable<string>;
|
|
28
|
+
activated: IObservable<boolean>;
|
|
29
|
+
editable: IObservable<boolean>;
|
|
30
|
+
widgets: IObservable<IWidget[]>;
|
|
31
|
+
id: string;
|
|
32
|
+
options?: IShellLaunchConfig;
|
|
33
|
+
length: number;
|
|
34
|
+
widgetsMap: Map<string, IWidget>;
|
|
35
|
+
last: IWidget;
|
|
36
|
+
addWidget(widget: IWidget): void;
|
|
37
|
+
removeWidgetByIndex: (index: number) => IWidget;
|
|
38
|
+
edit(): void;
|
|
39
|
+
unedit(): void;
|
|
40
|
+
rename(name: string): void;
|
|
41
|
+
dispose: () => void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=resize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../src/common/resize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAE9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC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