feat: adding some comments
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user