From 1f7bfa7d81bf9b09379a4a2fef5228ea7e42dfdf Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 6 Sep 2025 17:18:40 +0800 Subject: [PATCH 1/3] Support non action keyword for plugins --- Flow.Launcher.Core/Plugin/PluginConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Plugin/PluginConfig.cs b/Flow.Launcher.Core/Plugin/PluginConfig.cs index f7457b4e1b1..8623b9169be 100644 --- a/Flow.Launcher.Core/Plugin/PluginConfig.cs +++ b/Flow.Launcher.Core/Plugin/PluginConfig.cs @@ -119,7 +119,7 @@ private static PluginMetadata GetPluginMetadata(string pluginDirectory) // for plugins which doesn't has ActionKeywords key metadata.ActionKeywords ??= new List { metadata.ActionKeyword }; // for plugin still use old ActionKeyword - metadata.ActionKeyword = metadata.ActionKeywords?[0]; + metadata.ActionKeyword = metadata.ActionKeywords.Count == 0 ? string.Empty : metadata.ActionKeywords?[0]; } catch (Exception e) { From 1f019a15b122b181cea54cd10b7de28dc8c817a0 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 6 Sep 2025 17:21:01 +0800 Subject: [PATCH 2/3] Fix null exception --- Flow.Launcher.Core/Plugin/PluginConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Plugin/PluginConfig.cs b/Flow.Launcher.Core/Plugin/PluginConfig.cs index 8623b9169be..e1a14dde958 100644 --- a/Flow.Launcher.Core/Plugin/PluginConfig.cs +++ b/Flow.Launcher.Core/Plugin/PluginConfig.cs @@ -119,7 +119,7 @@ private static PluginMetadata GetPluginMetadata(string pluginDirectory) // for plugins which doesn't has ActionKeywords key metadata.ActionKeywords ??= new List { metadata.ActionKeyword }; // for plugin still use old ActionKeyword - metadata.ActionKeyword = metadata.ActionKeywords.Count == 0 ? string.Empty : metadata.ActionKeywords?[0]; + metadata.ActionKeyword = metadata.ActionKeywords?.Count == 0 ? string.Empty : metadata.ActionKeywords?[0]; } catch (Exception e) { From 2eeaf381099b83a438e10ac30e928f0eff0a44de Mon Sep 17 00:00:00 2001 From: Jack Ye <1160210343@qq.com> Date: Sat, 6 Sep 2025 17:32:20 +0800 Subject: [PATCH 3/3] Improve code quality Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Flow.Launcher.Core/Plugin/PluginConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Core/Plugin/PluginConfig.cs b/Flow.Launcher.Core/Plugin/PluginConfig.cs index e1a14dde958..7c8e1a9d884 100644 --- a/Flow.Launcher.Core/Plugin/PluginConfig.cs +++ b/Flow.Launcher.Core/Plugin/PluginConfig.cs @@ -119,7 +119,7 @@ private static PluginMetadata GetPluginMetadata(string pluginDirectory) // for plugins which doesn't has ActionKeywords key metadata.ActionKeywords ??= new List { metadata.ActionKeyword }; // for plugin still use old ActionKeyword - metadata.ActionKeyword = metadata.ActionKeywords?.Count == 0 ? string.Empty : metadata.ActionKeywords?[0]; + metadata.ActionKeyword = metadata.ActionKeywords?.FirstOrDefault() ?? string.Empty; } catch (Exception e) {