thread-master/backend/internal/library/knowledge/patrol_resolve.go

17 lines
635 B
Go
Raw Permalink Normal View History

2026-06-26 08:37:04 +00:00
package knowledge
// ResolveScanPatrolKeywords picks the most relevant search phrases for the Search API.
// Research map and graph nodes are inputs; UI display order is not preserved.
2026-06-26 08:37:04 +00:00
func ResolveScanPatrolKeywords(explicit, saved []string, input PatrolTagInput, nodes []Node) []string {
nodes = NodesForPatrolKeywordDerivation(nodes)
return SelectBestSearchKeywords(explicit, saved, input, nodes, MaxScanPatrolKeywords)
}
func capPatrolKeywordList(keywords []string, limit int) []string {
keywords = NormalizePatrolKeywordList(keywords)
if limit <= 0 || len(keywords) <= limit {
2026-06-26 08:37:04 +00:00
return keywords
}
return keywords[:limit]
2026-06-26 08:37:04 +00:00
}