(
base: PluginConfig["commands"],
override?: Partial<PluginConfig["commands"]>,
)
| 859 | } |
| 860 | |
| 861 | function mergeCommands( |
| 862 | base: PluginConfig["commands"], |
| 863 | override?: Partial<PluginConfig["commands"]>, |
| 864 | ): PluginConfig["commands"] { |
| 865 | if (!override) { |
| 866 | return base |
| 867 | } |
| 868 | |
| 869 | return { |
| 870 | enabled: override.enabled ?? base.enabled, |
| 871 | protectedTools: [...new Set([...base.protectedTools, ...(override.protectedTools ?? [])])], |
| 872 | } |
| 873 | } |
| 874 | |
| 875 | function mergeManualMode( |
| 876 | base: PluginConfig["manualMode"], |