| 48 | }; |
| 49 | } |
| 50 | export function createProjectOnboardingFeed(steps: Step[]): FeedConfig { |
| 51 | const enabledSteps = steps.filter(({ |
| 52 | isEnabled |
| 53 | }) => isEnabled).sort((a, b) => Number(a.isComplete) - Number(b.isComplete)); |
| 54 | const lines: FeedLine[] = enabledSteps.map(({ |
| 55 | text, |
| 56 | isComplete |
| 57 | }) => { |
| 58 | const checkmark = isComplete ? `${figures.tick} ` : ''; |
| 59 | return { |
| 60 | text: `${checkmark}${text}` |
| 61 | }; |
| 62 | }); |
| 63 | const warningText = getCwd() === homedir() ? 'Note: You have launched claude in your home directory. For the best experience, launch it in a project directory instead.' : undefined; |
| 64 | if (warningText) { |
| 65 | lines.push({ |
| 66 | text: warningText |
| 67 | }); |
| 68 | } |
| 69 | return { |
| 70 | title: 'Tips for getting started', |
| 71 | lines |
| 72 | }; |
| 73 | } |
| 74 | export function createGuestPassesFeed(): FeedConfig { |
| 75 | const reward = getCachedReferrerReward(); |
| 76 | const subtitle = reward ? `Share Claude Code and earn ${formatCreditAmount(reward)} of extra usage` : 'Share Claude Code with friends'; |