1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useRef, useState } from "https://esm.sh/react@18.2.0?dev";
3import { ImageUpload, processFiles } from "./ImageUpload.tsx";
4
5interface ChatInputProps {
6 input: string;
7 handleInputChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
8 handleSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
9 running: boolean;
10 images: (string | null)[];
11 setImages: React.Dispatch<React.SetStateAction<(string | null)[]>>;
12 isDragging: boolean;
13}
41 }, []);
42
43 const handleFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {
44 e.preventDefault();
45 const validImages = images.filter((img): img is string => typeof img === "string");
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3import { BranchControl } from "./BranchControl.tsx";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React, { useEffect, useState } from "https://esm.sh/react@18.2.0?dev";
3import { CreateBranch } from "./CreateBranch.tsx";
4
84
85 // Handle branch selection change
86 const handleBranchChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
87 const newBranchId = e.target.value;
88 setBranchId(newBranchId);
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import { useLocalStorage } from "https://esm.sh/react-use?dev&deps=react@18.2.0&react-dom@18.2.0";
3import React, { useState } from "https://esm.sh/react@18.2.0?dev";
4import { Chat } from "./Chat.tsx";
5import { Login } from "./Login.tsx";
1/** @jsxImportSource https://esm.sh/react@18.2.0?dev */
2import React from "https://esm.sh/react@18.2.0?dev";
3
4interface ApiKeyWarningProps {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
3import React from "https://esm.sh/react@18.2.0";
4
5function App() {
1/** @jsxImportSource npm:react */
2import { renderToStaticMarkup } from "npm:react-dom/server";
3
4import Mark from "./val-town-logomark";
1/** @jsxImportSource npm:react */
2import { renderToStaticMarkup } from "npm:react-dom/server";
3
4import CodeIcon from "./code-icon";
1/** @jsxImportSource npm:react */
2import React from "npm:react";
3
4export default function CodeIcon(props: React.SVGProps<SVGSVGElement>) {
5 return (
6 <svg
1/** @jsxImportSource npm:react */
2import React from "npm:react";
3
4export default function ValTownLogomark(props: React.SVGProps<SVGSVGElement>) {
5 return (
6 <svg