testProj2test_http.tsx1 match
1export default async function (req: Request): Promise<Response> {
2console.log("test");
3return new Response(
stevensDemohandleTelegramMessage.ts5 matches
30* Store a chat message in the database
31*/
32export async function storeChatMessage(
33chatId,
34senderId,
63* Retrieve chat history for a specific chat
64*/
65export async function getChatHistory(chatId, limit = 50) {
66try {
67const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
88* Format chat history for Anthropic API
89*/
90function formatChatHistoryForAI(history) {
91const messages = [];
92112* Analyze a Telegram message and extract memories from it
113*/
114async function analyzeMessageContent(
115anthropic,
116username,
487488// Handle webhook requests
489export default async function(req: Request): Promise<Response> {
490// Set webhook if it is not set yet
491if (!isEndpointSet) {
10await initializeAggregatorDB();
1112export default async function(req: Request): Promise<Response> {
13const url = new URL(req.url);
14const path = url.pathname.toLowerCase();
FeedPondfrontend.js1 match
1// frontend.js
23export function serveFrontend(req: Request): Response {
4const feedUrl = `https://${Deno.env.get("USER")}-${Deno.env.get("NAME")}.web.val.run/feed.xml`;
5
FeedPondreceiveCreation.js1 match
7const SHARED_SECRET = Deno.env.get("PONDIVERSE_PUSH_SECRET");
89export async function handleReceiveCreation(req: Request): Promise<Response> {
10// 1. Check Method
11if (req.method !== "POST") {
5export const UPSTREAM_PONDIVERSE_URL = "https://pondiverse.com"; // URL for linking, not fetching
67export async function initializeAggregatorDB() {
8// Store original ID to prevent duplicates, store necessary RSS fields
9await sqlite.execute(`
FeedPondgenerateRSS.js2 matches
34// Helper to escape XML characters - IMPORTANT!
5function escapeXml(unsafe) {
6if (typeof unsafe !== 'string') return '';
7return unsafe.replace(/[<>&'"\\]/g, (c) => { // Added backslash escape
18}
1920export async function generateRSSFeed() {
21const feedUrl = `https://${Deno.env.get("USER")}-${Deno.env.get("NAME")}.web.val.run/feed.xml`; // Auto-detects your val URL
22const siteUrl = "https://pondiverse.com/explore/"; // Link to the main explore page
untitled-6323new-file-8750.tsx11 matches
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
45function Slideshow({ images }) {
6useEffect(() => {
7let currentSlideIndex = 0;
11const transitionDuration = 800; // 0.8 seconds (must match CSS)
1213function showNextSlide() {
14if (totalSlides <= 1) return;
1564}
6566function Card({ title, subtitle, amount, steps, footerSlides, buttonText, modalTitle, modalContent }) {
67const [isModalActive, setIsModalActive] = useState(false);
6873let footerSlideInterval = null;
7475function showNextFooterSlide() {
76footerSlideContainers.forEach((container) => {
77const slides = container.querySelectorAll(".footer-slide");
171}
172173function Modal({ isActive, onClose, title, content }) {
174return (
175<div className={`modal-overlay ${isActive ? "active" : ""}`} onClick={onClose}>
186}
187188function InviteCard() {
189return (
190<div className="card invite-card">
208}
209210function BottomNavigation() {
211return (
212<nav className="bottom-nav">
226}
227228function LoadingOverlay() {
229const [message, setMessage] = useState("");
230const [showTryLater, setShowTryLater] = useState(true);
275}
276277function App() {
278const [showOverlay, setShowOverlay] = useState(false);
279364}
365366function client() {
367createRoot(document.getElementById("root")).render(<App />);
368}
372}
373374export default async function server(request: Request): Promise<Response> {
375return new Response(
376`
stevensDemotestDailyBrief.ts1 match
4import { DateTime } from "https://esm.sh/luxon@3.4.4";
56export async function testDailyBrief() {
7try {
8const testChatId = Deno.env.get("TEST_TELEGRAM_CHAT_ID");
2// Run this script manually to create the database table
34export default async function setupTelegramChatDb() {
5try {
6// Import SQLite module