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();
listNotionUsersmain.tsx2 matches
7});
89// Example function to list Notion users
10export async function listNotionUsers() {
11const listUsersResponse = await notion.users.list({});
12return listUsersResponse;
windsurf_projectContextmain.tsx12 matches
45* @returns {React.ReactElement}
46*/
47function App() {
48const [state, setState] = useState({
49currentPhase: "",
117/**
118* CurrentPhase component
119* @param {{phase: string, onUpdate: Function}} props
120* @returns {React.ReactElement}
121*/
122function CurrentPhase({ phase, onUpdate }) {
123const [newPhase, setNewPhase] = useState(phase || "");
124const [error, setError] = useState("");
157/**
158* ActiveBlocks component
159* @param {{blocks: string[], onUpdate: Function}} props
160* @returns {React.ReactElement}
161*/
162function ActiveBlocks({ blocks = [], onUpdate }) {
163const [newBlock, setNewBlock] = useState("");
164const [error, setError] = useState("");
215/**
216* TaskList component
217* @param {{tasks: Task[], onUpdate: Function}} props
218* @returns {React.ReactElement}
219*/
220function TaskList({ tasks = [], onUpdate }) {
221const [newTask, setNewTask] = useState({ description: "", priority: "medium", assignedTo: "" });
222const [error, setError] = useState("");
341/**
342* StepList component
343* @param {{steps: Step[], onUpdate: Function}} props
344* @returns {React.ReactElement}
345*/
346function StepList({ steps = [], onUpdate }) {
347const [newStep, setNewStep] = useState({ description: "", priority: "medium" });
348const [error, setError] = useState("");
458* @returns {React.ReactElement}
459*/
460function ChangeList({ changes = [] }) {
461return (
462<div className="section">
476* Client-side initialization
477*/
478function client() {
479createRoot(document.getElementById("root")).render(<App />);
480}
490* @returns {Promise<Response>} The server response
491*/
492export default async function server(req: Request): Promise<Response> {
493const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
494const { blob } = await import("https://esm.town/v/std/blob");
BraintrustSDKtutorial1 match
3import { Eval } from "npm:braintrust";
45export default async function handler() {
6const result = {
7apiKeyStatus: null,
2import { Eval } from "npm:braintrust";
34export default async function handler() {
5const result = {
6apiKeyStatus: null,
queueparseImportMeta1 match
7}
89export function parseImportMeta(url: string): ImportMetaUrl {
10const pattern = /^https:\/\/esm\.town\/v\/([^/]+)\/([^@]+)@(\d+)-(.+?)(\/.*)?$/;
11const match = url.match(pattern);
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
TestprojectfineRoseSquirrel1 match
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
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;