39}
40export async function getMeta(id) {
41 const req = await fetch(`https://rabbitstream.net/v2/embed-4/${id}?z=`, {
42 headers: {
43 "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0",
55}
56export async function getWasm() {
57 const req = await fetch("https://rabbitstream.net/images/loading.png?v=0.6", {
58 "headers": {
59 "Referrer-Policy": "strict-origin-when-cross-origin",
1export default async function fetchNewPublicGitHubRepos() {
2 // Generate today's date in YYYY-MM-DD format
3 const today = new Date().toISOString().split("T")[0];
9 const url = `https://api.github.com/search/repositories?q=${encodeURIComponent(query)}&sort=${sort}&order=${order}`;
10
11 const response = await fetch(url, {
12 headers: {
13 "Accept": "application/vnd.github.v3+json",
14 "User-Agent": "Deno-GitHub-Repo-Fetcher", // GitHub API requires a user-agent header
15 },
16 });
1/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
2
3import { modifyFetchHandler } from "https://esm.town/v/andreterron/codeOnValTown?v=50";
4import view_route from "https://esm.town/v/pomdtr/blob_admin_blob";
5import create_route from "https://esm.town/v/pomdtr/blob_admin_create";
137});
138
139export default modifyFetchHandler(passwordAuth(app.fetch));
71# Long-term memory
72
73At some point the user might ask you to do something with "memory". Things like "remember", "save to memory", "forget", "update memory", etc. Please use corresponding actions to achieve those tasks. User might also ask you to perform some task with the context of your "memory" - in that case fetch all memories before proceeding with the task. The memories should be formed in a clear and purely informative language, void of unnecessary adjectives or decorative language forms. An exception to that rule might be a case when the language itself is the integral part of information (snippet of writing to remember for later, examples of some specific language forms, quotes, etc.).
74
75Structure of a memory:
458 });
459
460 return app.fetch(req);
461};
71# Long-term memory
72
73At some point the user might ask you to do something with "memory". Things like "remember", "save to memory", "forget", "update memory", etc. Please use corresponding actions to achieve those tasks. User might also ask you to perform some task with the context of your "memory" - in that case fetch all memories before proceeding with the task. The memories should be formed in a clear and purely informative language, void of unnecessary adjectives or decorative language forms. An exception to that rule might be a case when the language itself is the integral part of information (snippet of writing to remember for later, examples of some specific language forms, quotes, etc.).
74
75Structure of a memory:
71# Long-term memory
72
73At some point the user might ask you to do something with "memory". Things like "remember", "save to memory", "forget", "update memory", etc. Please use corresponding actions to achieve those tasks. User might also ask you to perform some task with the context of your "memory" - in that case fetch all memories before proceeding with the task. The memories should be formed in a clear and purely informative language, void of unnecessary adjectives or decorative language forms. An exception to that rule might be a case when the language itself is the integral part of information (snippet of writing to remember for later, examples of some specific language forms, quotes, etc.).
74
75Structure of a memory:
458 });
459
460 return app.fetch(req);
461};
3import { email } from "https://esm.town/v/std/email";
4
5async function fetchStories(type: string, count: number) {
6 const response = await fetch(`https://hacker-news.firebaseio.com/v0/${type}stories.json`);
7 const storyIds = await response.json();
8 const stories = await Promise.all(
9 storyIds.slice(0, count).map(async (id: number) => {
10 const storyResponse = await fetch(`https://hacker-news.firebaseio.com/v0/item/${id}.json`);
11 return storyResponse.json();
12 }),
120export default async function server(req: Request) {
121 try {
122 const topStories = await fetchStories("top", 10);
123 const newStories = await fetchStories("new", 5);
124 const showStories = await fetchStories("show", 3);
125 const askStories = await fetchStories("ask", 3);
126 const jobStories = await fetchStories("job", 3);
127
128 const emailContent = createEmailContent(topStories, newStories, showStories, askStories, jobStories);
3import { email } from "https://esm.town/v/std/email";
4
5async function fetchStories(type: string, count: number) {
6 const response = await fetch(`https://hacker-news.firebaseio.com/v0/${type}stories.json`);
7 const storyIds = await response.json();
8 const stories = await Promise.all(
9 storyIds.slice(0, count).map(async (id: number) => {
10 const storyResponse = await fetch(`https://hacker-news.firebaseio.com/v0/item/${id}.json`);
11 return storyResponse.json();
12 }),
120export default async function server(req: Request) {
121 try {
122 const topStories = await fetchStories("top", 10);
123 const newStories = await fetchStories("new", 5);
124 const showStories = await fetchStories("show", 3);
125 const askStories = await fetchStories("ask", 3);
126 const jobStories = await fetchStories("job", 3);
127
128 const emailContent = createEmailContent(topStories, newStories, showStories, askStories, jobStories);