2
3export default async function (req: Request) {
4 // Serve the React app
5 return serveFile("/ChassiDeAco.tsx", import.meta.url);
6}
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { motion } from "https://esm.sh/framer-motion@10.16.4?deps=react@18.2.0";
4
5// Define interfaces for better type safety
1// @ts-ignore
2import { React } from "https://esm.sh/react@18";
3// @ts-ignore
4import { useState } from "https://esm.sh/react@18";
5
6const treinos = [
28- [x] if valid input, call stringToBoard from utils.ts on the boardstring
29- [x] with the output board of stringToBoard, follow the pattern in the /newBoard route: call solutions and create a response object to return with the board and solutions
30- [x] /play/:boardstring should return the main react app at "/" but with the data from the boardstring. Unlike /newBoard which just returns the JSON.
31
32
33## React Hono Val Town Project Starter Template
34
35This is a (remix of a) starter template for a full-stack app in a Val Town Project. The app itself is a simple persistent message board.
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0";
4
5const OUTER_RADIUS = 146;
1# Pi - Personal AI Assistant
2
3This is a personal AI assistant app built with React and Hono on Val Town. It provides a clean, minimalist chat interface for interacting with multiple AI assistants.
4
5## Key Features
47 - `/frontend/index.html` - Main HTML template
48 - `/frontend/index.tsx` - Client-side entry point
49 - `/frontend/components/` - React components for the UI
50 - `App.tsx` - Main application component
51 - `AuthScreen.tsx` - Login and signup screens
64## Technical Details
65
66- **Frontend**: React with TypeScript
67- **Backend**: Hono on Deno
68- **Database**: Supabase
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState, useEffect, useRef } from "https://esm.sh/react@18.2.0";
3import { splitIntoSentences } from "../../shared/utils.ts";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState, useRef, useEffect } from "https://esm.sh/react@18.2.0";
3import { useAuth } from "./AuthContext.tsx";
4import { AIAgent, Message, Conversation, SuggestionChip, Category, QuickAction } from "../../shared/types.ts";
16 quickActions: QuickAction[];
17 onSidebarToggle: () => void;
18 onScroll: (e: React.UIEvent<HTMLDivElement>) => void;
19 conversation: Conversation | null;
20}
180 };
181
182 const handleKeyDown = (e: React.KeyboardEvent) => {
183 if (e.key === 'Enter' && !e.shiftKey) {
184 e.preventDefault();
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useAuth } from "./AuthContext.tsx";
3import { useTheme } from "./ThemeContext.tsx";
17 };
18
19 const handleTypewriterSpeedChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
20 triggerHapticFeedback('light');
21 updateSettings({ typewriter_speed: e.target.value as 'slow' | 'medium' | 'fast' });
22 };
23
24 const handleThemeChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
25 triggerHapticFeedback('light');
26 const newTheme = e.target.value as 'light' | 'dark' | 'system';
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState } from "https://esm.sh/react@18.2.0";
3import { useAuth } from "./AuthContext.tsx";
4import { AIAgent, Conversation } from "../../shared/types.ts";