Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7Bsuccess?q=function&page=91&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=function

Returns an array of strings in format "username" or "username/projectName"

Found 20384 results for "function"(1427ms)

TownieMessages.tsx9 matches

@valdottown•Updated 2 days ago
23});
24
25export function Messages ({
26 messages,
27 messageEndTimes,
58}
59
60function Message ({
61 message,
62 messageEndTimes,
86}
87
88function AssistantMessage ({ message, messageEndTimes, running }: {
89 message: Message;
90 messageEndTimes: Record<string, number>;
107}
108
109function Part ({ part }) {
110 switch (part.type) {
111 case "text":
122}
123
124function TextPart ({ part }) {
125 return (
126 <ReactMarkdown>
130}
131
132function Details ({ open, onClick, children, summary }) {
133 return (
134 <details
148}
149
150function ToolPart ({ part }) {
151 const { openSummaries, setOpenSummaries } = useContext(MessageContext);
152 const {
226}
227
228function EditorToolPart ({ part }) {
229 const { openSummaries, setOpenSummaries } = useContext(MessageContext);
230 const {
293}
294
295function UserMessage ({ message }: {
296 message: Message;
297}) {

TownieLoginRoute.tsx1 match

@valdottown•Updated 2 days ago
4import { useAuth } from "../hooks/useAuth.tsx";
5
6export function LoginRoute() {
7 const navigate = useNavigate();
8 const { isAuthenticated, authenticate, error } = useAuth();

TownieLayoutRoute.tsx1 match

@valdottown•Updated 2 days ago
3import { Header } from "./Header.tsx";
4
5export function LayoutRoute() {
6 return (
7 <>

TownieInputBox.tsx6 matches

@valdottown•Updated 2 days ago
4import { processFiles } from "../utils/images.ts";
5
6export function InputBox ({
7 value,
8 onChange,
88}
89
90export function ImageDropContainer ({
91 images,
92 setImages,
115}
116
117export function useImageDrop ({ images, setImages, running }: {
118 images: (string|null)[];
119 setImages(images: (string|null)[]) => void;
164}
165
166function ImageRow ({ images, setImages }: {
167 images: (string|null)[];
168 setImages: (images: (string|null)[]) => void;
186}
187
188function Thumbnail ({ image, onRemove }: {
189 image: string|null;
190 onRemove: () => void;
211}
212
213function UploadButton ({
214 images,
215 setImages,

TownieHome.tsx1 match

@valdottown•Updated 2 days ago
9} from "./icons.tsx";
10
11export function Home() {
12 return (
13 <div className="container">

TownieHeader.tsx5 matches

@valdottown•Updated 2 days ago
6import { AppContext } from "./App.tsx";
7
8export function Header () {
9 const navigate = useNavigate();
10
25}
26
27function LogOut () {
28 const { user } = useContext(AppContext);
29 return (
46}
47
48function ValTownLogo () {
49 return (
50 <svg
64}
65
66function DarkButton () {
67 const [dark, setDark] = useLocalStorage("DARK_MODE", false);
68 const toggle = () => {
89}
90
91function AudioButton () {
92 const {audio, setAudio} = useContext(AppContext);
93

Towniefavicon.http.tsx1 match

@valdottown•Updated 2 days ago
3import { TownieIcon } from "./components/icons.tsx";
4
5export default async function (loading: boolean) {
6 const svg = renderToString(
7 <TownieIcon color="#ffffff" circle={loading ? "#0EA5E9" : "#000000"} />

TownieDebugStyles.tsx1 match

@valdottown•Updated 2 days ago
4import { Messages } from "./Messages.tsx";
5
6export function DebugStyles() {
7 const [pathname, setPathname] = useState("");
8 return (

TownieChatRoute.tsx3 matches

@valdottown•Updated 2 days ago
14import { Loading } from "./Loading.tsx";
15
16export function ChatRoute() {
17 const { projectId, branchId } = useParams() as {
18 projectId: string;
50}
51
52function Conversation({
53 project,
54 files,
163}
164
165function shouldRefetch(message) {
166 for (let i = 0; i < message?.parts?.length; i++) {
167 let part = message.parts[i];

TownieBranchSelect.tsx1 match

@valdottown•Updated 2 days ago
7const NEW_BRANCH_VAL = "__NEW_BRANCH__";
8
9export function BranchSelect() {
10 const { projectId, branchId } = useParams() as {
11 projectId: string;

getFileEmail4 file matches

@shouser•Updated 3 weeks ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 3 weeks ago
Simple functional CSS library for Val Town
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.