- Fix chat persistence: unwrap Vue Proxy objects before IDB storage, flush pending saves on page unload/visibility change, use immediate saves for conversation creation and seed migration - Fix player performance: parallel music search across providers, server-side LRU cache, client-side result cache, audio element reuse, instant UI feedback, abort stale searches, next-song prefetch - Fix content extraction: strip recipe/event tags in stripContentTags, extend cleanMagazineContent regex for all _ext patterns - Fix PlayerBar: move to App.vue root to avoid stacking context clipping, remove unused isDark conditionals (dark-only app) - Add /seed command: loads 15 seed conversations from fixture index, opens history panel, switches to first seed conversation - Add seed prompt index: 15 realistic AI prompt/response pairs covering films, songs, books, TV, places, podcasts, code, images, recipes, events - Add seedExtraction.test.ts: 60 tests validating extraction counts, tag stripping completeness, and data integrity Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
780 B
TypeScript
22 lines
780 B
TypeScript
/**
|
|
* Generate .dev/chats.json from the seed prompt index.
|
|
* Run: npx tsx packages/app/scripts/generate-seed-chats.ts
|
|
*/
|
|
import { seedPromptsToConversations } from '../src/__tests__/fixtures/seedPrompts'
|
|
import { writeFileSync, mkdirSync, existsSync } from 'fs'
|
|
import { resolve, dirname } from 'path'
|
|
|
|
const outPath = resolve(dirname(new URL(import.meta.url).pathname), '../.dev/chats.json')
|
|
const dir = dirname(outPath)
|
|
if (!existsSync(dir)) mkdirSync(dir, { recursive: true })
|
|
|
|
const conversations = seedPromptsToConversations()
|
|
const ids = Object.keys(conversations)
|
|
const data = {
|
|
conversations,
|
|
activeConversationId: ids[0] ?? null,
|
|
}
|
|
|
|
writeFileSync(outPath, JSON.stringify(data, null, 2), 'utf-8')
|
|
console.log(`Wrote ${ids.length} seed conversations to ${outPath}`)
|