Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
3c71e404
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3c71e404
编写于
7月 24, 2019
作者:
D
Daniel Imms
提交者:
GitHub
7月 24, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #77664 from lramos15/shell-path-error-remote
Allows terminal errors to work in the remote case
上级
9f5fffe7
0927be89
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
33 addition
and
2 deletion
+33
-2
src/vs/workbench/api/browser/mainThreadTerminalService.ts
src/vs/workbench/api/browser/mainThreadTerminalService.ts
+7
-0
src/vs/workbench/api/common/extHost.protocol.ts
src/vs/workbench/api/common/extHost.protocol.ts
+3
-2
src/vs/workbench/api/node/extHostTerminalService.ts
src/vs/workbench/api/node/extHostTerminalService.ts
+1
-0
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
...vs/workbench/contrib/terminal/browser/terminalInstance.ts
+8
-0
src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts
...kbench/contrib/terminal/browser/terminalProcessManager.ts
+5
-0
src/vs/workbench/contrib/terminal/common/terminal.ts
src/vs/workbench/contrib/terminal/common/terminal.ts
+3
-0
src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts
...ch/contrib/terminal/common/terminalProcessExtHostProxy.ts
+6
-0
未找到文件。
src/vs/workbench/api/browser/mainThreadTerminalService.ts
浏览文件 @
3c71e404
...
...
@@ -323,6 +323,13 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
this
.
_getTerminalProcess
(
terminalId
).
then
(
e
=>
e
.
emitCwd
(
cwd
));
}
public
$sendResolvedLaunchConfig
(
terminalId
:
number
,
shellLaunchConfig
:
IShellLaunchConfig
):
void
{
const
instance
=
this
.
_terminalService
.
getInstanceFromId
(
terminalId
);
if
(
instance
)
{
this
.
_getTerminalProcess
(
terminalId
).
then
(
e
=>
e
.
emitResolvedShellLaunchConfig
(
shellLaunchConfig
));
}
}
private
async
_onRequestLatency
(
terminalId
:
number
):
Promise
<
void
>
{
const
COUNT
=
2
;
let
sum
=
0
;
...
...
src/vs/workbench/api/common/extHost.protocol.ts
浏览文件 @
3c71e404
...
...
@@ -42,7 +42,7 @@ import { IRevealOptions, ITreeItem } from 'vs/workbench/common/views';
import
*
as
callHierarchy
from
'
vs/workbench/contrib/callHierarchy/common/callHierarchy
'
;
import
{
IAdapterDescriptor
,
IConfig
,
ITerminalSettings
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
ITextQueryBuilderOptions
}
from
'
vs/workbench/contrib/search/common/queryBuilder
'
;
import
{
ITerminalDimensions
}
from
'
vs/workbench/contrib/terminal/common/terminal
'
;
import
{
ITerminalDimensions
,
IShellLaunchConfig
}
from
'
vs/workbench/contrib/terminal/common/terminal
'
;
import
{
ExtensionActivationError
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
createExtHostContextProxyIdentifier
as
createExtId
,
createMainContextProxyIdentifier
as
createMainId
,
IRPCProtocol
}
from
'
vs/workbench/services/extensions/common/proxyIdentifier
'
;
import
*
as
search
from
'
vs/workbench/services/search/common/search
'
;
...
...
@@ -407,9 +407,10 @@ export interface MainThreadTerminalServiceShape extends IDisposable {
$sendProcessData
(
terminalId
:
number
,
data
:
string
):
void
;
$sendProcessReady
(
terminalId
:
number
,
pid
:
number
,
cwd
:
string
):
void
;
$sendProcessExit
(
terminalId
:
number
,
exitCode
:
number
):
void
;
$sendOverrideDimensions
(
terminalId
:
number
,
dimensions
:
ITerminalDimensions
|
undefined
):
void
;
$sendProcessInitialCwd
(
terminalId
:
number
,
cwd
:
string
):
void
;
$sendProcessCwd
(
terminalId
:
number
,
initialCwd
:
string
):
void
;
$sendOverrideDimensions
(
terminalId
:
number
,
dimensions
:
ITerminalDimensions
|
undefined
):
void
;
$sendResolvedLaunchConfig
(
terminalId
:
number
,
shellLaunchConfig
:
IShellLaunchConfig
):
void
;
// Renderer
$terminalRendererSetName
(
terminalId
:
number
,
name
:
string
):
void
;
...
...
src/vs/workbench/api/node/extHostTerminalService.ts
浏览文件 @
3c71e404
...
...
@@ -610,6 +610,7 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
baseEnv
);
this
.
_proxy
.
$sendResolvedLaunchConfig
(
id
,
shellLaunchConfig
);
// Fork the process and listen for messages
this
.
_logService
.
debug
(
`Terminal process launching on ext host`
,
shellLaunchConfig
,
initialCwd
,
cols
,
rows
,
env
);
// TODO: Support conpty on remote, it doesn't seem to work for some reason?
...
...
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
浏览文件 @
3c71e404
...
...
@@ -968,6 +968,7 @@ export class TerminalInstance implements ITerminalInstance {
this
.
_processManager
.
onProcessExit
(
exitCode
=>
this
.
_onProcessExit
(
exitCode
));
this
.
_processManager
.
onProcessData
(
data
=>
this
.
_onData
.
fire
(
data
));
this
.
_processManager
.
onProcessOverrideDimensions
(
e
=>
this
.
setDimensions
(
e
));
this
.
_processManager
.
onProcessResolvedShellLaunchConfig
(
e
=>
this
.
_setResolvedShellLaunchConfig
(
e
));
if
(
this
.
_shellLaunchConfig
.
name
)
{
this
.
setTitle
(
this
.
_shellLaunchConfig
.
name
,
false
);
...
...
@@ -1379,6 +1380,13 @@ export class TerminalInstance implements ITerminalInstance {
this
.
_resize
();
}
private
_setResolvedShellLaunchConfig
(
shellLaunchConfig
:
IShellLaunchConfig
):
void
{
this
.
_shellLaunchConfig
.
args
=
shellLaunchConfig
.
args
;
this
.
_shellLaunchConfig
.
cwd
=
shellLaunchConfig
.
cwd
;
this
.
_shellLaunchConfig
.
executable
=
shellLaunchConfig
.
executable
;
this
.
_shellLaunchConfig
.
env
=
shellLaunchConfig
.
env
;
}
private
_getXtermTheme
(
theme
?:
ITheme
):
any
{
if
(
!
theme
)
{
theme
=
this
.
_themeService
.
getTheme
();
...
...
src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts
浏览文件 @
3c71e404
...
...
@@ -70,6 +70,8 @@ export class TerminalProcessManager implements ITerminalProcessManager {
public
get
onProcessExit
():
Event
<
number
>
{
return
this
.
_onProcessExit
.
event
;
}
private
readonly
_onProcessOverrideDimensions
=
new
Emitter
<
ITerminalDimensions
|
undefined
>
();
public
get
onProcessOverrideDimensions
():
Event
<
ITerminalDimensions
|
undefined
>
{
return
this
.
_onProcessOverrideDimensions
.
event
;
}
private
readonly
_onProcessOverrideShellLaunchConfig
=
new
Emitter
<
IShellLaunchConfig
>
();
public
get
onProcessResolvedShellLaunchConfig
():
Event
<
IShellLaunchConfig
>
{
return
this
.
_onProcessOverrideShellLaunchConfig
.
event
;
}
constructor
(
private
readonly
_terminalId
:
number
,
...
...
@@ -170,6 +172,9 @@ export class TerminalProcessManager implements ITerminalProcessManager {
if
(
this
.
_process
.
onProcessOverrideDimensions
)
{
this
.
_process
.
onProcessOverrideDimensions
(
e
=>
this
.
_onProcessOverrideDimensions
.
fire
(
e
));
}
if
(
this
.
_process
.
onProcessResolvedShellLaunchConfig
)
{
this
.
_process
.
onProcessResolvedShellLaunchConfig
(
e
=>
this
.
_onProcessOverrideShellLaunchConfig
.
fire
(
e
));
}
setTimeout
(()
=>
{
if
(
this
.
processState
===
ProcessState
.
LAUNCHING
)
{
...
...
src/vs/workbench/contrib/terminal/common/terminal.ts
浏览文件 @
3c71e404
...
...
@@ -709,6 +709,7 @@ export interface ITerminalProcessManager extends IDisposable {
readonly
onProcessTitle
:
Event
<
string
>
;
readonly
onProcessExit
:
Event
<
number
>
;
readonly
onProcessOverrideDimensions
:
Event
<
ITerminalDimensions
|
undefined
>
;
readonly
onProcessResolvedShellLaunchConfig
:
Event
<
IShellLaunchConfig
>
;
dispose
(
immediate
?:
boolean
):
void
;
createProcess
(
shellLaunchConfig
:
IShellLaunchConfig
,
cols
:
number
,
rows
:
number
,
isScreenReaderModeEnabled
:
boolean
):
Promise
<
void
>
;
...
...
@@ -747,6 +748,7 @@ export interface ITerminalProcessExtHostProxy extends IDisposable {
emitReady
(
pid
:
number
,
cwd
:
string
):
void
;
emitExit
(
exitCode
:
number
):
void
;
emitOverrideDimensions
(
dimensions
:
ITerminalDimensions
|
undefined
):
void
;
emitResolvedShellLaunchConfig
(
shellLaunchConfig
:
IShellLaunchConfig
):
void
;
emitInitialCwd
(
initialCwd
:
string
):
void
;
emitCwd
(
cwd
:
string
):
void
;
emitLatency
(
latency
:
number
):
void
;
...
...
@@ -802,6 +804,7 @@ export interface ITerminalChildProcess {
onProcessReady
:
Event
<
{
pid
:
number
,
cwd
:
string
}
>
;
onProcessTitleChanged
:
Event
<
string
>
;
onProcessOverrideDimensions
?:
Event
<
ITerminalDimensions
|
undefined
>
;
onProcessResolvedShellLaunchConfig
?:
Event
<
IShellLaunchConfig
>
;
/**
* Shutdown the terminal process.
...
...
src/vs/workbench/contrib/terminal/common/terminalProcessExtHostProxy.ts
浏览文件 @
3c71e404
...
...
@@ -24,6 +24,8 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal
public
readonly
onProcessTitleChanged
:
Event
<
string
>
=
this
.
_onProcessTitleChanged
.
event
;
private
readonly
_onProcessOverrideDimensions
=
new
Emitter
<
ITerminalDimensions
|
undefined
>
();
public
get
onProcessOverrideDimensions
():
Event
<
ITerminalDimensions
|
undefined
>
{
return
this
.
_onProcessOverrideDimensions
.
event
;
}
private
readonly
_onProcessResolvedShellLaunchConfig
=
new
Emitter
<
IShellLaunchConfig
>
();
public
get
onProcessResolvedShellLaunchConfig
():
Event
<
IShellLaunchConfig
>
{
return
this
.
_onProcessResolvedShellLaunchConfig
.
event
;
}
private
readonly
_onInput
=
this
.
_register
(
new
Emitter
<
string
>
());
public
readonly
onInput
:
Event
<
string
>
=
this
.
_onInput
.
event
;
...
...
@@ -93,6 +95,10 @@ export class TerminalProcessExtHostProxy extends Disposable implements ITerminal
this
.
_onProcessOverrideDimensions
.
fire
(
dimensions
);
}
public
emitResolvedShellLaunchConfig
(
shellLaunchConfig
:
IShellLaunchConfig
):
void
{
this
.
_onProcessResolvedShellLaunchConfig
.
fire
(
shellLaunchConfig
);
}
public
emitInitialCwd
(
initialCwd
:
string
):
void
{
while
(
this
.
_pendingInitialCwdRequests
.
length
>
0
)
{
this
.
_pendingInitialCwdRequests
.
pop
()
!
(
initialCwd
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录