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=image&page=61&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 6581 results for "image"(611ms)

45 user: {
46 username: string;
47 profileImageUrl: string | null;
48 };
49 project: any;
51 return (
52 <div className="card">
53 {project.imageUrl
54 ? <img src={project.imageUrl} className="card-image" />
55 : user.profileImageUrl
56 ? (
57 <div className="card-image">
58 <img
59 src={user.profileImageUrl}
60 width="48"
61 height="48"
64 </div>
65 )
66 : <div className="card-image placeholder" />}
67 <div className="card-body">
68 <div className="username">{user.username}</div>

OpenTownie_jacksonqueries.ts5 matches

@stevekrouseUpdated 1 week ago
46 model: message.model,
47 price: message.price,
48 images: message.images,
49 finishReason: message.finish_reason,
50 };
168 model,
169 price,
170 images,
171 finishReason,
172}: {
181 model?: string;
182 price?: number;
183 images?: any;
184 finishReason?: string;
185}): Promise<number> {
186 const result = await sqlite.execute(
187 `INSERT INTO ${MESSAGES_TABLE}
188 (thread_id, user_id, content, created_at, role, inputTokens, outputTokens, cache_read_tokens, cache_write_tokens, model, price, images, finish_reason)
189 VALUES (?, ?, ?, datetime('now'), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
190 RETURNING id`,
199 model || null,
200 price || null,
201 images ? JSON.stringify(images) : null,
202 finishReason || null,
203 ],

OpenTownie_jacksonschema.ts2 matches

@stevekrouseUpdated 1 week ago
29 role: string;
30 version?: number;
31 images?: string;
32 input_tokens?: number;
33 output_tokens?: number;
70 role STRING NOT NULL,
71 version INTEGER,
72 images JSON,
73 input_tokens Integer,
74 output_tokens Integer,

OpenTownie_jacksonsend-message.ts12 matches

@stevekrouseUpdated 1 week ago
15
16app.post("/", async (c) => {
17 let { messages, project, branchId, anthropicApiKey, selectedFiles, images, threadId } = await c.req.json();
18 console.log("Original messages:", JSON.stringify(messages, null, 2));
19 console.log("Images received:", JSON.stringify(images, null, 2));
20
21 // TODO: put in zod
47 content: messages.at(-1).content,
48 role: "user",
49 // TODO: images
50 });
51
52 let coreMessages = convertToCoreMessages(messages);
53
54 // If there are images, we need to add them to the last user message
55 if (images && Array.isArray(images) && images.length > 0) {
56 // Find the last user message
57 const lastUserMessageIndex = coreMessages.findIndex(
75 };
76
77 // Add each image to the content array using the correct ImagePart format
78 for (const image of images) {
79 if (image && image.url) {
80 // Extract mime type from data URL if available
81 let mimeType = undefined;
82 if (image.url.startsWith("data:")) {
83 const matches = image.url.match(/^data:([^;]+);/);
84 if (matches && matches.length > 1) {
85 mimeType = matches[1];
88
89 newUserMessage.content.push({
90 type: "image",
91 image: image.url,
92 mimeType,
93 });

pondiversemain3 matches

@todepondUpdated 1 week ago
1import addCreation from "./addCreation";
2import getCreation from "./getCreation";
3import getCreationImage from "./getCreationImage";
4import getCreations from "./getCreations";
5import updateTable from "./updateTable";
13 case "/get-creation":
14 return getCreation(req);
15 case "/get-creation-image":
16 return getCreationImage(req);
17 case "/get-creations":
18 return getCreations(req);

pondiversegetCreationImage1 match

@todepondUpdated 1 week ago
9 let response;
10 try {
11 response = await blob.get("pondiverse_image" + id);
12 } catch (e) {
13 return new Response(null, { status: 404 });

OpenTownie_jacksontypes.ts1 match

@stevekrouseUpdated 1 week ago
29 model?: string;
30 price?: number;
31 images?: string;
32 finishReason?: string;
33}

sqliteExplorerAppREADME.md1 match

@skynocoverUpdated 1 week ago
3View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stevekrouse/sqlite_admin?v=46) val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by [LibSQL Studio](https://github.com/invisal/libsql-studio) by [invisal](https://github.com/invisal). This is now more an SPA, with tables, queries and results showing up on the same page.
4
5![image.webp](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/c8e102fd-39ca-4bfb-372a-8d36daf43900/public)
6
7## Install

discord-bot.cursorrules2 matches

@boucherUpdated 1 week ago
178
179- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
180- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
181- **AI Image:** To inline generate an AI image use: `<img src="https://maxm-imggenurl.web.val.run/the-description-of-your-image" />`
182- **Storage:** DO NOT use the Deno KV module for storage
183- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods

vt-discordindex.html1 match

@boucherUpdated 1 week ago
6 <title>React Hono Val Town Starter</title>
7 <link rel="stylesheet" href="/public/style.css">
8 <link rel="icon" href="/public/favicon.svg" sizes="any" type="image/svg+xml">
9 </head>
10 <body>

image-gen

@armadillomikeUpdated 1 day ago

gpt-image-test1 file match

@CaptainJackUpdated 2 days ago
测试 gpt image 的不同 api 能否满足图片生成要求
Chrimage
Atiq
"Focal Lens with Atig Wazir" "Welcome to my photography journey! I'm Atiq Wazir, a passionate photographer capturing life's beauty one frame at a time. Explore my gallery for stunning images, behind-the-scenes stories, and tips & tricks to enhance your own