refactor(providers): rename parseTextList

This commit is contained in:
Supra4E8C
2026-02-22 16:08:06 +08:00
parent b363edc9bd
commit 0842be2937
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -23,12 +23,14 @@ export const withoutDisableAllModelsRule = (models?: string[]) => {
return base;
};
export const parseExcludedModels = (text: string): string[] =>
export const parseTextList = (text: string): string[] =>
text
.split(/[\n,]+/)
.map((item) => item.trim())
.filter(Boolean);
export const parseExcludedModels = parseTextList;
export const excludedModelsToText = (models?: string[]) =>
Array.isArray(models) ? models.join('\n') : '';