Commit graph

218 commits

Author SHA1 Message Date
Jack251970
cce80ac5aa Ensure temporary folder deletion 2026-02-27 19:14:03 +08:00
Jack251970
036a3761ea Remove log for plugin version mismatch in PluginManager
Logging when a plugin's minimum Flow Launcher version is not met
has been removed. The method now returns false without logging
any informational message.
2026-02-27 19:05:25 +08:00
Jack251970
48878d2d8c Make log message context-neutral 2026-02-27 19:04:30 +08:00
Jack251970
ba1908d605 Update plugin min version warning message formatting
Improved the message shown when a plugin requires a newer Flow Launcher version by adding line breaks for clarity and updating the title wording. Adjusted code to pass Environment.NewLine and modified resource strings in en.xaml to support the new format.
2026-02-27 18:54:13 +08:00
Jack251970
590bf20204 Add null check for plugin metadata deserialization
Throw a JsonException if deserializing plugin metadata from JSON returns null. This prevents null metadata from being used and improves error handling for invalid or corrupted plugin.json files.
2026-02-27 18:53:30 +08:00
Jack251970
b02a5a265d Refactor plugin min version check and improve logging
Refactored the plugin minimum app version check to use Version.TryParse instead of try-catch with Version.Parse, preventing exceptions on invalid input. Improved error handling by logging parse failures as errors and version mismatches as info, making the logic clearer and more robust.
2026-02-27 18:48:59 +08:00
Jack251970
b1b18ee215 Improve error handling for invalid plugin.json files
Previously, installing a plugin with an invalid or corrupted plugin.json would cause an unhandled exception. Now, deserialization errors are caught, a user-friendly error message is shown, and the exception is logged. Added a new localized error message for this scenario in en.xaml.
2026-02-27 18:42:07 +08:00
Jack251970
2e0db3b90f Add MinimumAppVersion support for plugins
Introduced MinimumAppVersion property to PluginMetadata, enabling plugins to specify required Flow Launcher version. Plugin installation now checks this requirement and prompts users if unsatisfied. Minimum app version logic moved to PluginManager and applied to manifest updates. Added localized strings for user prompts. Refactored SameOrLesserPluginVersionExists to accept PluginMetadata.
2026-02-27 18:30:29 +08:00
Jack Ye
118d6e2a73
Fix incomplete plugin directory deletion on uninstall (#4250)
Some checks failed
Build / build (push) Has been cancelled
2026-02-21 22:34:53 +11:00
Jack Ye
48f67b1886
Improve and fix query result update logic issue & provide access to exact query typed by user (#3502) 2025-11-26 21:15:12 +11:00
Jack251970
fbeaafa8d3 Remove Score = -100 from result objects in PluginManager
Removed the `Score = -100` property from multiple result objects
in `PluginManager.cs` to simplify the code and improve clarity.
Adjusted the formatting and structure to ensure proper syntax
and maintain code consistency. This includes changes to result
objects that handle re-querying and exception handling.
2025-10-16 18:47:15 +08:00
Jeremy Wu
386737acac
update method parameter style 2025-10-16 20:20:51 +11:00
Jack Ye
adfd5425f0
Merge branch 'dev' into plugin_initialization 2025-10-14 21:53:43 +08:00
Jack251970
6f6292494c Use ContainsKey(id) for O(1) lookup instead of O(n) iteration 2025-10-03 16:13:24 +08:00
Jack251970
54e693d0e2 Add functions in Check Initializing & Init Failed region 2025-10-03 16:03:54 +08:00
Jack251970
8a2edf274a Add AutoCompleteText property for results 2025-10-03 15:36:32 +08:00
Jack251970
171eb2dd8b Data race on _allLoadedPlugins (List) across threads 2025-10-03 15:28:11 +08:00
Jack251970
76cc22d5af Use TryRemove and discard out var to clean up action keywords 2025-10-03 15:21:11 +08:00
Jack251970
2be10eb4ca Add translation for plugin failed to respond & Improve translations for plugin stil initializing 2025-10-02 22:26:28 +08:00
Jack251970
297cb5c3ef Return results to tell users that this plugin is still initializing 2025-10-02 22:23:07 +08:00
Jack251970
9a20b0e0de Expose initialized plugins via PublicAPI 2025-10-02 21:59:05 +08:00
Jack251970
66fb1d7c60 Register plugin action keywords when plugins are loaded 2025-10-02 21:52:31 +08:00
Jack251970
5ed94c8abc Resolve conflicts 2025-10-02 20:25:45 +08:00
Jack Ye
6213193cda
Merge branch 'dev' into plugin_initialization 2025-10-02 20:22:20 +08:00
Jack Ye
b34851bd12
Merge branch 'dev' into squirrel_upgrade 2025-09-28 11:37:18 +08:00
Jack251970
0e366a6269 Use PublicApi.Instance instead of private one 2025-09-23 17:40:54 +08:00
Jack251970
7350c1d4d5 Use Flow.Launcher.Localization to improve code quality 2025-09-23 17:14:30 +08:00
Jack251970
d6bc053950 Revert changes 2025-09-21 16:46:43 +08:00
Jack251970
fbb9e09237 Improve code quality 2025-09-21 16:19:13 +08:00
Jack251970
89d726de2a Use getter to fix data location issue 2025-09-21 14:03:43 +08:00
Jack251970
fb8daa4ed9 Potential race condition in action keyword management 2025-08-12 18:12:15 +08:00
Jack Ye
04bd9ddc2c
Verify File.Delete exception handling
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-08-12 18:09:59 +08:00
Jack251970
9221435bad Remove plugin from _allLoadedPlugins when one plugin is uninstalled 2025-08-12 18:07:10 +08:00
Jack251970
31c8e850cd Improve code quality 2025-08-12 18:03:23 +08:00
Jack251970
f08466245a Set GetAllInitializedPlugins to private 2025-08-12 17:53:53 +08:00
Jack251970
93af079316 Improve code quality 2025-08-12 17:49:22 +08:00
Jack251970
269d21a4c0 Change plugin modified logic 2025-07-21 18:11:16 +08:00
Jack251970
f808469285 Fix logic & Improve code quality 2025-07-21 17:59:28 +08:00
Jack251970
63f86613c3 Use internal PluginModified method instead of API.PluginModified 2025-07-21 17:55:06 +08:00
Jack251970
59e4fb82b9 Fix logic & Add code comments 2025-07-21 17:49:24 +08:00
Jack251970
67c940f3a8 Do not show setting panel for init failed plugins 2025-07-21 17:45:01 +08:00
Jack251970
324b3eb081 Do not call interface methods for init failed plugins 2025-07-21 17:33:47 +08:00
Jack251970
d4a1953747 Add init failed plugins 2025-07-21 17:28:20 +08:00
Jack251970
b348debc72 Code quality 2025-07-21 17:27:37 +08:00
Jack251970
fc01ddbb1c Save init failed plugins 2025-07-21 17:27:21 +08:00
Jack251970
7f797b1039 Add code comments 2025-07-21 17:22:17 +08:00
Jack251970
8d03fcee2e Remove error codes 2025-07-21 17:17:11 +08:00
Jack251970
9149e3f201 Mark initializing plugins as modified 2025-07-21 17:16:36 +08:00
Jack251970
6d99416641 Search in loaded plugins 2025-07-21 17:14:03 +08:00
Jack251970
11e05f73d9 Add all loaded plugins 2025-07-21 17:00:19 +08:00