@codingame/monaco-vscode-search-service-override 4.5.2 → 5.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-search-service-override",
3
- "version": "4.5.2",
3
+ "version": "5.0.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -29,6 +29,6 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "vscode": "npm:@codingame/monaco-vscode-api@4.5.2"
32
+ "vscode": "npm:@codingame/monaco-vscode-api@5.0.1"
33
33
  }
34
34
  }
@@ -50,6 +50,7 @@ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
50
50
  import { ASK_QUICK_QUESTION_ACTION_ID } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions';
51
51
  import { IQuickChatService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat.service';
52
52
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
53
+ import { ICustomEditorLabelService } from 'vscode/vscode/vs/workbench/services/editor/common/customEditorLabelService.service';
53
54
 
54
55
  var AnythingQuickAccessProvider_1;
55
56
  const _moduleId = "vs/workbench/contrib/search/browser/anythingQuickAccess";
@@ -72,7 +73,7 @@ let AnythingQuickAccessProvider = class AnythingQuickAccessProvider extends Pick
72
73
  }
73
74
  return undefined;
74
75
  }
75
- constructor(instantiationService, searchService, contextService, pathService, environmentService, fileService, labelService, modelService, languageService, workingCopyService, configurationService, editorService, historyService, filesConfigurationService, textModelService, uriIdentityService, quickInputService, keybindingService, quickChatService, logService) {
76
+ constructor(instantiationService, searchService, contextService, pathService, environmentService, fileService, labelService, modelService, languageService, workingCopyService, configurationService, editorService, historyService, filesConfigurationService, textModelService, uriIdentityService, quickInputService, keybindingService, quickChatService, logService, customEditorLabelService) {
76
77
  super(AnythingQuickAccessProvider_1.PREFIX, {
77
78
  canAcceptInBackground: true,
78
79
  noResultsPick: AnythingQuickAccessProvider_1.NO_RESULTS_PICK
@@ -97,6 +98,7 @@ let AnythingQuickAccessProvider = class AnythingQuickAccessProvider extends Pick
97
98
  this.keybindingService = keybindingService;
98
99
  this.quickChatService = quickChatService;
99
100
  this.logService = logService;
101
+ this.customEditorLabelService = customEditorLabelService;
100
102
  this.pickState = this._register(new (class extends Disposable {
101
103
  constructor(provider, instantiationService) {
102
104
  super();
@@ -650,8 +652,9 @@ let AnythingQuickAccessProvider = class AnythingQuickAccessProvider extends Pick
650
652
  }
651
653
  else {
652
654
  resource = URI.isUri(resourceOrEditor) ? resourceOrEditor : resourceOrEditor.resource;
653
- label = basenameOrAuthority(resource);
654
- description = this.labelService.getUriLabel(dirname(resource), { relative: true });
655
+ const customLabel = this.customEditorLabelService.getName(resource);
656
+ label = customLabel || basenameOrAuthority(resource);
657
+ description = this.labelService.getUriLabel(!!customLabel ? resource : dirname(resource), { relative: true });
655
658
  isDirty = this.workingCopyService.isDirty(resource) && !this.filesConfigurationService.hasShortAutoSaveDelay(resource);
656
659
  extraClasses = [];
657
660
  }
@@ -754,7 +757,8 @@ AnythingQuickAccessProvider = AnythingQuickAccessProvider_1 = ( (__decorate([
754
757
  ( (__param(16, IQuickInputService))),
755
758
  ( (__param(17, IKeybindingService))),
756
759
  ( (__param(18, IQuickChatService))),
757
- ( (__param(19, ILogService)))
760
+ ( (__param(19, ILogService))),
761
+ ( (__param(20, ICustomEditorLabelService)))
758
762
  ], AnythingQuickAccessProvider)));
759
763
 
760
764
  export { AnythingQuickAccessProvider };
@@ -1,6 +1,6 @@
1
1
  import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
2
2
 
3
- var css = ".quick-input-list .quick-input-list-entry.has-actions:hover .quick-input-list-entry-action-bar .action-label.dirty-anything:before{content:\"\\ea76\";font-family:codicon}";
3
+ var css = ".quick-input-list .quick-input-list-entry.has-actions:hover .quick-input-list-entry-action-bar .action-label.dirty-anything:before{content:var(--vscode-icon-x-content);font-family:var(--vscode-icon-x-font-family)}";
4
4
  n(css,{});
5
5
 
6
6
  export { css, css as default };
@@ -81,7 +81,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
81
81
  picker.valueSelection = [TEXT_SEARCH_QUICK_ACCESS_PREFIX.length, picker.value.length];
82
82
  }
83
83
  picker.customButton = true;
84
- picker.customLabel = '$(link-external)';
84
+ picker.customLabel = '$(go-to-search)';
85
85
  this.editorViewState.reset();
86
86
  disposables.add(picker.onDidCustom(() => {
87
87
  if (this.searchModel.searchResult.count() > 0) {
@@ -123,9 +123,10 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
123
123
  const searchConfig = this._configurationService.getValue().search;
124
124
  return {
125
125
  openEditorPinned: !editorConfig?.enablePreviewFromQuickOpen || !editorConfig?.enablePreview,
126
- preserveInput: searchConfig.experimental.quickAccess.preserveInput,
126
+ preserveInput: searchConfig.quickAccess.preserveInput,
127
127
  maxResults: searchConfig.maxResults,
128
128
  smartCase: searchConfig.smartCase,
129
+ sortOrder: searchConfig.sortOrder,
129
130
  };
130
131
  }
131
132
  get defaultFilterValue() {
@@ -173,8 +174,18 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
173
174
  viewlet.searchAndReplaceWidget.focus();
174
175
  }
175
176
  }
176
- _getPicksFromMatches(matches, limit) {
177
- matches = matches.sort(searchComparer);
177
+ _getPicksFromMatches(matches, limit, firstFile) {
178
+ matches = matches.sort((a, b) => {
179
+ if (firstFile) {
180
+ if (firstFile === a.resource) {
181
+ return -1;
182
+ }
183
+ else if (firstFile === b.resource) {
184
+ return 1;
185
+ }
186
+ }
187
+ return searchComparer(a, b, this.configuration.sortOrder);
188
+ });
178
189
  const files = matches.length > limit ? matches.slice(0, limit) : matches;
179
190
  const picks = [];
180
191
  for (let fileIndex = 0; fileIndex < matches.length; fileIndex++) {
@@ -285,7 +296,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
285
296
  return null;
286
297
  }
287
298
  const matches = allMatches.syncResults;
288
- const syncResult = this._getPicksFromMatches(matches, MAX_FILES_SHOWN);
299
+ const syncResult = this._getPicksFromMatches(matches, MAX_FILES_SHOWN, this._editorService.activeEditor?.resource);
289
300
  if (syncResult.length > 0) {
290
301
  this.searchModel.searchResult.toggleHighlights(true);
291
302
  }
@@ -32,6 +32,7 @@ import './searchActionsSymbol.js';
32
32
  import './searchActionsTopBar.js';
33
33
  import './searchActionsTextQuickAccess.js';
34
34
  import { TextSearchQuickAccess, TEXT_SEARCH_QUICK_ACCESS_PREFIX } from './quickTextSearch/textSearchQuickAccess.js';
35
+ import { Extensions as Extensions$3 } from 'vscode/vscode/vs/workbench/common/configuration';
35
36
 
36
37
  const _moduleId = "vs/workbench/contrib/search/browser/search.contribution";
37
38
  registerContributions();
@@ -95,12 +96,12 @@ quickAccessRegistry.registerQuickAccessProvider({
95
96
  ctor: TextSearchQuickAccess,
96
97
  prefix: TEXT_SEARCH_QUICK_ACCESS_PREFIX,
97
98
  contextKey: 'inTextSearchPicker',
98
- placeholder: ( localizeWithPath(_moduleId, 6, "Search for text in your workspace files (experimental).")),
99
+ placeholder: ( localizeWithPath(_moduleId, 6, "Search for text in your workspace files.")),
99
100
  helpEntries: [
100
101
  {
101
- description: ( localizeWithPath(_moduleId, 7, "Search for Text (Experimental)")),
102
- commandId: "workbench.action.experimental.quickTextSearch" ,
103
- commandCenterOrder: 65,
102
+ description: ( localizeWithPath(_moduleId, 7, "Search for Text")),
103
+ commandId: "workbench.action.quickTextSearch" ,
104
+ commandCenterOrder: 25,
104
105
  }
105
106
  ]
106
107
  });
@@ -248,10 +249,10 @@ configurationRegistry.registerConfiguration({
248
249
  default: true
249
250
  },
250
251
  'search.quickOpen.history.filterSortOrder': {
251
- 'type': 'string',
252
- 'enum': ['default', 'recency'],
253
- 'default': 'default',
254
- 'enumDescriptions': [
252
+ type: 'string',
253
+ enum: ['default', 'recency'],
254
+ default: 'default',
255
+ enumDescriptions: [
255
256
  ( localizeWithPath(
256
257
  _moduleId,
257
258
  25,
@@ -263,7 +264,7 @@ configurationRegistry.registerConfiguration({
263
264
  'History entries are sorted by recency. More recently opened entries appear first.'
264
265
  ))
265
266
  ],
266
- 'description': ( localizeWithPath(
267
+ description: ( localizeWithPath(
267
268
  _moduleId,
268
269
  27,
269
270
  "Controls sorting order of editor history in quick open when filtering."
@@ -471,10 +472,10 @@ configurationRegistry.registerConfiguration({
471
472
  ))
472
473
  },
473
474
  'search.sortOrder': {
474
- 'type': 'string',
475
- 'enum': ["default" , "fileNames" , "type" , "modified" , "countDescending" , "countAscending" ],
476
- 'default': "default" ,
477
- 'enumDescriptions': [
475
+ type: 'string',
476
+ enum: ["default" , "fileNames" , "type" , "modified" , "countDescending" , "countAscending" ],
477
+ default: "default" ,
478
+ enumDescriptions: [
478
479
  ( localizeWithPath(
479
480
  _moduleId,
480
481
  56,
@@ -502,7 +503,7 @@ configurationRegistry.registerConfiguration({
502
503
  )),
503
504
  ( localizeWithPath(_moduleId, 61, "Results are sorted by count per file, in ascending order."))
504
505
  ],
505
- 'description': ( localizeWithPath(_moduleId, 62, "Controls sorting order of search results."))
506
+ description: ( localizeWithPath(_moduleId, 62, "Controls sorting order of search results."))
506
507
  },
507
508
  'search.decorations.colors': {
508
509
  type: 'boolean',
@@ -523,32 +524,32 @@ configurationRegistry.registerConfiguration({
523
524
  default: true
524
525
  },
525
526
  'search.defaultViewMode': {
526
- 'type': 'string',
527
- 'enum': ["tree" , "list" ],
528
- 'default': "list" ,
529
- 'enumDescriptions': [
527
+ type: 'string',
528
+ enum: ["tree" , "list" ],
529
+ default: "list" ,
530
+ enumDescriptions: [
530
531
  ( localizeWithPath(_moduleId, 65, "Shows search results as a tree.")),
531
532
  ( localizeWithPath(_moduleId, 66, "Shows search results as a list."))
532
533
  ],
533
- 'description': ( localizeWithPath(_moduleId, 67, "Controls the default search result view mode."))
534
+ description: ( localizeWithPath(_moduleId, 67, "Controls the default search result view mode."))
534
535
  },
535
- 'search.experimental.closedNotebookRichContentResults': {
536
+ 'search.quickAccess.preserveInput': {
536
537
  type: 'boolean',
537
538
  description: ( localizeWithPath(
538
539
  _moduleId,
539
540
  68,
540
- "Show notebook editor rich content results for closed notebooks. Please refresh your search results after changing this setting."
541
+ "Controls whether the last typed input to Quick Search should be restored when opening it the next time."
541
542
  )),
542
543
  default: false
543
544
  },
544
- 'search.experimental.quickAccess.preserveInput': {
545
- 'type': 'boolean',
546
- 'description': ( localizeWithPath(
545
+ 'search.experimental.closedNotebookRichContentResults': {
546
+ type: 'boolean',
547
+ description: ( localizeWithPath(
547
548
  _moduleId,
548
549
  69,
549
- "Controls whether the last typed input to Quick Search should be restored when opening it the next time."
550
+ "Show notebook editor rich content results for closed notebooks. Please refresh your search results after changing this setting."
550
551
  )),
551
- 'default': false
552
+ default: false
552
553
  },
553
554
  }
554
555
  });
@@ -560,3 +561,11 @@ CommandsRegistry.registerCommand('_executeWorkspaceSymbolProvider', async functi
560
561
  (result.map(item => item.symbol))
561
562
  );
562
563
  });
564
+ ( (Registry.as(Extensions$3.ConfigurationMigration)))
565
+ .registerConfigurationMigrations([{
566
+ key: 'search.experimental.quickAccess.preserveInput',
567
+ migrateFn: (value, _accessor) => ([
568
+ ['search.quickAccess.preserveInput', { value }],
569
+ ['search.experimental.quickAccess.preserveInput', { value: undefined }]
570
+ ])
571
+ }]);
@@ -11,8 +11,8 @@ const _moduleId = "vs/workbench/contrib/search/browser/searchActionsTextQuickAcc
11
11
  registerAction2(class TextSearchQuickAccessAction extends Action2 {
12
12
  constructor() {
13
13
  super({
14
- id: "workbench.action.experimental.quickTextSearch" ,
15
- title: ( localize2WithPath(_moduleId, 0, "Quick Search (Experimental)")),
14
+ id: "workbench.action.quickTextSearch" ,
15
+ title: ( localize2WithPath(_moduleId, 0, "Quick Search")),
16
16
  category,
17
17
  f1: true
18
18
  });
@@ -9,17 +9,16 @@ import { Emitter } from 'vscode/vscode/vs/base/common/event';
9
9
  const _moduleId = "vs/workbench/contrib/search/browser/searchFindInput";
10
10
  const NLS_AI_TOGGLE_LABEL = ( localizeWithPath(_moduleId, 0, "Use AI"));
11
11
  class SearchFindInput extends ContextScopedFindInput {
12
- constructor(container, contextViewProvider, options, contextKeyService, contextMenuService, instantiationService, filters, _shouldShowAIButton,
12
+ constructor(container, contextViewProvider, options, contextKeyService, contextMenuService, instantiationService, filters, shouldShowAIButton,
13
13
  filterStartVisiblitity) {
14
14
  super(container, contextViewProvider, options, contextKeyService);
15
15
  this.contextMenuService = contextMenuService;
16
16
  this.instantiationService = instantiationService;
17
17
  this.filters = filters;
18
- this._shouldShowAIButton = _shouldShowAIButton;
19
18
  this._filterChecked = false;
20
- this._visible = false;
21
19
  this._onDidChangeAIToggle = this._register(( (new Emitter())));
22
20
  this.onDidChangeAIToggle = this._onDidChangeAIToggle.event;
21
+ this.shouldNotebookFilterBeVisible = false;
23
22
  this._findFilter = this._register(( (new NotebookFindInputFilterButton(filters, contextMenuService, instantiationService, options, ( localizeWithPath(_moduleId, 1, "Notebook Find Filters"))))));
24
23
  this._aiButton = this._register(( (new AIToggle({
25
24
  appendTitle: '',
@@ -27,47 +26,61 @@ class SearchFindInput extends ContextScopedFindInput {
27
26
  ...options.toggleStyles
28
27
  }))));
29
28
  this.setAdditionalToggles([this._aiButton]);
30
- this.inputBox.paddingRight = (this.caseSensitive?.width() ?? 0) + (this.wholeWords?.width() ?? 0) + (this.regex?.width() ?? 0) + this._findFilter.width;
29
+ this._updatePadding();
31
30
  this.controls.appendChild(this._findFilter.container);
32
31
  this._findFilter.container.classList.add('monaco-custom-toggle');
33
32
  this.filterVisible = filterStartVisiblitity;
33
+ this.sparkleVisible = shouldShowAIButton;
34
34
  this._register(this._aiButton.onChange(() => {
35
+ if (this.regex) {
36
+ this.regex.visible = !this._aiButton.checked;
37
+ }
38
+ if (this.wholeWords) {
39
+ this.wholeWords.visible = !this._aiButton.checked;
40
+ }
41
+ if (this.caseSensitive) {
42
+ this.caseSensitive.visible = !this._aiButton.checked;
43
+ }
35
44
  if (this._aiButton.checked) {
36
- this.regex?.disable();
37
- this.wholeWords?.disable();
38
- this.caseSensitive?.disable();
39
- this._findFilter.disable();
45
+ this._findFilter.visible = false;
40
46
  }
41
47
  else {
42
- this.regex?.enable();
43
- this.wholeWords?.enable();
44
- this.caseSensitive?.enable();
45
- this._findFilter.enable();
48
+ this.filterVisible = this.shouldNotebookFilterBeVisible;
46
49
  }
50
+ this._updatePadding();
47
51
  }));
48
- this._aiButton.domNode.style.display = _shouldShowAIButton ? '' : 'none';
49
52
  }
50
- set shouldShowAIButton(visible) {
51
- if (this._shouldShowAIButton !== visible) {
52
- this._shouldShowAIButton = visible;
53
- this._aiButton.domNode.style.display = visible ? '' : 'none';
54
- }
53
+ _updatePadding() {
54
+ this.inputBox.paddingRight =
55
+ (this.caseSensitive?.visible ? this.caseSensitive.width() : 0) +
56
+ (this.wholeWords?.visible ? this.wholeWords.width() : 0) +
57
+ (this.regex?.visible ? this.regex.width() : 0) +
58
+ (this._findFilter.visible ? this._findFilter.width() : 0) +
59
+ (this._aiButton.visible ? this._aiButton.width() : 0);
60
+ }
61
+ set sparkleVisible(visible) {
62
+ this._aiButton.visible = visible;
63
+ this._updatePadding();
55
64
  }
56
65
  set filterVisible(visible) {
57
- this._findFilter.container.style.display = visible ? '' : 'none';
58
- this._visible = visible;
59
- this.updateStyles();
66
+ this.shouldNotebookFilterBeVisible = visible;
67
+ if (this._aiButton.visible && this._aiButton.checked) {
68
+ return;
69
+ }
70
+ this._findFilter.visible = visible;
71
+ this.updateFilterStyles();
72
+ this._updatePadding();
60
73
  }
61
74
  setEnabled(enabled) {
62
75
  super.setEnabled(enabled);
63
- if (enabled && (!this._filterChecked || !this._visible)) {
76
+ if (enabled && (!this._filterChecked || !this._findFilter.visible)) {
64
77
  this.regex?.enable();
65
78
  }
66
79
  else {
67
80
  this.regex?.disable();
68
81
  }
69
82
  }
70
- updateStyles() {
83
+ updateFilterStyles() {
71
84
  this._filterChecked =
72
85
  !this.filters.markupInput ||
73
86
  !this.filters.markupPreview ||
@@ -4,7 +4,7 @@ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistr
4
4
 
5
5
  const _moduleId = "vs/workbench/contrib/search/browser/searchIcons";
6
6
  const searchDetailsIcon = registerIcon('search-details', Codicon.ellipsis, ( localizeWithPath(_moduleId, 0, 'Icon to make search details visible.')));
7
- const searchActivityBarIcon = registerIcon('search-see-more', Codicon.linkExternal, ( localizeWithPath(_moduleId, 1, 'Icon to view more context in the search view.')));
7
+ const searchActivityBarIcon = registerIcon('search-see-more', Codicon.goToSearch, ( localizeWithPath(_moduleId, 1, 'Icon to view more context in the search view.')));
8
8
  const searchShowContextIcon = registerIcon('search-show-context', Codicon.listSelection, ( localizeWithPath(_moduleId, 2, 'Icon for toggle the context in the search editor.')));
9
9
  const searchHideReplaceIcon = registerIcon('search-hide-replace', Codicon.chevronRight, ( localizeWithPath(_moduleId, 3, 'Icon to collapse the replace section in the search view.')));
10
10
  const searchShowReplaceIcon = registerIcon('search-show-replace', Codicon.chevronDown, ( localizeWithPath(_moduleId, 4, 'Icon to expand the replace section in the search view.')));
@@ -17,8 +17,8 @@ import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/
17
17
  import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
18
18
  import { defaultCountBadgeStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
19
19
  import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
20
- import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
21
20
  import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
21
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
22
22
 
23
23
  var FolderMatchRenderer_1, FileMatchRenderer_1, MatchRenderer_1;
24
24
  const _moduleId = "vs/workbench/contrib/search/browser/searchResultsView";
@@ -225,13 +225,14 @@ FileMatchRenderer = FileMatchRenderer_1 = ( (__decorate([
225
225
  let MatchRenderer = class MatchRenderer extends Disposable {
226
226
  static { MatchRenderer_1 = this; }
227
227
  static { this.TEMPLATE_ID = 'match'; }
228
- constructor(searchView, contextService, configurationService, instantiationService, contextKeyService) {
228
+ constructor(searchView, contextService, configurationService, instantiationService, contextKeyService, hoverService) {
229
229
  super();
230
230
  this.searchView = searchView;
231
231
  this.contextService = contextService;
232
232
  this.configurationService = configurationService;
233
233
  this.instantiationService = instantiationService;
234
234
  this.contextKeyService = contextKeyService;
235
+ this.hoverService = hoverService;
235
236
  this.templateId = MatchRenderer_1.TEMPLATE_ID;
236
237
  }
237
238
  renderCompressedElements(node, index, templateData, height) {
@@ -285,7 +286,7 @@ let MatchRenderer = class MatchRenderer extends Disposable {
285
286
  templateData.replace.textContent = replace ? match.replaceString : '';
286
287
  templateData.after.textContent = preview.after;
287
288
  const title = (preview.fullBefore + (replace ? match.replaceString : preview.inside) + preview.after).trim().substr(0, 999);
288
- templateData.disposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), templateData.parent, title));
289
+ templateData.disposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), templateData.parent, title));
289
290
  SearchContext.IsEditableItemKey.bindTo(templateData.contextKeyService).set(!(match instanceof MatchInNotebook && match.isReadonly()));
290
291
  const numLines = match.range().endLineNumber - match.range().startLineNumber;
291
292
  const extraLinesStr = numLines > 0 ? `+${numLines}` : '';
@@ -293,7 +294,7 @@ let MatchRenderer = class MatchRenderer extends Disposable {
293
294
  const lineNumberStr = showLineNumbers ? `${match.range().startLineNumber}:` : '';
294
295
  templateData.lineNumber.classList.toggle('show', (numLines > 0) || showLineNumbers);
295
296
  templateData.lineNumber.textContent = lineNumberStr + extraLinesStr;
296
- templateData.disposables.add(setupCustomHover(getDefaultHoverDelegate('mouse'), templateData.lineNumber, this.getMatchTitle(match, showLineNumbers)));
297
+ templateData.disposables.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), templateData.lineNumber, this.getMatchTitle(match, showLineNumbers)));
297
298
  templateData.actions.context = { viewer: this.searchView.getControl(), element: match };
298
299
  }
299
300
  disposeTemplate(templateData) {
@@ -315,7 +316,8 @@ MatchRenderer = MatchRenderer_1 = ( (__decorate([
315
316
  ( (__param(1, IWorkspaceContextService))),
316
317
  ( (__param(2, IConfigurationService))),
317
318
  ( (__param(3, IInstantiationService))),
318
- ( (__param(4, IContextKeyService)))
319
+ ( (__param(4, IContextKeyService))),
320
+ ( (__param(5, IHoverService)))
319
321
  ], MatchRenderer)));
320
322
  let SearchAccessibilityProvider = class SearchAccessibilityProvider {
321
323
  constructor(searchView, labelService) {
@@ -73,8 +73,8 @@ import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/co
73
73
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
74
74
  import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
75
75
  import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
76
- import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
77
76
  import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
77
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
78
78
  import { TextSearchCompleteMessageType } from 'vscode/vscode/vs/workbench/services/search/common/searchExtTypes';
79
79
 
80
80
  var SearchView_1;
@@ -85,8 +85,8 @@ const DEBOUNCE_DELAY = 75;
85
85
  let SearchView = class SearchView extends ViewPane {
86
86
  static { SearchView_1 = this; }
87
87
  static { this.ACTIONS_RIGHT_CLASS_NAME = 'actions-right'; }
88
- constructor(options, fileService, editorService, codeEditorService, progressService, notificationService, dialogService, commandService, contextViewService, instantiationService, viewDescriptorService, configurationService, contextService, searchViewModelWorkbenchService, contextKeyService, replaceService, textFileService, preferencesService, themeService, searchHistoryService, contextMenuService, accessibilityService, keybindingService, storageService, openerService, telemetryService, notebookService, logService, accessibilitySignalService) {
89
- super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
88
+ constructor(options, fileService, editorService, codeEditorService, progressService, notificationService, dialogService, commandService, contextViewService, instantiationService, viewDescriptorService, configurationService, contextService, searchViewModelWorkbenchService, contextKeyService, replaceService, textFileService, preferencesService, themeService, searchHistoryService, contextMenuService, accessibilityService, keybindingService, storageService, openerService, telemetryService, hoverService, notebookService, logService, accessibilitySignalService) {
89
+ super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
90
90
  this.fileService = fileService;
91
91
  this.editorService = editorService;
92
92
  this.codeEditorService = codeEditorService;
@@ -246,7 +246,7 @@ let SearchView = class SearchView extends ViewPane {
246
246
  refreshHasAISetting() {
247
247
  const val = this.shouldShowAIButton();
248
248
  if (val && this.searchWidget.searchInput) {
249
- this.searchWidget.searchInput.shouldShowAIButton = val;
249
+ this.searchWidget.searchInput.sparkleVisible = val;
250
250
  }
251
251
  }
252
252
  onDidChangeWorkbenchState() {
@@ -318,7 +318,7 @@ let SearchView = class SearchView extends ViewPane {
318
318
  this.viewletState['query.useExcludesAndIgnoreFiles'] : true;
319
319
  this.queryDetails = append(this.searchWidgetsContainerElement, $('.query-details'));
320
320
  this.toggleQueryDetailsButton = append(this.queryDetails, $('.more' + ThemeIcon.asCSSSelector(searchDetailsIcon), { tabindex: 0, role: 'button' }));
321
- this._register(setupCustomHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, ( localizeWithPath(_moduleId, 1, "Toggle Search Details"))));
321
+ this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, ( localizeWithPath(_moduleId, 1, "Toggle Search Details"))));
322
322
  this._register(addDisposableListener(this.toggleQueryDetailsButton, EventType.CLICK, e => {
323
323
  EventHelper.stop(e);
324
324
  this.toggleQueryDetails(!this.accessibilityService.isScreenReaderOptimized());
@@ -838,9 +838,7 @@ let SearchView = class SearchView extends ViewPane {
838
838
  }),
839
839
  multipleSelectionSupport: true,
840
840
  selectionNavigation: true,
841
- overrideStyles: {
842
- listBackground: this.getBackgroundColor()
843
- },
841
+ overrideStyles: this.getLocationBasedColors().listOverrideStyles,
844
842
  paddingBottom: SearchDelegate.ITEM_HEIGHT
845
843
  }));
846
844
  this._register(this.tree.onContextMenu(e => this.onContextMenu(e)));
@@ -1522,20 +1520,20 @@ let SearchView = class SearchView extends ViewPane {
1522
1520
  const messageEl = this.clearMessage();
1523
1521
  append(messageEl, message);
1524
1522
  if (!completed) {
1525
- const searchAgainButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 34, "Search again")), () => this.triggerQueryChange({ preserveFocus: false })))));
1523
+ const searchAgainButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 34, "Search again")), () => this.triggerQueryChange({ preserveFocus: false }), this.hoverService))));
1526
1524
  append(messageEl, searchAgainButton.element);
1527
1525
  }
1528
1526
  else if (hasIncludes || hasExcludes) {
1529
- const searchAgainButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 35, "Search again in all files")), this.onSearchAgain.bind(this)))));
1527
+ const searchAgainButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 35, "Search again in all files")), this.onSearchAgain.bind(this), this.hoverService))));
1530
1528
  append(messageEl, searchAgainButton.element);
1531
1529
  }
1532
1530
  else {
1533
- const openSettingsButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 36, "Open Settings")), this.onOpenSettings.bind(this)))));
1531
+ const openSettingsButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 36, "Open Settings")), this.onOpenSettings.bind(this), this.hoverService))));
1534
1532
  append(messageEl, openSettingsButton.element);
1535
1533
  }
1536
1534
  if (completed) {
1537
1535
  append(messageEl, $('span', undefined, ' - '));
1538
- const learnMoreButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 37, "Learn More")), this.onLearnMore.bind(this)))));
1536
+ const learnMoreButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 37, "Learn More")), this.onLearnMore.bind(this), this.hoverService))));
1539
1537
  append(messageEl, learnMoreButton.element);
1540
1538
  }
1541
1539
  if (this.contextService.getWorkbenchState() === 1 ) {
@@ -1661,17 +1659,17 @@ let SearchView = class SearchView extends ViewPane {
1661
1659
  if (fileCount > 0) {
1662
1660
  if (disregardExcludesAndIgnores) {
1663
1661
  const excludesDisabledMessage = ' - ' + ( localizeWithPath(_moduleId, 41, "exclude settings and ignore files are disabled")) + ' ';
1664
- const enableExcludesButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 42, "enable")), this.onEnableExcludes.bind(this), ( localizeWithPath(_moduleId, 43, "Use Exclude Settings and Ignore Files"))))));
1662
+ const enableExcludesButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 42, "enable")), this.onEnableExcludes.bind(this), this.hoverService, ( localizeWithPath(_moduleId, 43, "Use Exclude Settings and Ignore Files"))))));
1665
1663
  append(messageEl, $('span', undefined, excludesDisabledMessage, '(', enableExcludesButton.element, ')'));
1666
1664
  }
1667
1665
  if (onlyOpenEditors) {
1668
1666
  const searchingInOpenMessage = ' - ' + ( localizeWithPath(_moduleId, 44, "searching only in open files")) + ' ';
1669
- const disableOpenEditorsButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 45, "disable")), this.onDisableSearchInOpenEditors.bind(this), ( localizeWithPath(_moduleId, 46, "Search in entire workspace"))))));
1667
+ const disableOpenEditorsButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 45, "disable")), this.onDisableSearchInOpenEditors.bind(this), this.hoverService, ( localizeWithPath(_moduleId, 46, "Search in entire workspace"))))));
1670
1668
  append(messageEl, $('span', undefined, searchingInOpenMessage, '(', disableOpenEditorsButton.element, ')'));
1671
1669
  }
1672
1670
  append(messageEl, ' - ');
1673
1671
  const openInEditorTooltip = appendKeyBindingLabel(( localizeWithPath(_moduleId, 47, "Copy current search results to an editor")), this.keybindingService.lookupKeybinding("search.action.openInEditor" ));
1674
- const openInEditorButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 48, "Open in editor")), () => this.instantiationService.invokeFunction(createEditorFromSearchResult, this.searchResult, this.searchIncludePattern.getValue(), this.searchExcludePattern.getValue(), this.searchIncludePattern.onlySearchInOpenEditors()), openInEditorTooltip))));
1672
+ const openInEditorButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 48, "Open in editor")), () => this.instantiationService.invokeFunction(createEditorFromSearchResult, this.searchResult, this.searchIncludePattern.getValue(), this.searchExcludePattern.getValue(), this.searchIncludePattern.onlySearchInOpenEditors()), this.hoverService, openInEditorTooltip))));
1675
1673
  append(messageEl, openInEditorButton.element);
1676
1674
  this.reLayout();
1677
1675
  }
@@ -1709,7 +1707,7 @@ let SearchView = class SearchView extends ViewPane {
1709
1707
  ))));
1710
1708
  const openFolderButton = this.messageDisposables.add(( (new SearchLinkButton(( localizeWithPath(_moduleId, 54, "Open Folder")), () => {
1711
1709
  this.commandService.executeCommand(isMacintosh && isNative ? OpenFileFolderAction.ID : OpenFolderAction.ID).catch(err => onUnexpectedError(err));
1712
- }))));
1710
+ }, this.hoverService))));
1713
1711
  append(textEl, openFolderButton.element);
1714
1712
  }
1715
1713
  showEmptyStage(forceHideMessages = false) {
@@ -1971,15 +1969,16 @@ SearchView = SearchView_1 = ( (__decorate([
1971
1969
  ( (__param(23, IStorageService))),
1972
1970
  ( (__param(24, IOpenerService))),
1973
1971
  ( (__param(25, ITelemetryService))),
1974
- ( (__param(26, INotebookService))),
1975
- ( (__param(27, ILogService))),
1976
- ( (__param(28, IAccessibilitySignalService)))
1972
+ ( (__param(26, IHoverService))),
1973
+ ( (__param(27, INotebookService))),
1974
+ ( (__param(28, ILogService))),
1975
+ ( (__param(29, IAccessibilitySignalService)))
1977
1976
  ], SearchView)));
1978
1977
  class SearchLinkButton extends Disposable {
1979
- constructor(label, handler, tooltip) {
1978
+ constructor(label, handler, hoverService, tooltip) {
1980
1979
  super();
1981
1980
  this.element = $('a.pointer', { tabindex: 0 }, label);
1982
- this._register(setupCustomHover(getDefaultHoverDelegate('mouse'), this.element, tooltip));
1981
+ this._register(hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.element, tooltip));
1983
1982
  this.addEventHandlers(handler);
1984
1983
  }
1985
1984
  addEventHandlers(handler) {
@@ -129,7 +129,7 @@ let SearchWidget = class SearchWidget extends Widget {
129
129
  ))));
130
130
  this._register(this._notebookFilters.onDidChange(() => {
131
131
  if (this.searchInput) {
132
- this.searchInput.updateStyles();
132
+ this.searchInput.updateFilterStyles();
133
133
  }
134
134
  }));
135
135
  this._register(this.editorService.onDidEditorsChange((e) => {
@@ -58,8 +58,8 @@ import { UnusualLineTerminatorsDetector } from 'vscode/vscode/vs/editor/contrib/
58
58
  import { getInputBoxStyle, defaultToggleStyles } from 'vscode/vscode/vs/platform/theme/browser/defaultStyles';
59
59
  import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
60
60
  import { SearchContext } from 'vscode/vscode/vs/workbench/contrib/search/common/constants';
61
- import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
62
61
  import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
62
+ import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
63
63
 
64
64
  var SearchEditor_1;
65
65
  const _moduleId = "vs/workbench/contrib/searchEditor/browser/searchEditor";
@@ -70,7 +70,7 @@ let SearchEditor = class SearchEditor extends AbstractTextCodeEditor {
70
70
  static { this.ID = SearchEditorID; }
71
71
  static { this.SEARCH_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'searchEditorViewState'; }
72
72
  get searchResultEditor() { return this.editorControl; }
73
- constructor(group, telemetryService, themeService, storageService, modelService, contextService, labelService, instantiationService, contextViewService, commandService, openerService, notificationService, progressService, textResourceService, editorGroupService, editorService, configurationService, fileService, logService) {
73
+ constructor(group, telemetryService, themeService, storageService, modelService, contextService, labelService, instantiationService, contextViewService, commandService, openerService, notificationService, progressService, textResourceService, editorGroupService, editorService, configurationService, fileService, logService, hoverService) {
74
74
  super(SearchEditor_1.ID, group, telemetryService, instantiationService, storageService, textResourceService, themeService, editorService, editorGroupService, fileService);
75
75
  this.modelService = modelService;
76
76
  this.contextService = contextService;
@@ -81,6 +81,7 @@ let SearchEditor = class SearchEditor extends AbstractTextCodeEditor {
81
81
  this.notificationService = notificationService;
82
82
  this.configurationService = configurationService;
83
83
  this.logService = logService;
84
+ this.hoverService = hoverService;
84
85
  this.runSearchDelayer = ( (new Delayer(0)));
85
86
  this.pauseSearching = false;
86
87
  this.showingIncludesExcludes = false;
@@ -117,7 +118,7 @@ let SearchEditor = class SearchEditor extends AbstractTextCodeEditor {
117
118
  this._register(this.queryEditorWidget.onDidToggleContext(() => this.triggerSearch({ resetCursor: false })));
118
119
  this.includesExcludesContainer = append(container, $('.includes-excludes'));
119
120
  this.toggleQueryDetailsButton = append(this.includesExcludesContainer, $('.expand' + ThemeIcon.asCSSSelector(searchDetailsIcon), { tabindex: 0, role: 'button' }));
120
- this._register(setupCustomHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, ( localizeWithPath(_moduleId, 0, "Toggle Search Details"))));
121
+ this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('element'), this.toggleQueryDetailsButton, ( localizeWithPath(_moduleId, 0, "Toggle Search Details"))));
121
122
  this._register(addDisposableListener(this.toggleQueryDetailsButton, EventType.CLICK, e => {
122
123
  EventHelper.stop(e);
123
124
  this.toggleIncludesExcludes();
@@ -706,7 +707,8 @@ SearchEditor = SearchEditor_1 = ( (__decorate([
706
707
  ( (__param(15, IEditorService))),
707
708
  ( (__param(16, IConfigurationService))),
708
709
  ( (__param(17, IFileService))),
709
- ( (__param(18, ILogService)))
710
+ ( (__param(18, ILogService))),
711
+ ( (__param(19, IHoverService)))
710
712
  ], SearchEditor)));
711
713
  const searchEditorTextInputBorder = registerColor('searchEditor.textInputBorder', { dark: inputBorder, light: inputBorder, hcDark: inputBorder, hcLight: inputBorder }, ( localizeWithPath(_moduleId, 8, "Search editor text input box border.")));
712
714
  function findNextRange(matchRanges, currentPosition) {