✨ feat(launcher, plugin_manager): add lazy loading support for plugins with trigger mapping

This commit is contained in:
sankalp committed 2025-06-29 12:34:09 +05:45
1 parent 3ec4c6229d
commit 24313ecdb6
4 files changed
+126 -1277

No files matched your search

+3 -3
View File
@@ -58,8 +58,8 @@ class CalculatorPlugin(PluginBase):
self._cache_cleanup_interval = 300 # 5 minutes
def initialize(self):
"""Initialize the files plugin."""
self.set_triggers(["="])
"""Initialize the calculator plugin."""
self.set_triggers(["=", "calc"])
def _cleanup_cache(self):
"""Clean up old cache entries."""
@@ -95,7 +95,7 @@ class CalculatorPlugin(PluginBase):
self._conversion_cache[cache_key] = result
subtitle = f"{value} {from_unit} = {result:.6g} {to_unit}"
return [
Result(