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}
Windsurfcontextmanager4 matches
1617// Context Manager Val
18export async function updateContext(context) {
19const { phase, activeBlocks, pendingTasks, recentChanges } = context;
2035}
3637export async function getLatestContext() {
38const result = db.prepare(`
39SELECT * FROM context
53}
5455export async function getContextHistory(limit = 10) {
56return db.prepare(`
57SELECT * FROM context
6263// HTTP request handler
64export async function onRequest(req) {
65const { action, params } = await req.json();
66
Windsurfprojectcontext12 matches
45* @returns {React.ReactElement}
46*/
47function App() {
48const [state, setState] = useState(null);
49const [error, setError] = useState(null);
112/**
113* CurrentPhase component
114* @param {{phase: string, onUpdate: Function}} props
115* @returns {React.ReactElement}
116*/
117function CurrentPhase({ phase, onUpdate }) {
118const [newPhase, setNewPhase] = useState(phase);
119const [error, setError] = useState("");
152/**
153* ActiveBlocks component
154* @param {{blocks: string[], onUpdate: Function}} props
155* @returns {React.ReactElement}
156*/
157function ActiveBlocks({ blocks, onUpdate }) {
158const [newBlock, setNewBlock] = useState("");
159const [error, setError] = useState("");
210/**
211* TaskList component
212* @param {{tasks: Task[], onUpdate: Function}} props
213* @returns {React.ReactElement}
214*/
215function TaskList({ tasks, onUpdate }) {
216const [newTask, setNewTask] = useState({ description: "", priority: "medium", assignedTo: "" });
217const [error, setError] = useState("");
338/**
339* StepList component
340* @param {{steps: Step[], onUpdate: Function}} props
341* @returns {React.ReactElement}
342*/
343function StepList({ steps, onUpdate }) {
344const [newStep, setNewStep] = useState({ description: "", priority: "medium" });
345const [error, setError] = useState("");
455* @returns {React.ReactElement}
456*/
457function ChangeList({ changes }) {
458return (
459<div className="section">
473* Client-side initialization
474*/
475function client() {
476createRoot(document.getElementById("root")).render(<App />);
477}
487* @returns {Promise<Response>} The server response
488*/
489export default async function server(req: Request): Promise<Response> {
490const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
491const { blob } = await import("https://esm.town/v/std/blob");
WindsurfunbeatableAquaCow4 matches
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
58`);
5960// Utility functions
61async function hashPassword(password: string, salt?: string): Promise<{ hash: string, salt: string }> {
62salt = salt || crypto.randomUUID();
63const encoder = new TextEncoder();
69}
7071async function authenticateUser(request: Request): Promise<number | null> {
72const authHeader = request.headers.get('Authorization');
73if (!authHeader) return null;
OpenAIChatCompletionmain.tsx1 match
9/**** rate-limited access to the OpenAI API ****/
1011export default async function (Request:Request):Promise<Response> {
12if (Request.method === 'OPTIONS') {
13return new Response(null, {
1import { postToBluesky } from "./blueskyPost";
23export default async function(interval: Interval) {
4await postToBluesky();
5}
1import { BskyAgent } from "npm:@atproto/api";
23export async function postToBluesky() {
4const agent = new BskyAgent({
5service: "https://bsky.social",