From c742a40414d9a463dee21e52c86562fb1d7aa8c5 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Wed, 15 Jan 2025 17:50:28 -0800 Subject: [PATCH] =?UTF-8?q?Added=20`modsToApply`=20fallback=20to=20`prompt?= =?UTF-8?q?s.create()`=20for=20graceful=20handling=20of=20modless=20prompt?= =?UTF-8?q?s=20=E2=86=9E=20[auto-sync=20from=20https://github.com/adamlui/?= =?UTF-8?q?ai-web-extensionss/tree/main/bravegpt]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chatgpt/bravegpt/bravegpt.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatgpt/bravegpt/bravegpt.user.js b/chatgpt/bravegpt/bravegpt.user.js index d9ab1e91a..6ed722f3d 100644 --- a/chatgpt/bravegpt/bravegpt.user.js +++ b/chatgpt/bravegpt/bravegpt.user.js @@ -148,7 +148,7 @@ // @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!) // @author KudoAI // @namespace https://kudoai.com -// @version 2025.1.15.11 +// @version 2025.1.15.12 // @license MIT // @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0 // @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0 @@ -2844,7 +2844,7 @@ create({ type, prevQuery }) { const promptSrc = this[type], - modsToApply = promptSrc.mods?.flatMap(mod => typeof mod == 'string' ? mod : mod.mods) + modsToApply = promptSrc.mods?.flatMap(mod => typeof mod == 'string' ? mod : mod.mods) || [] let builtPrompt = `${promptSrc.base} ${modsToApply?.join(' ')}`.trim() if (prevQuery) builtPrompt = builtPrompt.replace('${prevQuery}', prevQuery) return builtPrompt