cerebras_codermain.tsx11 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) {
1060}
10611062export default async function cerebras_coder(req: Request): Promise<Response> {
1063// Dynamic import for SQLite to avoid client-side import
1064const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1163<meta property="og:site_name" content="Cerebras Coder">
1164<meta property="og:url" content="https://cerebrascoder.com"/>
1165<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by deepseek-r1-distill-llama-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
1166<meta property="og:type" content="website">
1167<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
TestprojectfineRoseSquirrel1 match
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
23`;
2425function Hero() {
26return (
27<div className="hero">
32}
3334function HowItWorks() {
35return (
36<div className="how-it-works">
53}
5455function App() {
56const [ycCompanies, setYcCompanies] = useState<YCCompany[]>([]);
57const [mergedData, setMergedData] = useState<any[]>([]);
217}
218219function client() {
220createRoot(document.getElementById("root")!).render(<App />);
221}
225}
226227export default async function server(request: Request): Promise<Response> {
228const companies = await fetch("https://stevekrouse-yc_database.web.val.run").then(res => res.json());
229const url = new URL(request.url);
genuineSilverUrialmain.tsx3 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function GtaInfo() {
6const [selectedCharacter, setSelectedCharacter] = useState(null);
769}
7071function client() {
72createRoot(document.getElementById("root")).render(<GtaInfo />);
73}
74if (typeof document !== "undefined") { client(); }
7576export default async function server(request: Request): Promise<Response> {
77return new Response(`
78<html>
6970// Export for Val Town
71export async function test(args) {
72return await runTests();
73}
exceptionalBlushCarpmain.tsx7 matches
1import { blob } from '@val.town/utils';
23export async function windsurfIDE(args) {
4const { type, ...params } = args;
5
22}
2324async function handleStartGoal(goal) {
25const state = await blob.get('windsurf_state') || {
26goals: [],
58}
5960async function handleCompleteTask(taskId) {
61const state = await blob.get('windsurf_state');
62if (!state) return { error: 'No active state' };
82}
8384async function handleAutoNext() {
85const state = await blob.get('windsurf_state');
86if (!state || !state.currentGoal) return { status: "NO_ACTIVE_GOAL" };
116}
117118async function loadMemory(memoryId) {
119const state = await blob.get('windsurf_state');
120if (!state) return { error: 'No active state' };
136}
137138async function applyRule(rule, target, state) {
139// Rule application logic
140switch(rule.action) {
155}
156157function prioritizeTask(task, state, criteria) {
158// Task prioritization logic based on rules
159return task;
luminousOrangeDingomain.tsx1 match
6970// Export for Val Town
71export async function test(args) {
72return await runTests();
73}
tangibleBrownPtarmiganmain.tsx7 matches
1import { blob } from '@val.town/utils';
23export async function windsurfIDE(args) {
4const { type, ...params } = args;
5
22}
2324async function handleStartGoal(goal) {
25const state = await blob.get('windsurf_state') || {
26goals: [],
58}
5960async function handleCompleteTask(taskId) {
61const state = await blob.get('windsurf_state');
62if (!state) return { error: 'No active state' };
82}
8384async function handleAutoNext() {
85const state = await blob.get('windsurf_state');
86if (!state || !state.currentGoal) return { status: "NO_ACTIVE_GOAL" };
116}
117118async function loadMemory(memoryId) {
119const state = await blob.get('windsurf_state');
120if (!state) return { error: 'No active state' };
136}
137138async function applyRule(rule, target, state) {
139// Rule application logic
140switch(rule.action) {
155}
156157function prioritizeTask(task, state, criteria) {
158// Task prioritization logic based on rules
159return task;
bubblyMaroonLungfishmain.tsx1 match
6970// Export for Val Town
71export async function test(args) {
72return await runTests();
73}
6970// Export for Val Town
71export async function test(args) {
72return await runTests();
73}