@@ -79,23 +79,6 @@ export function getPluginCommandSpecs(
|
79 | 79 | return listProviderPluginCommandSpecs(providerName); |
80 | 80 | } |
81 | 81 | |
82 | | -export function getPluginCommandSpecsFromRegistrations( |
83 | | -commands: readonly PluginCommandRegistration[], |
84 | | -provider?: string, |
85 | | -options: PluginCommandSpecOptions = {}, |
86 | | -): Array<{ |
87 | | -name: string; |
88 | | -description: string; |
89 | | -descriptionLocalizations?: Record<string, string>; |
90 | | -acceptsArgs: boolean; |
91 | | -}> { |
92 | | -const providerName = normalizeOptionalLowercaseString(provider); |
93 | | -if (!pluginNativeCommandsEnabled(providerName, options)) { |
94 | | -return []; |
95 | | -} |
96 | | -return listProviderPluginCommandSpecsFromRegistrations(commands, providerName); |
97 | | -} |
98 | | - |
99 | 82 | export function getPluginCommandEntrySpecs( |
100 | 83 | provider?: string, |
101 | 84 | options: PluginCommandSpecOptions = {}, |
@@ -133,21 +116,6 @@ export function listProviderPluginCommandSpecs(provider?: string): Array<{
|
133 | 116 | .map((cmd) => serializePluginCommandSpec(cmd, provider)); |
134 | 117 | } |
135 | 118 | |
136 | | -export function listProviderPluginCommandSpecsFromRegistrations( |
137 | | -commands: readonly PluginCommandRegistration[], |
138 | | -provider?: string, |
139 | | -): Array<{ |
140 | | -name: string; |
141 | | -description: string; |
142 | | -descriptionLocalizations?: Record<string, string>; |
143 | | -acceptsArgs: boolean; |
144 | | -}> { |
145 | | -return commands |
146 | | -.map((entry) => entry.command) |
147 | | -.filter((cmd) => pluginCommandSupportsChannel(cmd, provider)) |
148 | | -.map((cmd) => serializePluginCommandSpec(cmd, provider)); |
149 | | -} |
150 | | - |
151 | 119 | function serializePluginCommandSpec( |
152 | 120 | cmd: OpenClawPluginCommandDefinition, |
153 | 121 | provider?: string, |
|