1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState } from "react";
3import { useNavigate } from "react-router";
4import { useCreateProject } from "../hooks/useCreateProject.tsx";
5
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useEffect, useState } from "react";
3
4const formatTime = (ms: number): string => {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useState, createContext, useContext } from "react";
3import ReactMarkdown from "react-markdown";
4
5import { Loading } from "./Loading.tsx";
124function TextPart ({ part }) {
125 return (
126 <ReactMarkdown>
127 {part.text}
128 </ReactMarkdown>
129 );
130}
390 {message.parts.map((part, i) => part.type === "text" ? (
391 <div key={i} className="user-message">
392 <ReactMarkdown>
393 {part.text}
394 </ReactMarkdown>
395 </div>
396 ) : (
1/** @jsxImportSource npm:react@18.2.0 */
2import { Hono } from "npm:hono";
3import { renderToString } from "npm:react-dom@18.2.0/server";
4import { TownieIcon } from "../components/icons.tsx";
5import { ValTownLogo } from "../components/ValTownLogo.tsx";
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2
3export function Loading () {
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { Outlet } from "react-router";
3import { Header } from "./Header.tsx";
4
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useRef, useState, useEffect } from "react";
3import { Link } from "react-router";
4import { PlusIcon, ArrowUpIcon, Square, XIcon } from "./icons.tsx";
5import { processFiles } from "../utils/images.ts";
16} : {
17 value: string;
18 onChange: (e: React.KeyboardEvent<HTMLInputElement>) => void;
19 onSubmit: (event: any) => void;
20 onCancel: () => void;
103 setImages: (images: (string|null)[]) => void;
104 running: boolean;
105 children: React.ReactNode;
106}) {
107 const dragging = useImageDrop({ images, setImages, running });
128 const [dragging, setDragging] = useState<boolean>(false);
129
130 const onDragEnter = (e: React.DragEvent) => {
131 e.preventDefault();
132 if (!e.dataTransfer?.types.includes('Files')) return;
134 }
135
136 const onDragLeave = (e:React.DragEvent) => {
137 e.preventDefault();
138 if (!e.relatedTarget) {
141 }
142
143 const onDragOver = (e:React.DragEvent) => {
144 e.preventDefault();
145 }
146
147 const onDrop = (e:React.DragEvent) => {
148 e.preventDefault();
149 setDragging(false);
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { useContext } from "react";
3import { ProjectContext } from "./ChatRouteSingleColumn.tsx";
4import { MessageContext } from "./Messages.tsx";
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { createRoot } from "react-dom";
3import { App } from "./components/App.tsx";
4
195 {
196 "imports": {
197 "react": "https://esm.sh/react@18.2.0",
198 "react-dom": "https://esm.sh/react-dom@18.2.0/client",
199 "react-router": "https://esm.sh/react-router@7.4.0?deps=react@18.2.0,react-dom@18.2.0",
200 "react-use": "https://esm.sh/react-use?deps=react@18.2.0,react-dom@18.2.0",
201 "@ai-sdk/react": "https://esm.sh/@ai-sdk/react@1.2.12?deps=react@18.2.0,react-dom@18.2.0,zod@3.25.76",
202 "react-markdown": "https://esm.sh/react-markdown@10.1.0?deps=react@18.2.0,react-dom@18.2.0"
203 }
204 }