INNER CODE UNIT · TypeScript
resolvePostExtraction
Beever-AI/beever-atlas · bot/src/index.ts:460
export function resolvePostExtraction(
originalTextDecision: RespondDecision,
gotImages: boolean,
): "proceed" | "prompt" | "skip" {
if (gotImages) return "proceed";
return originalTextDecision === "respond" ? "proceed" : originalTextDecision;
}
/** A safe per-connection byte fetcher (the bridge `proxyFile` contract). */
type ProxyFile = (url: string) => Promise<{ contentType: string; buffer: Buffer }>;
/** Production proxyFile resolver: the real per-connection bridge SSRF-guarded
* fetch. Injectable so tests can supply a fake without the live ChatManager. */
function defaultProxyFileResolver(platform: string): ProxyFile | null {
return _chatManager ? resolveProxyFile(_chatManager, platform) : null;
}
/**