@@ -52,6 +52,8 @@ import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/b
52
52
import { INotificationService } from 'vs/platform/notification/common/notification' ;
53
53
import { ThemeIcon } from 'vs/platform/theme/common/themeService' ;
54
54
import { formatMessageForTerminal } from 'vs/platform/terminal/common/terminalStrings' ;
55
+ import { GroupKind } from 'vs/workbench/contrib/tasks/common/taskConfiguration' ;
56
+ import { Codicon } from 'vs/base/common/codicons' ;
55
57
56
58
interface ITerminalData {
57
59
terminal : ITerminalInstance ;
@@ -1029,13 +1031,21 @@ export class TerminalTaskSystem extends Disposable implements ITaskSystem {
1029
1031
os,
1030
1032
remoteAuthority : this . _environmentService . remoteAuthority
1031
1033
} ) ;
1034
+ let icon : URI | ThemeIcon | { light : URI ; dark : URI } | undefined ;
1035
+ if ( task . configurationProperties . icon ) {
1036
+ icon = ThemeIcon . fromId ( task . configurationProperties . icon ) ;
1037
+ } else {
1038
+ const taskGroupKind = task . configurationProperties . group ? GroupKind . to ( task . configurationProperties . group ) : undefined ;
1039
+ const kindId = typeof taskGroupKind === 'string' ? taskGroupKind : taskGroupKind ?. kind ;
1040
+ icon = kindId === 'test' ? ThemeIcon . fromId ( Codicon . beaker . id ) : defaultProfile . icon ;
1041
+ }
1032
1042
shellLaunchConfig = {
1033
1043
name : terminalName ,
1034
1044
type,
1035
1045
executable : defaultProfile . path ,
1036
1046
args : defaultProfile . args ,
1037
1047
env : { ...defaultProfile . env } ,
1038
- icon : task . configurationProperties . icon ? ThemeIcon . fromId ( task . configurationProperties . icon ) : defaultProfile . icon ,
1048
+ icon,
1039
1049
color : task . configurationProperties . color || defaultProfile . color ,
1040
1050
waitOnExit
1041
1051
} ;
0 commit comments