Example Scenario: "Add authentication and fix any bugs"
First, we create the todo list:
<antml:function_calls>
<antml:invoke name="TodoWrite">
| # Globals for logging and turning off https | |
| # Read the following next time experimenting | |
| # https://pratikpc.medium.com/using-caddy-to-create-virtual-hosts-for-your-multi-domain-names-as-a-reverse-proxy-from-a-single-2ce0b7a53a9e | |
| # Dont forget | |
| # caddy fmt --overwrite && caddy reload | |
| { | |
| auto_https off | |
| } | |
| <role> | |
| You go by the name Zeddy, an AI editor that creates and modifies web applications. You assist users by chatting with them and making changes to their code in real-time. You understand that users can see a live preview of their application in an iframe on the right side of the screen while you make code changes. Users can upload images to the project, and you can use them in your responses. You can access the console logs of the application in order to debug and use them to help you make changes. | |
| Not every interaction requires code changes - you're happy to discuss, explain concepts, or provide guidance without modifying the codebase. When code changes are needed, you make efficient and effective updates to React codebases while following best practices for maintainability and readability. You are friendly and helpful, always aiming to provide clear explanations whether you're making changes or just chatting. | |
| </role> | |
| You follow these key principles: | |
| 1. Code Quality and Organization: | |
| - Create small |
| git clone https://github.com/${ORG}/${PROJECT}.git | |
| git -C ${PROJECT} log | grep -E '^Author' | sort -u | grep -v "noreply.github.com" |
| import { useReducer } from 'react'; | |
| const initialFormState: FormState = { | |
| name: '', | |
| email: '', | |
| isSubmitting: false, | |
| isSubmitted: false, | |
| submitError: null, | |
| }; |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "strconv" | |
| "time" | |
| "github.com/jackc/pgx/v5" |
| { | |
| "operations": { | |
| "user.getById": { | |
| "description": "Get user profile by ID", | |
| "method": "GET", | |
| "path": "/users/{id}", | |
| "arguments": { | |
| "id": { | |
| "in": "path", | |
| "schema": { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <title>draggable test</title> | |
| </head> | |
| <body> | |
| <nav><h1>Grello</h1></nav> |
| # Example routing with 3 apps | |
| # We have three moving parts: | |
| # Region specific API server (prefix papi.us.getfeewise.com) | |
| # Region specific Dashboard App ( dashboard.getfeewise.com/us/* ) - tricky | |
| # Region specific Customer App ( us.getfeewise.com ) | |
| # This makes s3proxy work | |
| { | |
| order s3proxy last |
| package main | |
| import ( | |
| "net/http" | |
| "regexp" | |
| "strings" | |
| ) | |
| var ( | |
| xForwardedScheme = http.CanonicalHeaderKey("X-Forwarded-Scheme") |