Skip to content

Commit 0efa6f8

Browse files
committed
Add a 250ms delay after clicking ChatGPT options to ensure UI updates before proceeding
1 parent 02ac2fa commit 0efa6f8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/browser/src/content-scripts/send-prompt-content-script/chatbots

‎packages/browser/src/content-scripts/send-prompt-content-script/chatbots/chatgpt.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const chatgpt: Chatbot = {
5959
await new Promise((resolve) => {
6060
const check_for_param = () => {
6161
if (window.location.search.includes('temporary-chat=true')) {
62-
resolve(null)
62+
setTimeout(() => resolve(null), 250)
6363
} else {
6464
setTimeout(check_for_param, 100)
6565
}
@@ -95,6 +95,7 @@ export const chatgpt: Chatbot = {
9595
)
9696
if (path_element) {
9797
;(item as HTMLElement).click()
98+
await new Promise((resolve) => setTimeout(resolve, 250))
9899
found = true
99100
break
100101
}

0 commit comments

Comments
 (0)