mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-05 20:44:43 +01:00
Remove threshold check for RelatedInformationProvider (#229103)
This commit is contained in:
@@ -360,7 +360,6 @@ class AiRelatedInformationSearchKeysProvider {
|
||||
}
|
||||
|
||||
class AiRelatedInformationSearchProvider implements IRemoteSearchProvider {
|
||||
private static readonly AI_RELATED_INFORMATION_THRESHOLD = 0.73;
|
||||
private static readonly AI_RELATED_INFORMATION_MAX_PICKS = 5;
|
||||
|
||||
private readonly _keysProvider: AiRelatedInformationSearchKeysProvider;
|
||||
@@ -399,7 +398,7 @@ class AiRelatedInformationSearchProvider implements IRemoteSearchProvider {
|
||||
relatedInformation.sort((a, b) => b.weight - a.weight);
|
||||
|
||||
for (const info of relatedInformation) {
|
||||
if (info.weight < AiRelatedInformationSearchProvider.AI_RELATED_INFORMATION_THRESHOLD || filterMatches.length === AiRelatedInformationSearchProvider.AI_RELATED_INFORMATION_MAX_PICKS) {
|
||||
if (filterMatches.length === AiRelatedInformationSearchProvider.AI_RELATED_INFORMATION_MAX_PICKS) {
|
||||
break;
|
||||
}
|
||||
const pick = info.setting;
|
||||
|
||||
@@ -43,7 +43,6 @@ import { IPreferencesService } from '../../../services/preferences/common/prefer
|
||||
export class CommandsQuickAccessProvider extends AbstractEditorCommandsQuickAccessProvider {
|
||||
|
||||
private static AI_RELATED_INFORMATION_MAX_PICKS = 5;
|
||||
private static AI_RELATED_INFORMATION_THRESHOLD = 0.8;
|
||||
private static AI_RELATED_INFORMATION_DEBOUNCE = 200;
|
||||
|
||||
// If extensions are not yet registered, we wait for a little moment to give them
|
||||
@@ -199,7 +198,7 @@ export class CommandsQuickAccessProvider extends AbstractEditorCommandsQuickAcce
|
||||
const additionalPicks = new Array<ICommandQuickPick | IQuickPickSeparator>();
|
||||
|
||||
for (const info of relatedInformation) {
|
||||
if (info.weight < CommandsQuickAccessProvider.AI_RELATED_INFORMATION_THRESHOLD || additionalPicks.length === CommandsQuickAccessProvider.AI_RELATED_INFORMATION_MAX_PICKS) {
|
||||
if (additionalPicks.length === CommandsQuickAccessProvider.AI_RELATED_INFORMATION_MAX_PICKS) {
|
||||
break;
|
||||
}
|
||||
const pick = allPicks.find(p => p.commandId === info.command && !setOfPicksSoFar.has(p.commandId));
|
||||
|
||||
Reference in New Issue
Block a user