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%22Image%20title%22?q=database&page=265&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 7207 results for "database"(1677ms)

NPLLMsend-message.ts1 match

@wolf•Updated 3 weeks ago
4import { convertToCoreMessages, type CoreUserMessage, streamText } from "npm:ai";
5import { Hono } from "npm:hono";
6import { finishTrackingUsage, insertInferenceCall, overLimit, startTrackingUsage } from "../database/queries.tsx";
7import {
8 getTextEditorTool,

NPLLMthink.ts1 match

@wolf•Updated 3 weeks ago
7export const thinkTool = tool({
8 description:
9 "Use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed.",
10 parameters: z.object({
11 thought: z.string().describe("A thought to think about."),

NPLLMqueries.tsx1 match

@wolf•Updated 3 weeks ago
4import { INFERENCE_CALLS_TABLE, USAGE_TABLE } from "./schema.tsx";
5
6// Eventually we'll have a user database,
7// but in the meantime, we can cache user info in memory
8const userIdCache: { [key: string]: any } = {};

NPLLMTODOs.md1 match

@wolf•Updated 3 weeks ago
9- [ ] make it one click to branch off like old jp townie demos
10- [ ] opentownie as a pr bot
11- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them
12- [ ] do a browser use or screenshot thing to give it access to its own visual output
13- [ ] Have it default to creating a new branch off main

julio01index.ts4 matches

@Faf•Updated 3 weeks ago
116});
117
118// Database functions
119async function initDatabase() {
120 // Create websites table
121 await sqlite.execute(`
202}
203
204// Initialize database on startup
205initDatabase().catch(console.error);
206
207// Export the Hono app

Pulse2README.md1 match

@sach•Updated 3 weeks ago
17- Provides error handling
18
19No external APIs or databases are used. All data is stored in the browser's localStorage.

FitnessTrackerindex.ts4 matches

@khathu•Updated 3 weeks ago
2import { cors } from "https://esm.sh/hono@3.11.7/middleware";
3import { readFile, serveFile } from "https://esm.town/v/std/utils/index.ts";
4import { initializeDatabase } from "./database/migrations.ts";
5import {
6 getAllBooks,
10 updateBook,
11 deleteBook
12} from "./database/queries.ts";
13import { BookCreate, BookUpdate, ReadingStatus } from "../shared/types.ts";
14
15// Initialize the database
16await initializeDatabase();
17
18// Create Hono app

FitnessTrackerqueries.ts1 match

@khathu•Updated 3 weeks ago
3import { BOOKS_TABLE } from "./migrations.ts";
4
5// Transform database row to Book object
6function rowToBook(row: any): Book {
7 return {

FitnessTrackermigrations.ts2 matches

@khathu•Updated 3 weeks ago
19}
20
21// Initialize the database
22export async function initializeDatabase() {
23 await createBooksTable();
24}

FitnessTrackerREADME.md1 match

@khathu•Updated 3 weeks ago
14
15## Project Structure
16- `/backend` - Hono API server and SQLite database
17- `/frontend` - React frontend with TailwindCSS
18- `/shared` - Shared types and utilities

bookmarksDatabase

@s3thi•Updated 3 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 6 months ago