| Philip Zeyliger | d43e572 | 2025-04-23 19:21:26 -0700 | [diff] [blame] | 1 | # Developing Sketch |
| 2 | |
| 3 | ## Running tests |
| 4 | |
| 5 | * `go test ./...` |
| 6 | * `cd loop/webui && CI=1 npm run test` |
| 7 | |
| 8 | ## Synchronizing Go structs and TypeScript types |
| 9 | |
| 10 | Run `npm run gentypes`, which uses `cmd/go2ts/go2ts.go` under the covers and |
| 11 | which has a list of types to translate. |
| 12 | |
| 13 | ## Dealing with tests that have HTTP Record sessions |
| 14 | |
| 15 | A few tests record/replay calls to LLMs. As necessary (e.g., |
| 16 | if changing the system prompt or tool definitions), rebuild the |
| 17 | test data with: |
| 18 | |
| 19 | ``` |
| 20 | go test ./dockerimg -httprecord ".*" -rewritewant |
| 21 | go test ./loop -httprecord .*agent_.* |
| 22 | ``` |