MCPcopy
hub / github.com/codeaashu/claude-code / getRecentReleaseNotesSync

Function getRecentReleaseNotesSync

src/utils/logoV2Utils.ts:312–350  ·  view source on GitHub ↗
(maxItems: number)

Source from the content-addressed store, hash-verified

310 * For external users, uses public changelog
311 */
312export function getRecentReleaseNotesSync(maxItems: number): string[] {
313 // For ants, use bundled changelog
314 if (process.env.USER_TYPE === 'ant') {
315 const changelog = MACRO.VERSION_CHANGELOG
316 if (changelog) {
317 const commits = changelog.trim().split('\n').filter(Boolean)
318 return commits.slice(0, maxItems)
319 }
320 return []
321 }
322
323 const changelog = getStoredChangelogFromMemory()
324 if (!changelog) {
325 return []
326 }
327
328 let parsed
329 try {
330 parsed = parseChangelog(changelog)
331 } catch {
332 return []
333 }
334
335 // Get notes from recent versions
336 const allNotes: string[] = []
337 const versions = Object.keys(parsed)
338 .sort((a, b) => (gt(a, b) ? -1 : 1))
339 .slice(0, 3) // Look at top 3 recent versions
340
341 for (const version of versions) {
342 const notes = parsed[version]
343 if (notes) {
344 allNotes.push(...notes)
345 }
346 }
347
348 // Return raw notes without filtering or premature truncation
349 return allNotes.slice(0, maxItems)
350}
351

Callers 1

LogoV2Function · 0.85

Calls 5

parseChangelogFunction · 0.85
gtFunction · 0.85
keysMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected