getFileEmail4 file matches
A helper function to build a file's email
tuna8 file matches
Simple functional CSS library for Val Town
AutomationFunction1 file match
trmnl_plugins2 file matches
Backend functions for TRMNL plugins
You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Bart_info.art.src%7D?q=function&page=1&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 17931 results for "function"(658ms)
36* Store a chat message in the database
37*/
38export async function storeChatMessage(
39chatId,
40senderId,
69* Retrieve chat history for a specific chat
70*/
71export async function getChatHistory(chatId, limit = 50) {
72try {
73const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
94* Format chat history for Anthropic API
95*/
96function formatChatHistoryForAI(history) {
97const messages = [];
98118* Analyze a Telegram message and extract memories from it
119*/
120async function analyzeMessageContent(
121anthropic,
122username,
499500// Handle webhook requests
501export default async function (req: Request): Promise<Response> {
502// Set webhook if it is not set yet
503if (!isEndpointSet) {
8const TABLE_NAME = `memories`;
910function summarizeWeather(weather: WeatherResponse) {
11const summarizeDay = (day: WeatherResponse["weather"][number]) => ({
12date: day.date,
25}
2627async function generateConciseWeatherSummary(weatherDay) {
28try {
29// Get API key from environment
83}
8485async function deleteExistingForecast(date: string) {
86await sqlite.execute(
87`
93}
9495async function insertForecast(date: string, forecast: string) {
96const { nanoid } = await import("https://esm.sh/nanoid@5.0.5");
97112}
113114export default async function getWeatherForecast(interval: number) {
115const weather = await getWeather("Washington, DC");
116console.log({ weather });