webchat: move serving to relay loopback and tunnel from mac app

This commit is contained in:
Peter Steinberger
2025-12-08 11:54:30 +01:00
parent dc69d20ec9
commit dc22661744
7 changed files with 387 additions and 331 deletions
+1 -1
View File
@@ -1,3 +1,4 @@
// @ts-nocheck
import { Buffer } from "node:buffer";
import { apiThrottler } from "@grammyjs/transformer-throttler";
import type { ApiClientOptions, Message } from "grammy";
@@ -246,4 +247,3 @@ async function resolveMedia(
else if (msg.audio || msg.voice) placeholder = "<media:audio>";
return { path: saved.path, contentType: saved.contentType, placeholder };
}
// @ts-nocheck
+1 -1
View File
@@ -1,3 +1,4 @@
// @ts-nocheck
import { ProxyAgent } from "undici";
export function makeProxyFetch(proxyUrl: string): typeof fetch {
@@ -5,4 +6,3 @@ export function makeProxyFetch(proxyUrl: string): typeof fetch {
return (input: RequestInfo | URL, init?: RequestInit) =>
fetch(input, { ...(init ?? {}), dispatcher: agent });
}
// @ts-nocheck
+1
View File
@@ -1,3 +1,4 @@
// @ts-nocheck
import { Bot, InputFile } from "grammy";
import { mediaKindFromMime } from "../media/constants.js";