← Public packages
@kentcdodds/ai
Kody tool-using agent turns with Vercel AI SDK and Cloudflare AI Gateway.
src/migrate-from-values.ts
16 lines · 607 B · TypeScriptimport { migrateAiFromValues } from './legacy-value.ts'
/**
* Copy Cloudflare AI ids into this package's storage if they are already set.
* Use this after a values-to-storage migration; it is a no-op when nothing is stored yet.
*
* @returns `{ copied }` naming which storage keys were already populated.
*
* @example
* import migrateFromValues from 'kody:@kentcdodds/ai/migrate-from-values'
* const result = await migrateFromValues()
* // => { copied: ['cloudflareAccountId', 'cloudflareAiGatewayId'] }
*/
export default async function migrateFromValues() {
return await migrateAiFromValues()
}