Skip to content

Commit

Permalink
Replaced regex alternation w/ more efficient char class ↞ [auto-sync …
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 16, 2025
1 parent 3d5e60d commit dd972cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatgpt/bravegpt/bravegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.14
// @version 2025.1.15.15
// @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
Expand Down Expand Up @@ -2845,7 +2845,7 @@
create({ type, prevQuery }) {
const promptSrc = this[type],
modsToApply = promptSrc.mods?.flatMap(mod => typeof mod == 'string' ? mod : mod.mods) || [],
promptElems = [promptSrc.base, ...modsToApply].map(elem => elem += /(?:\n|\.)$/.test(elem) ? '' : '.')
promptElems = [promptSrc.base, ...modsToApply].map(elem => elem += /[\n.]$/.test(elem) ? '' : '.')
let builtPrompt = promptElems.join(' ').trim()
if (prevQuery) builtPrompt = builtPrompt.replace('${prevQuery}', prevQuery)
return builtPrompt
Expand Down

0 comments on commit dd972cd

Please sign in to comment.