MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / formatResponse

Function formatResponse

outdated/gemini/gemini.ts:978–993  ·  view source on GitHub ↗
(question: string, answer: string)

Source from the content-addressed store, hash-verified

976}
977
978function 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
995async function downloadAndProcessImage(
996 client: any,

Callers 3

handleSearchFunction · 0.70
handleQuestionWithAudioFunction · 0.70
handleGeminiRequestFunction · 0.70

Calls 2

getConfigFunction · 0.70
markdownToHtmlFunction · 0.70

Tested by

no test coverage detected