feat: expand skill command registration
This commit is contained in:
1 parent
69761e8a51
commit
38b49aa0f6
21 files changed
+311
-45
No files matched your search
@@ -10,6 +10,18 @@ function resolveAutoDefault(providerId?: ChannelId): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function resolveNativeSkillsEnabled(params: {
|
||||
providerId: ChannelId;
|
||||
providerSetting?: NativeCommandsSetting;
|
||||
globalSetting?: NativeCommandsSetting;
|
||||
}): boolean {
|
||||
const { providerId, providerSetting, globalSetting } = params;
|
||||
const setting = providerSetting === undefined ? globalSetting : providerSetting;
|
||||
if (setting === true) return true;
|
||||
if (setting === false) return false;
|
||||
return resolveAutoDefault(providerId);
|
||||
}
|
||||
|
||||
export function resolveNativeCommandsEnabled(params: {
|
||||
providerId: ChannelId;
|
||||
providerSetting?: NativeCommandsSetting;
|
||||
|
||||
Reference in new issue
Block a user