import 'server-only'; import { encodeMirroredFraming } from './image-processing'; export function requestsWiderFraming(feedback: string): boolean { const pullback = /\b(?:zoom(?:ing)? out|wider (?:crop|framing|shot)|pull (?:the camera )?back|(?:pull|push|move)\s+(?:(?:the|my|our)\s+)?(?:cat|dog|pet|subject|him|her|them|camera)\s+(?:farther\s+|further\s+)?(?:back|away))\b/i; return feedback.split(/[.!?;,\n]|\bbut\b/i).some(clause => { const match = pullback.exec(clause); if (!match) return false; return !/\b(?:no|not|never|don['’]t|without|avoid)\b/i.test(clause.slice(0, match.index)); }); } export async function prepareWiderFraming(bytes: Buffer): Promise { return encodeMirroredFraming(bytes); }