labels.ts
1,936 bytes
| 1 | import type { CategoryId, ConfigStatus } from 'shared/types' |
|---|---|
| 2 | |
| 3 | export interface CategoryLabel { |
| 4 | label: string |
| 5 | description: string |
| 6 | } |
| 7 | |
| 8 | export const CATEGORY_LABELS: Record<CategoryId, CategoryLabel> = { |
| 9 | goal: { label: 'The big idea', description: 'What you want to build, and why' }, |
| 10 | users: { label: "Who it's for", description: 'The people who will use it' }, |
| 11 | 'core-flow': { label: 'How it works', description: 'The main steps someone takes to use it' }, |
| 12 | data: { label: 'What it remembers', description: 'The information it stores or keeps track of' }, |
| 13 | integrations: { label: 'What it connects to', description: 'Any other apps or services it needs to talk to' }, |
| 14 | 'edge-cases': { label: 'Tricky situations', description: 'What happens when something goes wrong or unusual' }, |
| 15 | constraints: { label: 'Rules & limits', description: 'Any must-haves, like platform, budget, or speed' }, |
| 16 | 'non-goals': { label: "What's NOT included", description: "Things you're deliberately leaving out for now" }, |
| 17 | verification: { label: "How you'll know it's done", description: 'What "finished" looks like' }, |
| 18 | } |
| 19 | |
| 20 | export function connectionLabel(status: ConfigStatus): string { |
| 21 | if (status.mode === 'demo') return 'Demo mode' |
| 22 | if (status.mode === 'real') return 'Your own keys' |
| 23 | return 'Setup needed' |
| 24 | } |
| 25 | |
| 26 | export function connectionDetail(status: ConfigStatus): string { |
| 27 | if (status.mode === 'demo') { |
| 28 | return status.demoLocked |
| 29 | ? 'Started with npm run demo, so this session always uses the built-in sample answers.' |
| 30 | : 'Using built-in sample answers. Nothing leaves this computer.' |
| 31 | } |
| 32 | if (status.mode === 'real') { |
| 33 | const anthropic = status.anthropicKeyHint ?? 'saved' |
| 34 | const openai = status.openaiKeyHint ?? 'saved' |
| 35 | return `Interview key ${anthropic}, speech key ${openai}. Both stay in a local file on this computer.` |
| 36 | } |
| 37 | return 'Add your two keys to talk to a real interviewer, or try the demo first.' |
| 38 | } |
| 39 | |