Lumbridge Bench
CI / verify (push) Successful in 24s
CI / deploy (push) Failing after 1m14s

This commit is contained in:
Karti Tripathi
2026-08-04 00:44:07 -07:00
commit 006feee0f7
65 changed files with 13516 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
/**
* Normalize a public Hugging Face reference before it becomes an inert
* Lumbridge model-suggestion record.
*/
export function parseHuggingFaceRef(input: string): string | null {
const trimmed = input.trim().replace(/\/+$/, "");
const url = trimmed
.replace(/^https?:\/\/(www\.)?huggingface\.co\//i, "")
.replace(/^hf:\/\//i, "");
// owner/model — letters, digits, dot, dash, underscore.
return /^[\w.-]+\/[\w.-]+$/.test(url) ? url : null;
}