Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
d684db7b
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,发现更多精彩内容 >>
未验证
提交
d684db7b
编写于
3月 26, 2021
作者:
D
Daniel Imms
提交者:
GitHub
3月 26, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #119970 from microsoft/tyriar/quickLaunch
Remove quick launch terminology from code
上级
8804de8e
d02a4aac
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
16 addition
and
17 deletion
+16
-17
src/vs/workbench/api/browser/mainThreadTerminalService.ts
src/vs/workbench/api/browser/mainThreadTerminalService.ts
+1
-1
src/vs/workbench/api/common/extHost.protocol.ts
src/vs/workbench/api/common/extHost.protocol.ts
+1
-2
src/vs/workbench/api/common/extHostTerminalService.ts
src/vs/workbench/api/common/extHostTerminalService.ts
+2
-2
src/vs/workbench/api/node/extHostTerminalService.ts
src/vs/workbench/api/node/extHostTerminalService.ts
+2
-2
src/vs/workbench/contrib/terminal/browser/terminalService.ts
src/vs/workbench/contrib/terminal/browser/terminalService.ts
+2
-2
src/vs/workbench/contrib/terminal/common/terminal.ts
src/vs/workbench/contrib/terminal/common/terminal.ts
+1
-1
src/vs/workbench/contrib/terminal/node/terminalProfiles.ts
src/vs/workbench/contrib/terminal/node/terminalProfiles.ts
+7
-7
未找到文件。
src/vs/workbench/api/browser/mainThreadTerminalService.ts
浏览文件 @
d684db7b
...
...
@@ -355,7 +355,7 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
private
async
_onRequestAvailableProfiles
(
req
:
IAvailableProfilesRequest
):
Promise
<
void
>
{
if
(
this
.
_isPrimaryExtHost
()
&&
this
.
_extHostKind
!==
ExtensionHostKind
.
LocalWebWorker
)
{
req
.
callback
(
await
this
.
_proxy
.
$getAvailableProfiles
(
req
.
quickLaunch
Only
));
req
.
callback
(
await
this
.
_proxy
.
$getAvailableProfiles
(
req
.
configuredProfiles
Only
));
}
}
...
...
src/vs/workbench/api/common/extHost.protocol.ts
浏览文件 @
d684db7b
...
...
@@ -1657,8 +1657,7 @@ export interface ExtHostTerminalServiceShape {
$acceptProcessRequestCwd
(
id
:
number
):
void
;
$acceptProcessRequestLatency
(
id
:
number
):
number
;
$acceptWorkspacePermissionsChanged
(
isAllowed
:
boolean
):
void
;
// TODO: Change quickLaunchOnly to "includeAutoDetected" or something similar
$getAvailableProfiles
(
quickLaunchOnly
:
boolean
):
Promise
<
ITerminalProfile
[]
>
;
$getAvailableProfiles
(
configuredProfilesOnly
:
boolean
):
Promise
<
ITerminalProfile
[]
>
;
$getDefaultShellAndArgs
(
useAutomationShell
:
boolean
):
Promise
<
IShellAndArgsDto
>
;
$provideLinks
(
id
:
number
,
line
:
string
):
Promise
<
ITerminalLinkDto
[]
>
;
$activateLink
(
id
:
number
,
linkId
:
number
):
void
;
...
...
src/vs/workbench/api/common/extHostTerminalService.ts
浏览文件 @
d684db7b
...
...
@@ -328,7 +328,7 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
public
abstract
createTerminalFromOptions
(
options
:
vscode
.
TerminalOptions
):
vscode
.
Terminal
;
public
abstract
getDefaultShell
(
useAutomationShell
:
boolean
,
configProvider
:
ExtHostConfigProvider
):
string
;
public
abstract
getDefaultShellArgs
(
useAutomationShell
:
boolean
,
configProvider
:
ExtHostConfigProvider
):
string
[]
|
string
;
public
abstract
$getAvailableProfiles
(
quickLaunch
Only
:
boolean
):
Promise
<
ITerminalProfile
[]
>
;
public
abstract
$getAvailableProfiles
(
configuredProfiles
Only
:
boolean
):
Promise
<
ITerminalProfile
[]
>
;
public
abstract
$getDefaultShellAndArgs
(
useAutomationShell
:
boolean
):
Promise
<
IShellAndArgsDto
>
;
public
abstract
$acceptWorkspacePermissionsChanged
(
isAllowed
:
boolean
):
void
;
...
...
@@ -779,7 +779,7 @@ export class WorkerExtHostTerminalService extends BaseExtHostTerminalService {
throw
new
NotSupportedError
();
}
public
$getAvailableProfiles
(
quickLaunch
Only
:
boolean
):
Promise
<
ITerminalProfile
[]
>
{
public
$getAvailableProfiles
(
configuredProfiles
Only
:
boolean
):
Promise
<
ITerminalProfile
[]
>
{
throw
new
NotSupportedError
();
}
...
...
src/vs/workbench/api/node/extHostTerminalService.ts
浏览文件 @
d684db7b
...
...
@@ -136,9 +136,9 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
return
this
.
_variableResolver
;
}
public
async
$getAvailableProfiles
(
quickLaunch
Only
:
boolean
):
Promise
<
ITerminalProfile
[]
>
{
public
async
$getAvailableProfiles
(
configuredProfiles
Only
:
boolean
):
Promise
<
ITerminalProfile
[]
>
{
const
config
=
await
(
await
this
.
_extHostConfiguration
.
getConfigProvider
()).
getConfiguration
().
get
(
'
terminal.integrated
'
);
return
detectAvailableProfiles
(
quickLaunch
Only
,
this
.
_logService
,
config
as
ITerminalConfiguration
,
await
this
.
_variableResolverPromise
,
this
.
_lastActiveWorkspace
);
return
detectAvailableProfiles
(
configuredProfiles
Only
,
this
.
_logService
,
config
as
ITerminalConfiguration
,
await
this
.
_variableResolverPromise
,
this
.
_lastActiveWorkspace
);
}
public
async
$getDefaultShellAndArgs
(
useAutomationShell
:
boolean
):
Promise
<
IShellAndArgsDto
>
{
...
...
src/vs/workbench/contrib/terminal/browser/terminalService.ts
浏览文件 @
d684db7b
...
...
@@ -361,14 +361,14 @@ export class TerminalService implements ITerminalService {
return
this
.
_updateAvailableProfilesNow
();
}
private
async
_detectProfiles
(
quickLaunch
Only
:
boolean
):
Promise
<
ITerminalProfile
[]
>
{
private
async
_detectProfiles
(
configuredProfiles
Only
:
boolean
):
Promise
<
ITerminalProfile
[]
>
{
await
this
.
_extensionService
.
whenInstalledExtensionsRegistered
();
// Wait for the remoteAuthority to be ready (and listening for events) before firing
// the event to spawn the ext host process
const
conn
=
this
.
_remoteAgentService
.
getConnection
();
const
remoteAuthority
=
conn
?
conn
.
remoteAuthority
:
'
null
'
;
await
this
.
_whenExtHostReady
(
remoteAuthority
);
return
new
Promise
(
r
=>
this
.
_onRequestAvailableProfiles
.
fire
({
callback
:
r
,
quickLaunchOnly
:
quickLaunch
Only
}));
return
new
Promise
(
r
=>
this
.
_onRequestAvailableProfiles
.
fire
({
callback
:
r
,
configuredProfilesOnly
:
configuredProfiles
Only
}));
}
private
async
_whenExtHostReady
(
remoteAuthority
:
string
):
Promise
<
void
>
{
...
...
src/vs/workbench/contrib/terminal/common/terminal.ts
浏览文件 @
d684db7b
...
...
@@ -262,7 +262,7 @@ export type ITerminalProfileObject = ITerminalExecutable | ITerminalProfileSourc
export
interface
IAvailableProfilesRequest
{
callback
:
(
shells
:
ITerminalProfile
[])
=>
void
;
quickLaunch
Only
:
boolean
;
configuredProfiles
Only
:
boolean
;
}
export
interface
IDefaultShellAndArgsRequest
{
useAutomationShell
:
boolean
;
...
...
src/vs/workbench/contrib/terminal/node/terminalProfiles.ts
浏览文件 @
d684db7b
...
...
@@ -17,11 +17,11 @@ import * as pfs from 'vs/base/node/pfs';
let
profileSources
:
Map
<
string
,
IPotentialTerminalProfile
>
|
undefined
;
export
function
detectAvailableProfiles
(
quickLaunch
Only
:
boolean
,
logService
?:
ILogService
,
config
?:
ITerminalConfiguration
,
variableResolver
?:
ExtHostVariableResolverService
,
workspaceFolder
?:
IWorkspaceFolder
,
statProvider
?:
IStatProvider
,
testPaths
?:
string
[]):
Promise
<
ITerminalProfile
[]
>
{
return
platform
.
isWindows
?
detectAvailableWindowsProfiles
(
quickLaunchOnly
,
statProvider
,
logService
,
config
?.
displayDetectedWslProfiles
,
config
?.
profiles
.
windows
,
variableResolver
,
workspaceFolder
)
:
detectAvailableUnixProfiles
(
statProvider
,
logService
,
quickLaunch
Only
,
platform
.
isMacintosh
?
config
?.
profiles
.
osx
:
config
?.
profiles
.
linux
,
testPaths
,
variableResolver
,
workspaceFolder
);
export
function
detectAvailableProfiles
(
configuredProfiles
Only
:
boolean
,
logService
?:
ILogService
,
config
?:
ITerminalConfiguration
,
variableResolver
?:
ExtHostVariableResolverService
,
workspaceFolder
?:
IWorkspaceFolder
,
statProvider
?:
IStatProvider
,
testPaths
?:
string
[]):
Promise
<
ITerminalProfile
[]
>
{
return
platform
.
isWindows
?
detectAvailableWindowsProfiles
(
configuredProfilesOnly
,
statProvider
,
logService
,
config
?.
displayDetectedWslProfiles
,
config
?.
profiles
.
windows
,
variableResolver
,
workspaceFolder
)
:
detectAvailableUnixProfiles
(
statProvider
,
logService
,
configuredProfiles
Only
,
platform
.
isMacintosh
?
config
?.
profiles
.
osx
:
config
?.
profiles
.
linux
,
testPaths
,
variableResolver
,
workspaceFolder
);
}
async
function
detectAvailableWindowsProfiles
(
quickLaunch
Only
:
boolean
,
statProvider
?:
IStatProvider
,
logService
?:
ILogService
,
displayDetectedWslProfiles
?:
boolean
,
configProfiles
?:
{
[
key
:
string
]:
ITerminalProfileObject
},
variableResolver
?:
ExtHostVariableResolverService
,
workspaceFolder
?:
IWorkspaceFolder
):
Promise
<
ITerminalProfile
[]
>
{
async
function
detectAvailableWindowsProfiles
(
configuredProfiles
Only
:
boolean
,
statProvider
?:
IStatProvider
,
logService
?:
ILogService
,
displayDetectedWslProfiles
?:
boolean
,
configProfiles
?:
{
[
key
:
string
]:
ITerminalProfileObject
},
variableResolver
?:
ExtHostVariableResolverService
,
workspaceFolder
?:
IWorkspaceFolder
):
Promise
<
ITerminalProfile
[]
>
{
// Determine the correct System32 path. We want to point to Sysnative
// when the 32-bit version of VS Code is running on a 64-bit machine.
// The reason for this is because PowerShell's important PSReadline
...
...
@@ -40,7 +40,7 @@ async function detectAvailableWindowsProfiles(quickLaunchOnly: boolean, statProv
const
detectedProfiles
:
Map
<
string
,
ITerminalProfileObject
>
=
new
Map
();
// Add auto detected profiles
if
(
!
quickLaunch
Only
)
{
if
(
!
configuredProfiles
Only
)
{
detectedProfiles
.
set
(
'
PowerShell
'
,
{
source
:
ProfileSource
.
Pwsh
,
isAutoDetected
:
true
});
detectedProfiles
.
set
(
'
Git Bash
'
,
{
source
:
ProfileSource
.
GitBash
,
isAutoDetected
:
true
});
detectedProfiles
.
set
(
'
Cygwin
'
,
{
...
...
@@ -63,7 +63,7 @@ async function detectAvailableWindowsProfiles(quickLaunchOnly: boolean, statProv
const
resultProfiles
:
ITerminalProfile
[]
=
await
transformToTerminalProfiles
(
detectedProfiles
.
entries
(),
logService
,
statProvider
,
variableResolver
,
workspaceFolder
);
if
(
!
quickLaunchOnly
||
(
quickLaunch
Only
&&
displayDetectedWslProfiles
))
{
if
(
!
configuredProfilesOnly
||
(
configuredProfiles
Only
&&
displayDetectedWslProfiles
))
{
resultProfiles
.
push
(...
await
getWslProfiles
(
`
${
system32Path
}
\
\$
{useWSLexe ? 'wsl.exe' : 'bash.exe'}`
,
displayDetectedWslProfiles
));
}
...
...
@@ -190,11 +190,11 @@ async function getWslProfiles(wslPath: string, displayDetectedWslProfiles?: bool
return
[];
}
async
function
detectAvailableUnixProfiles
(
statProvider
?:
IStatProvider
,
logService
?:
ILogService
,
quickLaunch
Only
?:
boolean
,
configProfiles
?:
{
[
key
:
string
]:
ITerminalProfileObject
},
testPaths
?:
string
[],
variableResolver
?:
ExtHostVariableResolverService
,
workspaceFolder
?:
IWorkspaceFolder
):
Promise
<
ITerminalProfile
[]
>
{
async
function
detectAvailableUnixProfiles
(
statProvider
?:
IStatProvider
,
logService
?:
ILogService
,
configuredProfiles
Only
?:
boolean
,
configProfiles
?:
{
[
key
:
string
]:
ITerminalProfileObject
},
testPaths
?:
string
[],
variableResolver
?:
ExtHostVariableResolverService
,
workspaceFolder
?:
IWorkspaceFolder
):
Promise
<
ITerminalProfile
[]
>
{
const
detectedProfiles
:
Map
<
string
,
ITerminalProfileObject
>
=
new
Map
();
// Add non-quick launch profiles
if
(
!
quickLaunch
Only
)
{
if
(
!
configuredProfiles
Only
)
{
const
contents
=
await
fs
.
promises
.
readFile
(
'
/etc/shells
'
,
'
utf8
'
);
const
profiles
=
testPaths
||
contents
.
split
(
'
\n
'
).
filter
(
e
=>
e
.
trim
().
indexOf
(
'
#
'
)
!==
0
&&
e
.
trim
().
length
>
0
);
const
counts
:
Map
<
string
,
number
>
=
new
Map
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录