PDF2Vectorlogger1 match
61function clearLogs() {
62if (confirm('Are you sure you want to clear all logs?')) {
63fetch('./clear')
64.then(response => {
65if (response.ok) {
pdf2vector_loggermain.tsx1 match
60function clearLogs() {
61if (confirm('Are you sure you want to clear all logs?')) {
62fetch('/clear')
63.then(response => {
64if (response.ok) {
agentspacemain.tsx14 matches
251const initializeAgents = async () => {
252try {
253// Fetch agents from server or create defaults
254const response = await fetch("/agents");
255256if (response.ok) {
407408// Save agents to server
409await fetch("/agents", {
410method: "POST",
411headers: {
476477// Send request to leader agent
478const leaderResponse = await fetch("/process-leader", {
479method: "POST",
480headers: {
561562// Send task to agent
563const agentResponse = await fetch("/process-agent", {
564method: "POST",
565headers: {
619620// Send tool request
621const toolResponse = await fetch("/tool", {
622method: "POST",
623headers: {
650651// Process the tool result with the agent
652const toolProcessResponse = await fetch("/process-tool-result", {
653method: "POST",
654headers: {
705// Final summary from leader
706if (leaderPlan.tasks.length > 1) {
707const summaryResponse = await fetch("/generate-summary", {
708method: "POST",
709headers: {
763764// Get latest agent trust scores from server
765const agentsResponse = await fetch("/agents");
766const updatedAgents = await agentsResponse.json();
767setAgents(updatedAgents);
980981init() {
982// Intercept fetch calls
983const originalFetch = window.fetch;
984window.fetch = async (input: RequestInfo | URL, init?: RequestInit) => {
985const url = typeof input === "string" ? input : input.url;
9861000}
10011002// Pass through to original fetch for any other requests
1003return originalFetch(input, init);
1004};
1005},
honoExamplemain.tsx1 match
4app.get("/", (c) => c.text("Hello from Hono!"));
5app.get("/yeah", (c) => c.text("Routing!"));
6export default app.fetch;
13The following vals could not be imported:
1415- [steve/discordWebhook](https://www.val.town/v/steve/discordWebhook) - Failed to fetch val: {"statusCode":404,"error":"Not Found","message":"Could not find that val"}
1617
19: Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
2021// Fetch and log tweets
22const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
23console.log("Response from socialDataSearch:", response);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
23export async function socialDataSearch(query: string): Promise<SocialDataResponse> {
4const url = new URL("https://stevekrouse-socialdataproxy.web.val.run/twitter/search");
5url.searchParams.set("query", query);
6return await fetchJSON(url.toString(), {
7bearer: Deno.env.get("valtown"),
8});
1import { fetch } from "https://esm.town/v/std/fetch";
23export const discordWebhook = async ({
8content: string;
9}) => {
10const res = await fetch(url, {
11method: "POST",
12redirect: "follow",
19: Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
2021// Fetch and log tweets
22const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
23console.log("Response from socialDataSearch:", response);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
23export async function socialDataSearch(query: string): Promise<SocialDataResponse> {
4const url = new URL("https://stevekrouse-socialdataproxy.web.val.run/twitter/search");
5url.searchParams.set("query", query);
6return await fetchJSON(url.toString(), {
7bearer: Deno.env.get("valtown"),
8});