Expand search breadth and modal action metadata
build-push / docker (push) Has been cancelled

This commit is contained in:
AI Assistant
2026-03-16 17:07:53 +09:00
parent 794aec1496
commit 19425c9503
8 changed files with 60 additions and 28 deletions
+6 -3
View File
@@ -82,6 +82,7 @@ type PreviewResponse struct {
type searchDebugSummary struct {
Total int `json:"total"`
VisibleCount int `json:"visibleCount,omitempty"`
BySource map[string]int `json:"bySource"`
WithPreview int `json:"withPreview"`
WithThumbnail int `json:"withThumbnail"`
@@ -477,16 +478,16 @@ func (a *App) searchMedia(c *gin.Context) {
return
}
merged := services.MergeRecommendations(recommended, scored, 20)
merged := services.MergeRecommendations(recommended, scored, 16)
if geminiErr != nil {
merged = services.BackfillRecommendations(
merged,
scored,
12,
16,
"Gemini 배치 일부가 실패해 미리보기 가능한 상위 후보를 보강했습니다.",
)
}
merged = services.RandomizeTopRecommendations(merged, 8)
merged = services.RandomizeTopRecommendations(merged, 6)
for idx := range merged {
merged[idx] = services.DecorateRecommendationMedia(merged[idx])
}
@@ -665,6 +666,7 @@ func summarizeSearchResults(results []services.SearchResult, duration time.Durat
}
return searchDebugSummary{
Total: len(results),
VisibleCount: len(results),
BySource: bySource,
WithPreview: withPreview,
WithThumbnail: withThumbnail,
@@ -717,6 +719,7 @@ func summarizeRecommendationResults(results []services.AIRecommendation, duratio
}
return searchDebugSummary{
Total: len(results),
VisibleCount: len(results),
BySource: bySource,
WithPreview: withPreview,
WithThumbnail: withThumbnail,