Download more, file labels, split-file grouping, settings for labels and tags

- Files tab: "Download more" adds files to a model's selection and queues them
- Colored file labels (Model, MTP, Vision/mmproj, imatrix, Config, …)
- Split GGUF/safetensors parts shown and selected as one entry everywhere
- Settings page with a Labels section: file label names/colors, tag
  rename/recolor/delete; new settings table and tags.color
- Quants only count model weights

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-05 20:42:03 +02:00
1 parent 5211ec9064
commit df18415e02
34 files changed
+2256 -132

No files matched your search

+5 -3
View File
@@ -3,6 +3,7 @@ import { and, asc, desc, eq, sql } from "drizzle-orm";
import { db } from "@/lib/db/client";
import { modelFiles, models, modelTags, tags } from "@/lib/db/schema";
import { modelFamilies } from "@/lib/hub/metadata";
import { fileRole } from "@/lib/file-roles";
import { quantGroup } from "@/lib/selection";
import type { Tag } from "@/lib/tags";
@@ -38,15 +39,16 @@ export async function listLibrary() {
.select({ modelId: modelFiles.modelId, path: modelFiles.path })
.from(modelFiles)
.where(eq(modelFiles.selected, true));
const quants = groupBy(selected, (f) => f.modelId, (f) => quantGroup(f.path));
// Only model weights count as a quant (not MTP heads, mmproj or imatrix files).
const quants = groupBy(selected, (f) => f.modelId, (f) => (fileRole(f.path) === "model" ? quantGroup(f.path) : null));
const tagRows = await d
.select({ modelId: modelTags.modelId, id: tags.id, name: tags.name })
.select({ modelId: modelTags.modelId, id: tags.id, name: tags.name, color: tags.color })
.from(modelTags)
.innerJoin(tags, eq(tags.id, modelTags.tagId))
.orderBy(asc(tags.slug));
const tagsByModel = new Map<string, Tag[]>();
for (const t of tagRows) tagsByModel.set(t.modelId, [...(tagsByModel.get(t.modelId) ?? []), { id: t.id, name: t.name }]);
for (const t of tagRows) tagsByModel.set(t.modelId, [...(tagsByModel.get(t.modelId) ?? []), { id: t.id, name: t.name, color: t.color }]);
return rows.map((r) => ({
...r,