f24ad59
1
2
3
4
5
6
7
8
9
export function parsePrompt(input?: any) { let res = "" try { res = decodeURIComponent(`${input || ""}` || "").trim() } catch (err) {} if (!prompt.length) { throw new Error(`please provide a prompt`) } return res }