| 2216 | } |
| 2217 | |
| 2218 | function pushMetaText(push, papers, metadata = {}, options = {}) { |
| 2219 | if (!push?.push_id) return ui().papers.pushEmpty; |
| 2220 | const parts = []; |
| 2221 | if (options.fromCache) parts.push(ui().papers.recentCache); |
| 2222 | parts.push(`${ui().papers.batch} ${push.push_id}`); |
| 2223 | parts.push(push.push_time || ui().common.localTime); |
| 2224 | parts.push(ui().papers.recommendations(papers.length)); |
| 2225 | if (metadata.daily_limit) parts.push(ui().papers.dailyLimit(metadata.daily_limit)); |
| 2226 | if (metadata.limit_per_source) parts.push(ui().papers.perSourceLimit(metadata.limit_per_source)); |
| 2227 | if (metadata.relevance_threshold !== undefined && metadata.relevance_threshold !== null && metadata.relevance_threshold !== "") { |
| 2228 | parts.push(ui().papers.threshold(metadata.relevance_threshold)); |
| 2229 | } |
| 2230 | const sourceParts = [ |
| 2231 | metadata.arxiv_categories?.length ? `arXiv ${metadata.arxiv_categories.length}` : "", |
| 2232 | metadata.conferences?.length ? ui().papers.conferenceCount(metadata.conferences.length) : "", |
| 2233 | metadata.journals?.length ? ui().papers.journalCount(metadata.journals.length) : "", |
| 2234 | metadata.enable_semantic_scholar ? "Semantic Scholar" : "", |
| 2235 | metadata.enable_custom_rss ? "RSS" : "" |
| 2236 | ].filter(Boolean); |
| 2237 | if (sourceParts.length) parts.push(ui().papers.sourceCounts(sourceParts)); |
| 2238 | return parts.join(" · "); |
| 2239 | } |
| 2240 | |
| 2241 | function renderPush(push, options = {}) { |
| 2242 | state.push = push; |