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?q=image&page=11&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 7658 results for "image"(843ms)

OpenTownieuser-summary.ts2 matches

@h0a•Updated 1 day ago
18 SUM(cache_write_tokens) as total_cache_write_tokens,
19 SUM(price) as total_price,
20 SUM(num_images) as total_images
21 FROM ${USAGE_TABLE}
22 WHERE our_api_token = 1
101 total_cache_write_tokens: userData.cache_write_tokens,
102 total_price: userData.price,
103 total_images: 0,
104 used_inference_data: true
105 });

OpenTownieuseChatLogic.ts4 matches

@h0a•Updated 1 day ago
7 branchId: string | undefined;
8 selectedFiles: string[];
9 images: (string | null)[];
10 soundEnabled: boolean;
11}
17 // bearerToken,
18 selectedFiles,
19 images,
20 soundEnabled,
21}: UseChatLogicProps) {
40 branchId,
41 selectedFiles,
42 images: images
43 .filter((img): img is string => {
44 const isValid = typeof img === "string" && img.startsWith("data:");
45 if (!isValid && img !== null) {
46 console.warn(
47 "Invalid image format:",
48 img?.substring(0, 50) + "..."
49 );

OpenTownieTODOs.md2 matches

@h0a•Updated 1 day ago
29 - [x] File write as a code embed
30 - [x] str_replace as a diff view
31- [x] make image drop area invisible and bigger
32- [x] Give it all the code (except maybe .txt files) as initial context (like cursor sonnet max)
33- [x] I seem to have lost the delete file tool and instructions, try to find them back in history or re-create?
55- [x] Create branch
56- [x] URL input + pathname
57- [x] Image upload controls
58- [x] Preview refresh button
59- [x] Audio controls

OpenTowniesystem_prompt.txt2 matches

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

OpenTowniestyles.css11 matches

@h0a•Updated 1 day ago
782 background-color: var(--highlight);
783}
784.card-image {
785 display: flex;
786 align-items: center;
809}
810
811.image-placeholder,
812.image-thumbnail {
813 flex-shrink: 0;
814 width: 40px;
817 object-fit: cover;
818}
819.image-placeholder {
820 background-color: var(--muted);
821}
828}
829
830.image-row {
831 display: flex;
832 gap: var(--space-1);
833}
834.input-image {
835 position: relative;
836 border: 1px solid var(--muted);
837 border-radius: 6px;
838}
839.remove-image-button {
840 position: absolute;
841 top: 0;
850 opacity: 0;
851}
852.input-image:hover .remove-image-button {
853 opacity: 1;
854}
855
856.image-drop-overlay {
857 position: fixed;
858 top: 0;
867 justify-content: center;
868}
869.image-drop-inner {
870 padding: var(--space-2);
871 background-color: var(--background);
872}
873
874.transition, .input-box, .icon-button, .button, .remove-image-button {
875 transition-property: color, background-color, border-color, opacity;
876 transition-duration: 200ms;

OpenTowniesend-message.ts11 matches

@h0a•Updated 1 day ago
33 }
34
35 const { messages, project, branchId, anthropicApiKey, selectedFiles, images } = await c.req.json();
36
37 // do we want to allow user-provided tokens still
63 branch_id: branchId,
64 val_id: project.id,
65 num_images: images?.length || 0,
66 model: "claude-3-7-sonnet-20250219",
67 });
73 let coreMessages = convertToCoreMessages(messages);
74
75 // If there are images, we need to add them to the last user message
76 if (images && Array.isArray(images) && images.length > 0) {
77 // Find the last user message
78 const lastUserMessageIndex = coreMessages.findIndex(
96 };
97
98 // Add each image to the content array using the correct ImagePart format
99 for (const image of images) {
100 if (image && image.url) {
101 // Extract mime type from data URL if available
102 let mimeType = undefined;
103 if (image.url.startsWith("data:")) {
104 const matches = image.url.match(/^data:([^;]+);/);
105 if (matches && matches.length > 1) {
106 mimeType = matches[1];
109
110 newUserMessage.content.push({
111 type: "image",
112 image: image.url,
113 mimeType,
114 });

OpenTownieschema.tsx2 matches

@h0a•Updated 1 day ago
18 price?: number;
19 finish_reason?: string;
20 num_images?: number;
21 our_api_token: boolean;
22}
43 price REAL,
44 finish_reason TEXT,
45 num_images INTEGER,
46 our_api_token INTEGER NOT NULL,
47 finish_timestamp INTEGER

OpenTownierequests.ts3 matches

@h0a•Updated 1 day ago
16 price: number | null;
17 finish_reason: string | null;
18 num_images: number | null;
19 our_api_token: number;
20}
191 <th>Price</th>
192 <th>Finish</th>
193 <th>Images</th>
194 <th>Our API</th>
195 </tr>
215 <td class="price">${formatPrice(row.price)}</td>
216 <td>${row.finish_reason || '-'}</td>
217 <td>${formatNumber(row.num_images)}</td>
218 <td>${formatBoolean(row.our_api_token)}</td>
219 </tr>

OpenTowniequeries.tsx4 matches

@h0a•Updated 1 day ago
112 model,
113 our_api_token,
114 num_images,
115}: {
116 bearerToken: string;
119 model: string;
120 our_api_token: boolean;
121 num_images: number;
122}) {
123 const user = await getUser(bearerToken);
131 model,
132 our_api_token,
133 num_images
134 ) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
135 `,
142 model,
143 our_api_token ? 1 : 0,
144 num_images,
145 ],
146 );

OpenTownieProjectsRoute.tsx7 matches

@h0a•Updated 1 day ago
43 user: {
44 username: string;
45 profileImageUrl: string | null;
46 };
47 project: any;
49 return (
50 <div className="card">
51 {project.imageUrl ? (
52 <img src={project.imageUrl} className="card-image" />
53 ) : user.profileImageUrl ? (
54 <div className="card-image">
55 <img
56 src={user.profileImageUrl}
57 width="48"
58 height="48"
61 </div>
62 ) : (
63 <div className="card-image placeholder" />
64 )}
65 <div className="card-body">

ImageExplorer10 file matches

@carmi•Updated 2 days ago

Imagetourl2 file matches

@dcm31•Updated 5 days ago
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