refactor(app): consolidate seeds into single conversation
All 15 seed prompts now load as one conversation ("Content Showcase")
instead of 15 separate ones. /seed collapses chat to show PromptIndex
so users can quickly pick any prompt to see its content surface.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
1a76efce4a
commit
dfce63de66
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Generate .dev/chats.json from the seed prompt index.
|
||||
* Run: npx tsx packages/app/scripts/generate-seed-chats.ts
|
||||
* Run: pnpm -C packages/app exec tsx scripts/generate-seed-chats.ts
|
||||
*/
|
||||
import { seedPromptsToConversations } from '../src/__tests__/fixtures/seedPrompts'
|
||||
import { seedPromptsToConversation } from '../src/__tests__/fixtures/seedPrompts'
|
||||
import { writeFileSync, mkdirSync, existsSync } from 'fs'
|
||||
import { resolve, dirname } from 'path'
|
||||
|
||||
@@ -10,12 +10,11 @@ const outPath = resolve(dirname(new URL(import.meta.url).pathname), '../.dev/cha
|
||||
const dir = dirname(outPath)
|
||||
if (!existsSync(dir)) mkdirSync(dir, { recursive: true })
|
||||
|
||||
const conversations = seedPromptsToConversations()
|
||||
const ids = Object.keys(conversations)
|
||||
const conv = seedPromptsToConversation()
|
||||
const data = {
|
||||
conversations,
|
||||
activeConversationId: ids[0] ?? null,
|
||||
conversations: { [conv.id]: conv },
|
||||
activeConversationId: conv.id,
|
||||
}
|
||||
|
||||
writeFileSync(outPath, JSON.stringify(data, null, 2), 'utf-8')
|
||||
console.log(`Wrote ${ids.length} seed conversations to ${outPath}`)
|
||||
console.log(`Wrote seed conversation (${conv.messages.length / 2} prompts) to ${outPath}`)
|
||||
|
||||
Reference in New Issue
Block a user