fix(ui): handle model names with spaces

Remove `trim()` from model identifier schema, which prevented parsed model identifiers from matching.

The root issue here is that model names are identifiers. This will be resolved in the model manager refactor.

Closes #5556
This commit is contained in:
psychedelicious 2024-01-24 08:39:23 +11:00 committed by Kent Keirsey
parent a0e68705dd
commit b4cf5496b6

View File

@ -65,7 +65,7 @@ export const zModelType = z.enum([
'controlnet',
'embedding',
]);
export const zModelName = z.string().trim().min(1);
export const zModelName = z.string().min(3);
export const zModelIdentifier = z.object({
model_name: zModelName,
base_model: zBaseModel,