diff --git a/packages/grafana-data/src/types/pluginExtensions.ts b/packages/grafana-data/src/types/pluginExtensions.ts index 94720df2ca7..40c9917ed52 100644 --- a/packages/grafana-data/src/types/pluginExtensions.ts +++ b/packages/grafana-data/src/types/pluginExtensions.ts @@ -419,8 +419,6 @@ export type PluginExtensionCommandPaletteDynamicConfig = { /** * Search provider function that returns results. * Return an empty array to skip results for the current search. - * To conditionally disable the provider, simply return an empty array - * based on your own logic instead of using a separate isActive filter. */ searchProvider: CommandPaletteDynamicSearchProvider; }; diff --git a/public/app/features/commandPalette/CommandPaletteDynamicRegistry.ts b/public/app/features/commandPalette/CommandPaletteDynamicRegistry.ts index 5ba6234d626..bb225935f46 100644 --- a/public/app/features/commandPalette/CommandPaletteDynamicRegistry.ts +++ b/public/app/features/commandPalette/CommandPaletteDynamicRegistry.ts @@ -73,7 +73,10 @@ export class CommandPaletteDynamicRegistry { continue; } - // Use index to differentiate multiple providers from same plugin + // Use index to differentiate multiple providers from same plugin. + // Note: Provider IDs are index-based, so changing the order of configs + // in addCommandPaletteDynamicProvider calls could affect result tracking. + // Plugins should maintain consistent ordering of their providers. const providerId = `${pluginId}/${index}`; if (!(providerId in registry)) {