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=database&page=205&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 7179 results for "database"(1196ms)

val.cursorrules2 matches

@amineโ€ขUpdated 2 weeks ago
198```
199โ”œโ”€โ”€ backend/
200โ”‚ โ”œโ”€โ”€ database/
201โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
202โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering

TownieTODOs.md1 match

@downchuck_gmail_comโ€ขUpdated 2 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

Towniethink.ts1 match

@downchuck_gmail_comโ€ขUpdated 2 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."),

Towniesystem_prompt.txt2 matches

@downchuck_gmail_comโ€ขUpdated 2 weeks ago
174```
175โ”œโ”€โ”€ backend/
176โ”‚ โ”œโ”€โ”€ database/
177โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
178โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
234 ```
235
236### Database Patterns
237- Run migrations on startup or comment out for performance
238- Change table names when modifying schemas rather than altering

Towniesend-message.ts1 match

@downchuck_gmail_comโ€ขUpdated 2 weeks ago
10 overLimit,
11 startTrackingUsage,
12} from "../database/queries.tsx";
13import { makeChangeValTypeTool, makeFetchTool, makeTextEditorTool } from "../tools/index.ts";
14import fileWithLinesNumbers from "../utils/fileWithLinesNumbers.ts";

Towniequeries.tsx1 match

@downchuck_gmail_comโ€ขUpdated 2 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 } = {};

Townie.cursorrules2 matches

@downchuck_gmail_comโ€ขUpdated 2 weeks ago
198```
199โ”œโ”€โ”€ backend/
200โ”‚ โ”œโ”€โ”€ database/
201โ”‚ โ”‚ โ”œโ”€โ”€ migrations.ts # Schema definitions
202โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # DB query functions
257 ```
258
259### Database Patterns
260- Run migrations on startup or comment out for performance
261- Change table names when modifying schemas rather than altering

cerebras_codermain.tsx2 matches

@downchuck_gmail_comโ€ขUpdated 2 weeks ago
1import { serveFile } from "https://esm.town/v/std/utils/index.ts";
2import { generateCode } from "./backend/generate-code.ts";
3import { createTables } from "./database/migrations.ts";
4import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries.ts";
5
6await createTables();

cerebras_codermain.tsx2 matches

@Downchuckโ€ขUpdated 2 weeks ago
1import { serveFile } from "https://esm.town/v/std/utils/index.ts";
2import { generateCode } from "./backend/generate-code.ts";
3import { createTables } from "./database/migrations.ts";
4import { createProject, getCode, getNextVersionNumber, insertVersion } from "./database/queries.ts";
5
6await createTables();

con-juanindex.html19 matches

@Downchuckโ€ขUpdated 2 weeks ago
124 </label>
125 <label class="flex items-center text-sm">
126 <input type="radio" name="privacy-mode" value="database" class="mr-2">
127 <span>โ˜๏ธ Save to server (shareable, persistent)</span>
128 </label>
300 </label>
301 <label class="flex items-start text-sm">
302 <input type="radio" name="modal-privacy-mode" value="database" class="mr-2 mt-0.5">
303 <div>
304 <span class="font-medium">โ˜๏ธ Save to server</span>
552 statusText = 'Local mode - data saved in browser only';
553 break;
554 case 'database':
555 statusText = 'Server mode - data saved on server';
556 break;
567 statusText = `${localCount} session(s) in browser`;
568 clearLocalDataBtn.style.display = localCount > 0 ? 'block' : 'none';
569 } else if (state.privacyMode === 'database') {
570 statusText = `${serverCount} session(s) on server`;
571 clearServerDataBtn.style.display = serverCount > 0 ? 'block' : 'none';
580 clearLocalDataBtn.style.display = 'none';
581 }
582 if (state.privacyMode !== 'database') {
583 clearServerDataBtn.style.display = 'none';
584 }
652 async function loadSessions() {
653 try {
654 if (state.privacyMode === 'database') {
655 // Load from server database
656 const response = await fetch('/chat-api', {
657 method: 'POST',
719 if (state.privacyMode === 'local') {
720 privacyIndicator = '<span class="text-xs text-blue-500">๐Ÿ’พ</span>';
721 } else if (state.privacyMode === 'database') {
722 privacyIndicator = '<span class="text-xs text-green-500">โ˜๏ธ</span>';
723 }
756 if (confirm('Are you sure you want to delete this session?')) {
757 try {
758 if (state.privacyMode === 'database') {
759 await fetch('/chat-api', {
760 method: 'POST',
792 let sessionData = null;
793
794 if (state.privacyMode === 'database') {
795 // Load from server
796 const response = await fetch('/chat-api', {
840 indicator = '<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">๐Ÿ’พ Local</span>';
841 break;
842 case 'database':
843 indicator = '<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">โ˜๏ธ Server</span>';
844 break;
883
884 try {
885 if (state.privacyMode === 'database') {
886 await fetch('/chat-api', {
887 method: 'POST',
1011 let newSession = null;
1012
1013 if (selectedMode === 'database') {
1014 // Create on server
1015 const response = await fetch('/chat-api', {
1080 indicator = '<span class="text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded">๐Ÿ’พ Local</span>';
1081 break;
1082 case 'database':
1083 indicator = '<span class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded">โ˜๏ธ Server</span>';
1084 break;
1101 privacyMessage = '๐Ÿ’พ This session is saved locally in your browser only.';
1102 break;
1103 case 'database':
1104 privacyMessage = 'โ˜๏ธ This session is saved on the server and can be accessed from any device.';
1105 break;
1146
1147 try {
1148 if (state.privacyMode === 'database') {
1149 await fetch('/chat-api', {
1150 method: 'POST',
1209 if (!text) return;
1210
1211 // Check if we need to create a session first (only for database mode)
1212 if (!state.currentSession && state.privacyMode === 'database') {
1213 showNewSessionModal();
1214 return;
1275 let messageResponse = null;
1276
1277 if (state.privacyMode === 'database') {
1278 // Send to server for processing
1279 const response = await fetch('/chat-api', {

bookmarksDatabase

@s3thiโ€ขUpdated 3 months ago

sqLiteDatabase1 file match

@ideofunkโ€ขUpdated 6 months ago