(question: string, answer: string)
| 976 | } |
| 977 | |
| 978 | function formatResponse(question: string, answer: string): string { |
| 979 | const isCollapsibleEnabled = getConfig(CONFIG_KEYS.GEMINI_COLLAPSIBLE_QUOTE_ENABLED) === "on"; |
| 980 | let finalText = ""; |
| 981 | |
| 982 | if (question.trim()) { |
| 983 | const htmlQuestion = markdownToHtml(question); |
| 984 | const quoteTag = isCollapsibleEnabled ? "<blockquote expandable>" : "<blockquote>"; |
| 985 | finalText += `<b>Q:</b>\n${quoteTag}${htmlQuestion}</blockquote>\n\n`; |
| 986 | } |
| 987 | |
| 988 | const htmlAnswer = markdownToHtml(answer); |
| 989 | const quoteTag = isCollapsibleEnabled ? "<blockquote expandable>" : "<blockquote>"; |
| 990 | finalText += `<b>A:</b>\n${quoteTag}${htmlAnswer}</blockquote>`; |
| 991 | |
| 992 | return finalText; |
| 993 | } |
| 994 | |
| 995 | async function downloadAndProcessImage( |
| 996 | client: any, |
no test coverage detected