From a45a399569c2ae1b0906d5790579dff7ccc40976 Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Fri, 4 Sep 2026 17:04:03 +0200 Subject: [PATCH] ui : reuse the canonical quant bit-depth and extension parsing Drop the duplicated UD- prefix and quant bit-depth regexes from the download options utils: quantBitDepth re-implemented, more crudely, what HuggingFaceService.getBitDepth already does, and the label helper re-declared the weight-extension pattern held by MODEL_ID. The command preview now derives its bit depth via the service, so the quant chips and the command sorts agree. Assisted-by: llama-ui:Qwen3.8-Flash-Next --- ...tailsDownloadOptionsDownloadCommand.svelte | 6 +++-- .../download-options.utils.ts | 25 ++----------------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/tools/ui/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDownloadCommand.svelte b/tools/ui/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDownloadCommand.svelte index f1b7d59373..99f855157b 100644 --- a/tools/ui/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDownloadCommand.svelte +++ b/tools/ui/src/lib/components/app/models/discover/ModelsDiscoverDetails/ModelsDiscoverDetailsDownloadOptions/ModelsDiscoverDetailsDownloadOptionsDownloadCommand.svelte @@ -1,11 +1,11 @@