fix(llms): edge cases

This commit is contained in:
Simon
2026-03-13 21:03:29 +08:00
parent b4acd02007
commit c8a8858d24

View File

@@ -67,6 +67,9 @@ export async function fetchLlmsTxt(url: string): Promise<string | null> {
} catch {
return null // Invalid URL
}
// about:blank, data:, file:
if (origin === 'null') return null
if (llmsTxtCache.has(origin)) return llmsTxtCache.get(origin)!
const endpoint = `${origin}/llms.txt`