Skip to content

Commit

Permalink
Removed unused callback arg from getShowReply(), moved `retryDiff…
Browse files Browse the repository at this point in the history
…Host()` def to top-level

... to support call from `getShowReply()`'s XHR `onerror` ↞ [auto-sync from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Jun 1, 2024
1 parent d177bbe commit ddc0dca
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
// @description:zu Faka amaphawu ase-ChatGPT kuvaliwe i-DuckDuckGo Search (okwesikhashana ngu-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.6.1.5
// @version 2024.6.1.7
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
Expand Down Expand Up @@ -848,13 +848,13 @@
if (getShowReply.attemptCnt < proxyEndpoints.length) retryDiffHost()
else appAlert('suggestOpenAI')
}
}

function retryDiffHost() {
appError(`Error calling ${ endpoint }. Trying another endpoint...`)
getShowReply.triedEndpoints.push(endpoint) // store current proxy to not retry
getShowReply.attemptCnt++
getShowReply(convo, callback)
}
function retryDiffHost() {
appError(`Error calling ${ endpoint }. Trying another endpoint...`)
getShowReply.triedEndpoints.push(endpoint) // store current proxy to not retry
getShowReply.attemptCnt++
getShowReply(convo)
}

function getRelatedQueries(query) {
Expand Down Expand Up @@ -933,7 +933,7 @@
}
}}

async function getShowReply(convo, callback) {
async function getShowReply(convo) {

// Initialize attempt properties
if (!getShowReply.triedEndpoints) getShowReply.triedEndpoints = []
Expand Down

0 comments on commit ddc0dca

Please sign in to comment.