ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

[Feature] Auto Reload once an hour

Open PascalPixel opened this issue 2 years ago • 1 comments

Feature description

This app is fantastic when set up as a menubar-only start-on-boot silent-update mac app (should be the default config imho), I've used it for a month now and I'm very happy! Thank you!

Once every few hours it fails to work, and it's because OpenAI wants me to get by their cloudflare-like robot protection again. It just means pressing cmd+r to reload it, but it would be nice if it did that automatically when the front-end stops being allowed to connect to the back-end. I can't imagine others easily figuring this out.

Easy fix solution; Perhaps just perform cmd+r automatically on re-open once an hour?

Screenshot 2023-01-22 at 11 15 49

Motivation

No response

Alternatives

No response

Additional context

No response

PascalPixel avatar Jan 22 '23 11:01 PascalPixel

Custom events are recommended to be implemented using inject script, click menu Preferences -> Inject Script, add the following code to ~/.chatgpt/main.js file and restart the application. You can enable the console in the Help menu to debug the code.

setInterval(() => {
  window.location.reload();
}, 60*60*1000);

lencx avatar Jan 22 '23 11:01 lencx

I know it is closed by now, but we had better add this tip to the Readme file, for greater visibility. Myself I was wondering what one can do via these Inject (JS) scripts command - and only now I thought and learnt of this useful "do it yourself" JS trick.

Manamama avatar Jan 27 '23 12:01 Manamama

I know it is closed by now, but we had better ad this tip to the Readme file, for greater visibility. Myself I was wondering what one can do via these Inject (JS) scripts command - and only now I thought and learnt of this useful "do it yourself" JS trick.

I think it's a good idea,but it's not wise to put almost everything into README.I think we'd better add an doc directory,and discuss these deeper topics there.

yixinBC avatar Jan 27 '23 12:01 yixinBC