feat(categories): add disable field to CategoryConfigSchema
Allow individual categories to be disabled via `disable: true` in config. Introduce shared `mergeCategories()` utility to centralize category merging and disabled filtering across all 7 consumption sites.
This commit is contained in:
@@ -32,7 +32,10 @@ export function resolveCategoryConfig(
|
||||
const userConfig = userCategories?.[categoryName]
|
||||
const hasExplicitUserConfig = userConfig !== undefined
|
||||
|
||||
// Check if category requires a specific model - bypass if user explicitly provides config
|
||||
if (userConfig?.disable) {
|
||||
return null
|
||||
}
|
||||
|
||||
const categoryReq = CATEGORY_MODEL_REQUIREMENTS[categoryName]
|
||||
if (categoryReq?.requiresModel && availableModels && !hasExplicitUserConfig) {
|
||||
if (!isModelAvailable(categoryReq.requiresModel, availableModels)) {
|
||||
|
||||
Reference in New Issue
Block a user