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/image-url.jpg%20%22Optional%20title%22?q=fetch&page=7&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 8272 results for "fetch"(492ms)

Townieindex.ts1 match

@loading•Updated 8 hours ago
62});
63
64export default app.fetch;
65

Townieindex.ts1 match

@loading•Updated 8 hours ago
21
22// This is the entry point for HTTP vals
23export default app.fetch;
24

TownieChatRoute.tsx8 matches

@loading•Updated 8 hours ago
46 files={project.data?.files}
47 branchId={branchId}
48 refetch={project.refetch}
49 />
50 </>
56 files,
57 branchId,
58 refetch,
59}: {
60 project: any;
61 files: any[];
62 branchId: string;
63 refetch: () => void;
64}) {
65 const { token, anthropicApiKey } = useAuth();
93 if (!messages?.length) return;
94 let last = messages.at(-1);
95 if (shouldRefetch(last)) {
96 refetch();
97 }
98 }, [messages]);
177}
178
179function shouldRefetch (message) {
180 for (let i = 0; i < message?.parts?.length; i++) {
181 let part = message.parts[i];
184 case "str_replace_editor":
185 if (part.toolInvocation?.args?.command === "create") {
186 // console.log("REFETCH (create)");
187 return true;
188 }
190 case "delete_file":
191 case "change_val_type":
192 // console.log("REFETCH (change type or delete)");
193 return true;
194 }

TownieBranchSelect.tsx1 match

@loading•Updated 8 hours ago
33 return;
34 }
35 branches.refetch();
36 if (res?.branch?.id) {
37 navigate(`/chat/${projectId}/branch/${res.branch.id}`);

snippetsendpoints.tsx2 matches

@chadparker•Updated 11 hours ago
3
4 try {
5 const res = await fetch(url);
6 if (!res.ok) {
7 return new Response(`Failed to fetch: ${res.status}`, { status: 500 });
8 }
9

untaruntar.tsx1 match

@stainless_em•Updated 16 hours ago
11 }
12 const tarballURL = "https://" + path.slice(0, sep).join("/");
13 const response = await fetch(tarballURL);
14 if (!response.ok) {
15 return new Response(response.statusText, { status: response.status });

OpenTownieTODOs.md1 match

@charmaine•Updated 18 hours ago
47<!--
48
49- [x] refetch project data on create/etc
50- [x] Loading favicon
51- [x] Ensure main branch is default selected

OpenTownieLayoutRoute.tsx1 match

@charmaine•Updated 18 hours ago
4
5export function LayoutRoute () {
6 // TODO fetch here because we're not doing any caching
7 // and we want the user data in the header ?
8 // const projects = useProjects();

OpenTownieindex.ts1 match

@charmaine•Updated 18 hours ago
21
22// This is the entry point for HTTP vals
23export default app.fetch;
24

stevensDemosendDailyBrief.ts1 match

@simonf•Updated 18 hours ago
135 const lastSunday = today.startOf("week").minus({ days: 1 });
136
137 // Fetch relevant memories using the utility function
138 const memories = await getRelevantMemories();
139

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago