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/?q=image&page=1&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 9760 results for "image"(1211ms)

Townieval-summary.ts3 matches

@bipin0005•Updated 53 mins ago
16 SUM(cache_write_tokens) as total_cache_write_tokens,
17 SUM(price) as total_price,
18 SUM(num_images) as total_images
19 FROM ${USAGE_TABLE}
20 WHERE val_id = ? AND our_api_token = 1
54 total_cache_write_tokens: 0,
55 total_price: 0,
56 total_images: 0
57 };
58
85 // Always include inference price for comparison
86 inference_price: inferenceSummary.inference_price || 0,
87 total_images: usageSummary.total_images,
88 // Add flag to indicate inference data usage
89 used_inference_data: !!inferenceSummary.inference_price,

Townieval-detail.ts6 matches

@bipin0005•Updated 53 mins ago
17 price?: number;
18 finish_reason?: string;
19 num_images?: number;
20 our_api_token: boolean;
21}
31 inference_price: number;
32 original_price?: number;
33 total_images: number;
34 used_inference_data?: boolean;
35 inference_price_primary?: boolean;
66 <th>Cache Write</th>
67 <th>Total Price</th>
68 <th>Images</th>
69 </tr>
70 </thead>
76 <td>${formatNumber(summary.total_cache_write_tokens)}</td>
77 <td class="price">${formatPrice(summary.total_price)}</td>
78 <td>${formatNumber(summary.total_images)}</td>
79 </tr>
80 </tbody>
97 <th>Price</th>
98 <th>Finish</th>
99 <th>Images</th>
100 </tr>
101 </thead>
114 <td class="price">${formatPrice(row.price)}</td>
115 <td>${row.finish_reason || '-'}</td>
116 <td>${formatNumber(row.num_images)}</td>
117 </tr>
118 `).join("")}

Townieuser-summary.ts2 matches

@bipin0005•Updated 53 mins 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
151 total_price: userData.price,
152 inference_price: inferencePriceByUser.get(userId) || 0,
153 total_images: 0,
154 used_inference_data: true
155 });

Townieuser-detail.ts7 matches

@bipin0005•Updated 53 mins ago
13 total_price: number;
14 inference_price: number;
15 total_images: number;
16 used_inference_data?: boolean;
17}
32 price?: number;
33 finish_reason?: string;
34 num_images?: number;
35 our_api_token: boolean;
36}
48 total_price: 0,
49 inference_price: 0,
50 total_images: 0
51 };
52
77 <th>Total Price</th>
78 <th>Inference Price</th>
79 <th>Images</th>
80 </tr>
81 </thead>
88 <td class="price">${formatPrice(userData.total_price)} ${userData.used_inference_data ? '<span class="badge badge-info" title="Using inference data">I</span>' : ''}</td>
89 <td class="price">${formatPrice(userData.inference_price || 0)}</td>
90 <td>${formatNumber(userData.total_images)}</td>
91 </tr>
92 </tbody>
135 <th>Price</th>
136 <th>Finish</th>
137 <th>Images</th>
138 </tr>
139 </thead>
152 <td class="price">${formatPrice(row.price)}</td>
153 <td>${row.finish_reason || '-'}</td>
154 <td>${formatNumber(row.num_images)}</td>
155 </tr>
156 `).join("")}

TownieuseChatLogic.ts4 matches

@bipin0005•Updated 53 mins ago
7 branchId: string | undefined;
8 selectedFiles: string[];
9 images: (string | null)[];
10 soundEnabled: boolean;
11}
20 // bearerToken,
21 selectedFiles,
22 images,
23 soundEnabled,
24}: UseChatLogicProps) {
44 branchId,
45 selectedFiles,
46 images: images
47 .filter((img): img is string => {
48 const isValid = typeof img === "string" && img.startsWith("data:");
49 if (!isValid && img !== null) {
50 console.warn(
51 "Invalid image format:",
52 img?.substring(0, 50) + "..."
53 );

Townieusage-detail.ts2 matches

@bipin0005•Updated 53 mins ago
17 price?: number;
18 finish_reason?: string;
19 num_images?: number;
20 our_api_token: boolean;
21}
126 </div>
127 <div class="card-item">
128 <strong>Images:</strong> ${formatNumber(usage.num_images)}
129 </div>
130 <div class="card-item">

TownieTODOs.md2 matches

@bipin0005•Updated 53 mins 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

Towniesystem_prompt.txt2 matches

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

Towniestyles.css11 matches

@bipin0005•Updated 53 mins ago
688 background-color: var(--highlight);
689}
690.card-image {
691 display: flex;
692 align-items: center;
720}
721
722.image-placeholder,
723.image-thumbnail {
724 flex-shrink: 0;
725 width: 40px;
728 object-fit: cover;
729}
730.image-placeholder {
731 background-color: var(--muted);
732}
739}
740
741.image-row {
742 display: flex;
743 gap: var(--space-1);
744}
745.input-image {
746 position: relative;
747 border: 1px solid var(--muted);
748 border-radius: 6px;
749}
750.remove-image-button {
751 position: absolute;
752 top: 0;
761 opacity: 0;
762}
763.input-image:hover .remove-image-button {
764 opacity: 1;
765}
766
767.image-drop-overlay {
768 position: fixed;
769 top: 0;
778 justify-content: center;
779}
780.image-drop-inner {
781 padding: var(--space-2);
782 background-color: var(--background);
858}
859
860.transition, .input-box, .icon-button, .button, .remove-image-button {
861 transition-property: color, background-color, border-color, opacity;
862 transition-duration: 200ms;

Towniesend-message.ts12 matches

@bipin0005•Updated 53 mins ago
29 }
30
31 const { messages, project, branchId, anthropicApiKey, selectedFiles, images } = await c.req.json();
32
33 // do we want to allow user-provided tokens still
55 branch_id: branchId,
56 val_id: project.id,
57 num_images: images?.length || 0,
58 model,
59 });
87 townie_usage_id: rowid,
88 townie_our_api_token: our_api_token,
89 townie_num_images: images?.length || 0,
90 townie_selected_files_count: selectedFiles?.length || 0,
91 },
105 let coreMessages = convertToCoreMessages(messages);
106
107 // If there are images, we need to add them to the last user message
108 if (images && Array.isArray(images) && images.length > 0) {
109 // Find the last user message
110 const lastUserMessageIndex = coreMessages.findIndex(
128 };
129
130 // Add each image to the content array using the correct ImagePart format
131 for (const image of images) {
132 if (image && image.url) {
133 // Extract mime type from data URL if available
134 let mimeType = undefined;
135 if (image.url.startsWith("data:")) {
136 const matches = image.url.match(/^data:([^;]+);/);
137 if (matches && matches.length > 1) {
138 mimeType = matches[1];
141
142 newUserMessage.content.push({
143 type: "image",
144 image: image.url,
145 mimeType,
146 });

thilenius-webcam1 file match

@stabbylambda•Updated 3 days ago
Image proxy for the latest from https://gliderport.thilenius.com

image_generator1 file match

@affulito•Updated 1 week 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