You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run//%22?q=function&page=2&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=function
Returns an array of strings in format "username" or "username/projectName"
Found 40465 results for "function"(1079ms)
1// Learn more: https://docs.val.town/vals/http/
2export default async function (req: Request): Promise<Response> {
3const searchParams = new URL(req.url).searchParams;
4
11- **Schedule**: Every minute
12- **Threshold**: Sessions older than 60 seconds without heartbeat updates
13- **Function**: Marks stale sessions as not viewing and syncs to Notion
1415**How Viewing Sessions Work**:
39- **Purpose**: Cleans up orphaned agent blobs
40- **Schedule**: Every minute
41- **Function**: Deletes agent blobs where the agent ID doesn't match the demo's
42"Glimpse agents" relation in Notion
43- **Read-Only Notion**: Only reads Notion data, never modifies it