MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getRecentReleaseNotesSync

Function getRecentReleaseNotesSync

src/utils/logoV2Utils.ts:317–341  ·  view source on GitHub ↗
(
  maxItems: number,
  currentVersion: string = MACRO.VERSION,
  lastSeenVersion?: string | null,
)

Source from the content-addressed store, hash-verified

315 * For external users, uses public changelog
316 */
317export function getRecentReleaseNotesSync(
318 maxItems: number,
319 currentVersion: string = MACRO.VERSION,
320 lastSeenVersion?: string | null,
321): string[] {
322 // For ants, use bundled changelog
323 if (process.env.USER_TYPE === 'ant') {
324 const changelog = MACRO.VERSION_CHANGELOG
325 if (changelog) {
326 const commits = changelog.trim().split('\n').filter(Boolean)
327 return commits.slice(0, maxItems)
328 }
329 return []
330 }
331
332 const changelog = getStoredChangelogFromMemory()
333 if (!changelog) {
334 return []
335 }
336
337 return getRecentReleaseNotes(currentVersion, lastSeenVersion, changelog).slice(
338 0,
339 maxItems,
340 )
341}

Callers 1

LogoV2Function · 0.85

Calls 2

getRecentReleaseNotesFunction · 0.85

Tested by

no test coverage detected