orbiterHealthnotify1 match
4const thisURL = parseProject(import.meta.url).links.self.latest;
56export async function notify(message: string) {
7await email({
8to: ["steve@orbiter.host", "justin@orbiter.host"],
cerebras_codermain.tsx10 matches
24);
2526function Hero({
27prompt,
28setPrompt,
4546<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
47Turn your ideas into fully functional apps in{" "}
48<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
49less than a second
116}
117118function App() {
119const previewRef = React.useRef<HTMLDivElement>(null);
120const [prompt, setPrompt] = useState("");
170});
171172function handleStarterPromptClick(promptItem: typeof prompts[number]) {
173setLoading(true);
174setTimeout(() => handleSubmit(promptItem.prompt), 0);
175}
176177async function handleSubmit(e: React.FormEvent | string) {
178if (typeof e !== "string") {
179e.preventDefault();
226}
227228function handleVersionChange(direction: "back" | "forward") {
229const { currentVersionIndex, versions } = versionHistory;
230if (direction === "back" && currentVersionIndex > 0) {
974);
975976function client() {
977const path = window.location.pathname;
978const root = createRoot(document.getElementById("root")!);
1010}
10111012function extractCodeFromFence(text: string): string {
1013const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1014return htmlMatch ? htmlMatch[1].trim() : text;
1015}
10161017async function generateCode(prompt: string, currentCode: string) {
1018const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1019if (starterPrompt) {
1059}
10601061export default async function server(req: Request): Promise<Response> {
1062// Dynamic import for SQLite to avoid client-side import
1063const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
getProjectsAsZipsApp.tsx1 match
4import { MessageInput } from "./MessageInput.tsx";
56export function App(
7{ initialMessages = [], thisProjectURL }: { initialMessages?: Message[]; thisProjectURL?: string },
8) {
Prompt_Improverorchestrator1 match
4const TIMEOUT_MS = 30000; // 30 second timeout
56export default async function(request: Request) {
7try {
8const { prompt } = await request.json();
practicalIvoryTurtlemain.tsx1 match
12* @returns {Promise<void>} Sends an email if new stock trades are found
13*/
14export async function fetchCongressTradeReports({ lastRunAt }) {
15// Fetch the latest trade reports from Capitol Trades API
16const res = await fetchJSON(
12* @returns {Promise<void>} Sends an email if new stock trades are found
13*/
14export async function fetchCongressTradeReports({ lastRunAt }) {
15// Fetch the latest trade reports from Capitol Trades API
16const res = await fetchJSON(
ACControllerAppmain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function ACController() {
6const [temperature, setTemperature] = useState(72);
7const [mode, setMode] = useState('cool');
90}
9192function client() {
93createRoot(document.getElementById("root")).render(<ACController />);
94}
95if (typeof document !== "undefined") { client(); }
9697export default async function server(request: Request): Promise<Response> {
98return new Response(`
99<html>
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=5";
34export async function aqi(interval: Interval) {
5const location = "Havemeyer Road, Irvington, NY"; // <-- change to place, city, or zip code
6const data = await easyAQI({ location });
Prompt_Improverindex.html5 matches
1export default async function(request) {
2return new Response(
3`<!DOCTYPE html>
8<script>
9if ('serviceWorker' in navigator) {
10window.addEventListener('load', function() {
11navigator.serviceWorker.register('/service-worker.js').then(function(registration) {
12console.log('ServiceWorker registration successful with scope: ', registration.scope);
13}, function(err) {
14console.log('ServiceWorker registration failed: ', err);
15});
16});
17}
18function improvePrompt() {
19const promptInput = document.getElementById('promptInput').value;
20// Simulate the improvement process
6const MAX_STEPS = 10;
78export default async function(request: Request) {
9const {
10prompt,