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 dd972cd commit 70ba806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatgpt/googlegpt/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.15.13
// @version 2025.1.15.14
// @license MIT
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
Expand Down Expand Up @@ -3059,7 +3059,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 70ba806

Please sign in to comment.