cerebrasTemplatemain.tsx3 matches
3import React, { useState } from "https://esm.sh/react@18.2.0";
45function App() {
6const [messages, setMessages] = useState([]);
7const [input, setInput] = useState("");
71}
7273function client() {
74createRoot(document.getElementById("root")).render(<App />);
75}
79}
8081export default async function server(request: Request): Promise<Response> {
82if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
83const { messages } = await request.json();
Code_Debuggermain.tsx6 matches
8const marked = markedLib.marked;
910function App() {
11const [messages, setMessages] = useState([]);
12const [input, setInput] = useState("");
35// Configure marked for enhanced markdown rendering
36marked.setOptions({
37highlight: function(code, lang) {
38try {
39return hljs.highlight(code, { language: lang || "plaintext" }).value;
138}
139140function client() {
141// Load highlight.js and markdown CSS
142const links = [
166}
167168export default async function server(request: Request): Promise<Response> {
169if (request.method === "POST" && new URL(request.url).pathname === "/debug") {
170const { messages, context } = await request.json();
171const lastUserMessage = messages[messages.length - 1].content;
172173// Function to search StackOverflow
174async function searchStackOverflow(query: string) {
175try {
176const response = await fetch(
productiveCyanPigeonmain.tsx6 matches
11import React, { useState, useEffect } from 'react';
1213function MemeCoin() {
14const [tokenSupply, setTokenSupply] = useState(1000000);
15const [price, setPrice] = useState(0.01);
45import React, { useState, useEffect } from 'react';
4647function MemeCoin() {
48const [tokenSupply, setTokenSupply] = useState(500000);
49const [price, setPrice] = useState(0.05);
88];
8990function MemeCoinCodeGenerator() {
91const [selectedTemplate, setSelectedTemplate] = useState(STARTER_PROMPTS[0]);
92const [generatedCode, setGeneratedCode] = useState(selectedTemplate.baseCode);
161}
162163function App() {
164return <MemeCoinCodeGenerator />;
165}
166167function client() {
168createRoot(document.getElementById("root")).render(<App />);
169}
170if (typeof document !== "undefined") { client(); }
171172export default async function server(request: Request): Promise<Response> {
173return new Response(`
174<html>
cerebras_codermain.tsx3 matches
28);
2930function FinanceApp() {
31// Existing state variables
32const [income, setIncome] = useState([]);
283}
284285function client() {
286createRoot(document.getElementById("root")).render(<FinanceApp />);
287}
289if (typeof document !== "undefined") { client(); }
290291export default async function server(request: Request) {
292return new Response(`
293<!DOCTYPE html>
fastPlumBonobomain.tsx11 matches
73const PoweredByInfo = "";
7475function Hero({
76prompt,
77setPrompt,
9495<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
96Turn your ideas into fully functional apps in{" "}
97<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
98less than a second
168}
169170function App() {
171const previewRef = React.useRef<HTMLDivElement>(null);
172const [prompt, setPrompt] = useState("");
222});
223224function handleStarterPromptClick(promptItem: typeof prompts[number]) {
225setLoading(true);
226setTimeout(() => handleSubmit(promptItem.prompt), 0);
227}
228229async function handleSubmit(e: React.FormEvent | string) {
230if (typeof e !== "string") {
231e.preventDefault();
278}
279280function handleVersionChange(direction: "back" | "forward") {
281const { currentVersionIndex, versions } = versionHistory;
282if (direction === "back" && currentVersionIndex > 0) {
994);
995996function client() {
997const path = window.location.pathname;
998const root = createRoot(document.getElementById("root")!);
1030}
10311032function extractCodeFromFence(text: string): string {
1033const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1034return htmlMatch ? htmlMatch[1].trim() : text;
1035}
10361037async function generateCode(prompt: string, currentCode: string) {
1038const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1039if (starterPrompt) {
1080}
10811082export default async function cerebras_coder(req: Request): Promise<Response> {
1083// Dynamic import for SQLite to avoid client-side import
1084const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1183<meta property="og:site_name" content="Cerebras Coder">
1184<meta property="og:url" content="https://cerebrascoder.com"/>
1185<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1186<meta property="og:type" content="website">
1187<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
observantBronzeOrcamain.tsx11 matches
73const PoweredByInfo = "";
7475function Hero({
76prompt,
77setPrompt,
9495<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
96Turn your ideas into fully functional apps in{" "}
97<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
98less than a second
168}
169170function App() {
171const previewRef = React.useRef<HTMLDivElement>(null);
172const [prompt, setPrompt] = useState("");
222});
223224function handleStarterPromptClick(promptItem: typeof prompts[number]) {
225setLoading(true);
226setTimeout(() => handleSubmit(promptItem.prompt), 0);
227}
228229async function handleSubmit(e: React.FormEvent | string) {
230if (typeof e !== "string") {
231e.preventDefault();
278}
279280function handleVersionChange(direction: "back" | "forward") {
281const { currentVersionIndex, versions } = versionHistory;
282if (direction === "back" && currentVersionIndex > 0) {
994);
995996function client() {
997const path = window.location.pathname;
998const root = createRoot(document.getElementById("root")!);
1030}
10311032function extractCodeFromFence(text: string): string {
1033const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1034return htmlMatch ? htmlMatch[1].trim() : text;
1035}
10361037async function generateCode(prompt: string, currentCode: string) {
1038const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1039if (starterPrompt) {
1080}
10811082export default async function cerebras_coder(req: Request): Promise<Response> {
1083// Dynamic import for SQLite to avoid client-side import
1084const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1183<meta property="og:site_name" content="Cerebras Coder">
1184<meta property="og:url" content="https://cerebrascoder.com"/>
1185<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1186<meta property="og:type" content="website">
1187<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
cerebras_codermain.tsx11 matches
73const PoweredByInfo = "";
7475function Hero({
76prompt,
77setPrompt,
9495<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
96Turn your ideas into fully functional apps in{" "}
97<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
98less than a second
168}
169170function App() {
171const previewRef = React.useRef<HTMLDivElement>(null);
172const [prompt, setPrompt] = useState("");
222});
223224function handleStarterPromptClick(promptItem: typeof prompts[number]) {
225setLoading(true);
226setTimeout(() => handleSubmit(promptItem.prompt), 0);
227}
228229async function handleSubmit(e: React.FormEvent | string) {
230if (typeof e !== "string") {
231e.preventDefault();
278}
279280function handleVersionChange(direction: "back" | "forward") {
281const { currentVersionIndex, versions } = versionHistory;
282if (direction === "back" && currentVersionIndex > 0) {
994);
995996function client() {
997const path = window.location.pathname;
998const root = createRoot(document.getElementById("root")!);
1030}
10311032function extractCodeFromFence(text: string): string {
1033const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1034return htmlMatch ? htmlMatch[1].trim() : text;
1035}
10361037async function generateCode(prompt: string, currentCode: string) {
1038const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1039if (starterPrompt) {
1080}
10811082export default async function cerebras_coder(req: Request): Promise<Response> {
1083// Dynamic import for SQLite to avoid client-side import
1084const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1183<meta property="og:site_name" content="Cerebras Coder">
1184<meta property="og:url" content="https://cerebrascoder.com"/>
1185<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1186<meta property="og:type" content="website">
1187<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
cerebras_codermain.tsx11 matches
73const PoweredByInfo = "";
7475function Hero({
76prompt,
77setPrompt,
9495<p className="text-[#bababa] text-center max-w-[25ch] mx-auto my-4 font-dm-sans">
96Turn your ideas into fully functional apps in{" "}
97<span className="relative w-fit text-fuchsia-400 z-10 italic font-semibold rounded-full">
98less than a second
168}
169170function App() {
171const previewRef = React.useRef<HTMLDivElement>(null);
172const [prompt, setPrompt] = useState("");
222});
223224function handleStarterPromptClick(promptItem: typeof prompts[number]) {
225setLoading(true);
226setTimeout(() => handleSubmit(promptItem.prompt), 0);
227}
228229async function handleSubmit(e: React.FormEvent | string) {
230if (typeof e !== "string") {
231e.preventDefault();
278}
279280function handleVersionChange(direction: "back" | "forward") {
281const { currentVersionIndex, versions } = versionHistory;
282if (direction === "back" && currentVersionIndex > 0) {
994);
995996function client() {
997const path = window.location.pathname;
998const root = createRoot(document.getElementById("root")!);
1030}
10311032function extractCodeFromFence(text: string): string {
1033const htmlMatch = text.match(/```html\n([\s\S]*?)\n```/);
1034return htmlMatch ? htmlMatch[1].trim() : text;
1035}
10361037async function generateCode(prompt: string, currentCode: string) {
1038const starterPrompt = STARTER_PROMPTS.find(p => p.prompt === prompt);
1039if (starterPrompt) {
1080}
10811082export default async function cerebras_coder(req: Request): Promise<Response> {
1083// Dynamic import for SQLite to avoid client-side import
1084const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1183<meta property="og:site_name" content="Cerebras Coder">
1184<meta property="og:url" content="https://cerebrascoder.com"/>
1185<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1186<meta property="og:type" content="website">
1187<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
instagramExtractmain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function App() {
6const [url, setUrl] = useState("");
7const [resultCaption, setResultText] = useState("");
111}
112113function client() {
114createRoot(document.getElementById("root")).render(<App />);
115}
116if (typeof document !== "undefined") client();
117118export default async function server(request: Request): Promise<Response> {
119const instagramPostExtract =
120(await import("https://esm.town/v/wolf/instagramExtractUtils?v=55"))
textToGeneratemain.tsx3 matches
5import React, { useState } from "https://esm.sh/react@18.2.0";
67function App() {
8const [prompt, setPrompt] = useState("");
9const [imageUrl, setImageUrl] = useState("");
202};
203204function client() {
205createRoot(document.getElementById("root")).render(<App />);
206}
207if (typeof document !== "undefined") { client(); }
208209export default function server(request: Request) {
210const app = new Hono();
211