Skip to content

feat: add settings search provider names #249570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ class EmbeddingsSearchProvider implements IRemoteSearchProvider {

return {
filterMatches: await this.getEmbeddingsItems(token),
exactMatch: false
exactMatch: false,
providerName: 'embeddings'
};
}

Expand Down Expand Up @@ -507,7 +508,8 @@ class TfIdfSearchProvider implements IRemoteSearchProvider {

return {
filterMatches: await this.getTfIdfItems(token),
exactMatch: false
exactMatch: false,
providerName: 'tfIdf'
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,7 @@ export class SettingsEditor2 extends EditorPane {
type SettingsEditorModifiedSettingEvent = {
key: string;
groupId: string | undefined;
providerName: string | undefined;
nlpIndex: number | undefined;
displayIndex: number | undefined;
showConfiguredOnly: boolean;
Expand All @@ -1198,6 +1199,7 @@ export class SettingsEditor2 extends EditorPane {
type SettingsEditorModifiedSettingClassification = {
key: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The setting that is being modified.' };
groupId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the setting is from the local search or remote search provider, if applicable.' };
providerName: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The name of the remote search provider, if applicable.' };
nlpIndex: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The index of the setting in the remote search provider results, if applicable.' };
displayIndex: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The index of the setting in the combined search results, if applicable.' };
showConfiguredOnly: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the user is in the modified view, which shows configured settings only.' };
Expand All @@ -1208,6 +1210,7 @@ export class SettingsEditor2 extends EditorPane {
};

let groupId: string | undefined = undefined;
let providerName: string | undefined = undefined;
let nlpIndex: number | undefined = undefined;
let displayIndex: number | undefined = undefined;
if (props.searchResults) {
Expand All @@ -1220,6 +1223,7 @@ export class SettingsEditor2 extends EditorPane {
groupId = settingInLocalResults ? 'local' : 'remote';
}
if (rawResults[SearchResultIdx.Remote]) {
providerName = rawResults[SearchResultIdx.Remote].providerName;
const _nlpIndex = rawResults[SearchResultIdx.Remote].filterMatches.findIndex(m => m.setting.key === props.key);
nlpIndex = _nlpIndex >= 0 ? _nlpIndex : undefined;
}
Expand All @@ -1234,6 +1238,7 @@ export class SettingsEditor2 extends EditorPane {
const data = {
key: props.key,
groupId,
providerName,
nlpIndex,
displayIndex,
showConfiguredOnly: props.showConfiguredOnly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export interface ISearchResult {
filterMatches: ISettingMatch[];
exactMatch: boolean;
metadata?: IFilterMetadata;
providerName?: string;
}

export interface ISearchResultGroup {
Expand Down
Loading