@@ -11,14 +11,15 @@ import { Emitter, Event } from 'vs/base/common/event';
11
11
import { Disposable , DisposableStore , IDisposable } from 'vs/base/common/lifecycle' ;
12
12
import { matchesSomeScheme , Schemas } from 'vs/base/common/network' ;
13
13
import { basename } from 'vs/base/common/path' ;
14
- import { basenameOrAuthority } from 'vs/base/common/resources' ;
14
+ import { basenameOrAuthority , isEqualAuthority } from 'vs/base/common/resources' ;
15
15
import { ThemeIcon } from 'vs/base/common/themables' ;
16
16
import { URI } from 'vs/base/common/uri' ;
17
17
import { localize } from 'vs/nls' ;
18
18
import { FileKind } from 'vs/platform/files/common/files' ;
19
19
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
20
20
import { WorkbenchList } from 'vs/platform/list/browser/listService' ;
21
21
import { IOpenerService } from 'vs/platform/opener/common/opener' ;
22
+ import { IProductService } from 'vs/platform/product/common/productService' ;
22
23
import { IThemeService } from 'vs/platform/theme/common/themeService' ;
23
24
import { IResourceLabel , ResourceLabels } from 'vs/workbench/browser/labels' ;
24
25
import { ColorScheme } from 'vs/workbench/browser/web.api' ;
@@ -29,6 +30,7 @@ import { IChatContentReference, IChatWarningMessage } from 'vs/workbench/contrib
29
30
import { IChatVariablesService } from 'vs/workbench/contrib/chat/common/chatVariables' ;
30
31
import { IChatRendererContent , IChatResponseViewModel } from 'vs/workbench/contrib/chat/common/chatViewModel' ;
31
32
import { createFileIconThemableTreeContainerScope } from 'vs/workbench/contrib/files/browser/views/explorerView' ;
33
+ import { SETTINGS_AUTHORITY } from 'vs/workbench/services/preferences/common/preferences' ;
32
34
33
35
const $ = dom . $ ;
34
36
@@ -243,6 +245,7 @@ class CollapsibleListRenderer implements IListRenderer<IChatCollapsibleListItem,
243
245
private labels :ResourceLabels ,
244
246
@IThemeService private readonly themeService :IThemeService ,
245
247
@IChatVariablesService private readonly chatVariablesService :IChatVariablesService ,
248
+ @IProductService private readonly productService :IProductService ,
246
249
) { }
247
250
248
251
renderTemplate ( container :HTMLElement ) :ICollapsibleListTemplate {
@@ -287,11 +290,15 @@ class CollapsibleListRenderer implements IListRenderer<IChatCollapsibleListItem,
287
290
}
288
291
} else {
289
292
const uri = 'uri' in reference ?reference . uri :reference ;
290
- if ( uri . scheme === 'https' && uri . authority === 'github.com' && uri . path . includes ( '/tree/' ) ) {
293
+ if ( uri . scheme === 'https' && isEqualAuthority ( uri . authority , 'github.com' ) && uri . path . includes ( '/tree/' ) ) {
291
294
// Parse a nicer label for GitHub URIs that point at a particular commit + file
292
295
const label = uri . path . split ( '/' ) . slice ( 1 , 3 ) . join ( '/' ) ;
293
296
const description = uri . path . split ( '/' ) . slice ( 5 ) . join ( '/' ) ;
294
297
templateData . label . setResource ( { resource :uri , name :label , description} , { icon :Codicon . github , title :data . title } ) ;
298
+ } else if ( uri . scheme === this . productService . urlProtocol && isEqualAuthority ( uri . authority , SETTINGS_AUTHORITY ) ) {
299
+ // a nicer label for settings URIs
300
+ const settingId = uri . path . substring ( 1 ) ;
301
+ templateData . label . setResource ( { resource :uri , name :settingId } , { icon :Codicon . settingsGear , title :localize ( 'setting.hover' , "Open setting '{0}'" , settingId ) } ) ;
295
302
} else if ( matchesSomeScheme ( uri , Schemas . mailto , Schemas . http , Schemas . https ) ) {
296
303
templateData . label . setResource ( { resource :uri , name :uri . toString ( ) } , { icon :icon ?? Codicon . globe , title :data . title } ) ;
297
304
} else {