Open History to see the last commit
1import { memoryPersistence } from '@tanstack/ai-persistence'
2
3/**
4 * Server persistence for the generation demo. `memoryPersistence()` ships the
5 * three stores generation persistence uses — `generationRuns` (run lifecycle +
6 * result metadata), plus `artifacts` and `blobs` for durable byte storage — so a
7 * reload restores the actual generated image, not just its status. The generate
8 * route and the artifact serve route both import this module so they share one
9 * store. Point it at a durable backend for production.
10 */
11export const generationServerPersistence = memoryPersistence()