@codingame/monaco-vscode-quickaccess-service-override
Advanced tools
Comparing version 1.83.16 to 1.85.0-next.0
{ | ||
"name": "@codingame/monaco-vscode-quickaccess-service-override", | ||
"version": "1.83.16", | ||
"version": "1.85.0-next.0", | ||
"keywords": [], | ||
@@ -21,5 +21,5 @@ "author": { | ||
"dependencies": { | ||
"vscode": "npm:@codingame/monaco-vscode-api@1.83.16", | ||
"monaco-editor": "0.44.0" | ||
"vscode": "npm:@codingame/monaco-vscode-api@1.85.0-next.0", | ||
"monaco-editor": "0.45.0" | ||
} | ||
} |
@@ -8,3 +8,3 @@ import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js'; | ||
import { LRUCache } from 'monaco-editor/esm/vs/base/common/map.js'; | ||
import { normalizeTfIdfScores, TfIdfCalculator } from '../../../base/common/tfIdf.js'; | ||
import { TfIdfCalculator, normalizeTfIdfScores } from 'vscode/vscode/vs/base/common/tfIdf'; | ||
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js'; | ||
@@ -17,3 +17,3 @@ import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js'; | ||
import { PickerQuickAccessProvider } from 'vscode/vscode/vs/platform/quickinput/browser/pickerQuickAccess'; | ||
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js'; | ||
import { WillSaveStateReason, IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js'; | ||
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js'; | ||
@@ -48,3 +48,3 @@ import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs'; | ||
key: commandPick.commandId, | ||
textChunks: [commandPick.label + (commandPick.commandAlias ? ` ${commandPick.commandAlias}` : '')] | ||
textChunks: [this.getTfIdfChunk(commandPick)] | ||
})))); | ||
@@ -238,2 +238,12 @@ const result = tfidf.calculateScores(filter, token); | ||
} | ||
getTfIdfChunk({ label, commandAlias, commandDescription }) { | ||
let chunk = label; | ||
if (commandAlias && commandAlias !== label) { | ||
chunk += ` - ${commandAlias}`; | ||
} | ||
if (commandDescription && commandDescription.value !== label) { | ||
chunk += ` - ${commandDescription.value === commandDescription.original ? commandDescription.value : `${commandDescription.value} (${commandDescription.original})`}`; | ||
} | ||
return chunk; | ||
} | ||
}; | ||
@@ -253,2 +263,3 @@ AbstractCommandsQuickAccessProvider = AbstractCommandsQuickAccessProvider_1 = ( __decorate([ | ||
static { this.counter = 1; } | ||
static { this.hasChanges = false; } | ||
constructor(storageService, configurationService) { | ||
@@ -265,2 +276,7 @@ super(); | ||
this._register(this.configurationService.onDidChangeConfiguration(e => this.updateConfiguration(e))); | ||
this._register(this.storageService.onWillSaveState(e => { | ||
if (e.reason === WillSaveStateReason.SHUTDOWN) { | ||
this.saveState(); | ||
} | ||
})); | ||
} | ||
@@ -274,3 +290,3 @@ updateConfiguration(e) { | ||
CommandsHistory_1.cache.limit = this.configuredCommandsHistoryLength; | ||
CommandsHistory_1.saveState(this.storageService); | ||
CommandsHistory_1.hasChanges = true; | ||
} | ||
@@ -306,3 +322,3 @@ } | ||
CommandsHistory_1.cache.set(commandId, CommandsHistory_1.counter++); | ||
CommandsHistory_1.saveState(this.storageService); | ||
CommandsHistory_1.hasChanges = true; | ||
} | ||
@@ -312,10 +328,14 @@ peek(commandId) { | ||
} | ||
static saveState(storageService) { | ||
saveState() { | ||
if (!CommandsHistory_1.cache) { | ||
return; | ||
} | ||
if (!CommandsHistory_1.hasChanges) { | ||
return; | ||
} | ||
const serializedCache = { usesLRU: true, entries: [] }; | ||
CommandsHistory_1.cache.forEach((value, key) => serializedCache.entries.push({ key, value })); | ||
storageService.store(CommandsHistory_1.PREF_KEY_CACHE, JSON.stringify(serializedCache), 0 , 0 ); | ||
storageService.store(CommandsHistory_1.PREF_KEY_COUNTER, CommandsHistory_1.counter, 0 , 0 ); | ||
this.storageService.store(CommandsHistory_1.PREF_KEY_CACHE, JSON.stringify(serializedCache), 0 , 0 ); | ||
this.storageService.store(CommandsHistory_1.PREF_KEY_COUNTER, CommandsHistory_1.counter, 0 , 0 ); | ||
CommandsHistory_1.hasChanges = false; | ||
} | ||
@@ -334,3 +354,3 @@ static getConfiguredCommandHistoryLength(configurationService) { | ||
CommandsHistory_1.counter = 1; | ||
CommandsHistory_1.saveState(storageService); | ||
CommandsHistory_1.hasChanges = true; | ||
} | ||
@@ -337,0 +357,0 @@ }; |
@@ -113,3 +113,3 @@ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js'; | ||
}, | ||
description: { | ||
metadata: { | ||
description: `Quick access`, | ||
@@ -116,0 +116,0 @@ args: [{ |
@@ -30,3 +30,4 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js'; | ||
import { RelatedInformationType, IAiRelatedInformationService } from 'vscode/vscode/vs/workbench/services/aiRelatedInformation/common/aiRelatedInformation'; | ||
import { CHAT_OPEN_ACTION_ID } from '../../chat/browser/actions/chatActions.js'; | ||
import { CHAT_OPEN_ACTION_ID } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatActions'; | ||
import { isLocalizedString } from 'monaco-editor/esm/vs/platform/action/common/action.js'; | ||
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs'; | ||
@@ -197,6 +198,11 @@ | ||
aliasLabel; | ||
const metadataDescription = action.item.metadata?.description; | ||
const commandDescription = metadataDescription === undefined || isLocalizedString(metadataDescription) | ||
? metadataDescription | ||
: { value: metadataDescription, original: metadataDescription }; | ||
globalCommandPicks.push({ | ||
commandId: action.item.id, | ||
commandAlias, | ||
label: stripIcons(label) | ||
label: stripIcons(label), | ||
commandDescription, | ||
}); | ||
@@ -203,0 +209,0 @@ } |
@@ -81,3 +81,3 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js'; | ||
result.push({ | ||
label: view.name, | ||
label: view.name.value, | ||
containerLabel: viewContainerModel.title, | ||
@@ -84,0 +84,0 @@ accept: () => this.viewsService.openView(view.id, true) |
@@ -57,7 +57,16 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js'; | ||
showHover(options, focus) { | ||
const showHoverHint = (options.content instanceof HTMLElement | ||
? options.content.textContent ?? '' | ||
: typeof options.content === 'string' | ||
? options.content | ||
: options.content.value).length > 20; | ||
return this.hoverService.showHover({ | ||
...options, | ||
showHoverHint: true, | ||
hideOnKeyDown: false, | ||
skipFadeInAnimation: true, | ||
persistence: { | ||
hideOnKeyDown: false, | ||
}, | ||
appearance: { | ||
showHoverHint, | ||
skipFadeInAnimation: true, | ||
}, | ||
}, focus); | ||
@@ -64,0 +73,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80705
16
1680
2
+ Added@codingame/monaco-vscode-api@1.85.0-next.0(transitive)
+ Added@codingame/monaco-vscode-environment-service-override@1.85.0-next.0(transitive)
+ Added@codingame/monaco-vscode-extensions-service-override@1.85.0-next.0(transitive)
+ Added@codingame/monaco-vscode-files-service-override@1.85.0-next.0(transitive)
+ Added@codingame/monaco-vscode-layout-service-override@1.85.0-next.0(transitive)
+ Addedmonaco-editor@0.45.0(transitive)
- Removed@codingame/monaco-vscode-api@1.83.16(transitive)
- Removed@codingame/monaco-vscode-environment-service-override@1.83.16(transitive)
- Removed@codingame/monaco-vscode-extensions-service-override@1.83.16(transitive)
- Removed@codingame/monaco-vscode-files-service-override@1.83.16(transitive)
- Removed@codingame/monaco-vscode-layout-service-override@1.83.16(transitive)
- Removedmonaco-editor@0.44.0(transitive)
Updatedmonaco-editor@0.45.0
Updatedvscode@npm:@codingame/monaco-vscode-api@1.85.0-next.0