feat: Enhance AI suggestion functionality in ImportClient and improve compactLine handling
Build and Push Reader Image / docker (push) Successful in 42s

This commit is contained in:
2026-05-04 20:59:30 +07:00
parent 350c4dfa18
commit 9005cfa5ef
2 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -32,8 +32,8 @@ function sourceClass(source: HotCarouselItem["hotSource"]) {
return "border-primary/30 bg-primary/20 text-primary"
}
function compactLine(text: string, max = 180) {
const normalized = text.replace(/\s+/g, " ").trim()
function compactLine(text: string | null | undefined, max = 180) {
const normalized = String(text || "").replace(/\s+/g, " ").trim()
if (normalized.length <= max) return normalized
return `${normalized.slice(0, max).trim()}...`
}