npx moonpeak new my-app moon| Part | File |
|---|---|
| View | src/resources/moon/moon.tsx, moon.css |
| Tools | src/tools/show-moon.ts (with View), src/tools/moon-facts.ts (text only) |
| Tests | tests/simulations/show-moon.json, moon-facts.json, tests/e2e/moon.spec.ts, tests/evals/moon.eval.json |
What it shows
- Reading tool data with
useToolDataand handling pending and error states. - Calling the same tool again from the View ("Week →") with
useCallTool, keeping the new result inuseAppState. - Posting a follow-up question with
useSendMessage. - Asking for fullscreen with
useRequestDisplayModeand styling per display mode. - A text-only sibling tool (
moon-facts), so evals can check the model picks the right one.
The moon math in src/lib/moon.ts is real (synodic month from a known new moon), so no API is needed.