ChatGPT App extension sometimes fails

Hello @Nick,

I realize that the plugin or the application is rather capricious. Indeed, I often have to restart the plugin twice for the ChatGPT application to take over my selection. Otherwise, I hear a little error sound.

I wonder if the problem is that the application call and the selection copy happen too quickly one after the other. I’ve checked the plugin, but I can’t see where to add a “wait”.

Thanks for your help.


Bonjour @Nick,

Je me rends compte que le plugin ou l’application est assez capricieux(se). En effet, je dois souvent relancer le plugin deux fois pour que l’application ChatGPT prenne en charge ma sélection. Sinon, un petit son d’erreur se fait entendre.

Je me demande si le problème ne vient pas du fait que l’appel de l’application et la copie de la sélection se font trop rapidement l’un après l’autre. J’ai vérifié dans le plugin, mais je ne vois pas où ajouter un “wait”.

Merci.

I don’t understand the problem as you have described it. It is unclear to me exactly at which point in the process it is failing. Is it possible you could record a short video showing it?

Well, I don’t get it.
It doesn’t do it when I try to shoot the screen, it’s very frustrating.

To give the situation, although I don’t see why it would make any difference.
I work on 3 screens, and it often does when I try to work on a window on the first screen, while the ChatGPT window is on the 3rd screen.


Bon, je ne comprend pas.
Ca le fait pas quand j’essaie de filmer l’ecran, c’est tres frustrant.

Pour donner la situation, meme si je ne vois pas pourquoi ca changerai quelque chose.
Je travail sur 3 ecrans, et ca le fait souvent quand j’essaie de travaillé sur une fenetre sur le premier ecran, alors que la fenetre de chatgp se strouve sur le 3em ecran.

Can you confirm if you are usinfg the ChatGPT Website extension or the ChatGPT App extension?

ChatGPT App.
It’s not very serious, I could do with it otherwise.

I think it’s probably a timing issue. You can see in the source there are some hard-coded delays to allow the app to open:

export const action: ActionFunction<Options> = async (input, options) => {
  let text = input.text.trim();
  if (options.prompt) {
    text = options.prompt.trim() + "\n\n" + text;
  }
  pasteboard.text = text;
  popclip.openUrl("chatgpt://");
  await util.sleep(50);
  if (options.mode === "new") {
    popclip.pressKey("command n");
    await util.sleep(500);
  }
  popclip.pressKey("command v");
  await util.sleep(100);
  popclip.pressKey("return");
};

Have you got it set to New Chat mode or Current Chat mode?

I use the new chat option.
I’m with you on the timing.
When I open a new ChatGPT window to start a new chat, the window opens correctly. However, the text doesn’t stick inside. I think the Mac’s “bing” occurs when it is unable to copy and paste the text, probably due to a specific restriction or problem.

I am dubious of your theory because PopClip does not perform a “copy” at the time you invoke the extension. It already extracts the text before the PopClip bar appears.

If there was a problem with PopClip extracting the text or with placing it on the clipboard, the problem would be present in all extensions, not just ChatGPT extension. Are you seeing problems with other extensions too?

What this extension does is place the text (that it already extracted) on the clipboard, launch the app, and press command-N, command-V, return.

It is highly likely a timing issue, where the target app is not yet in the state it should be in when the next key press happens. We need to figure out which of the keypresses is causing the boop.

Question: when the failure happens, does the app appear with the old chat showing, or does it open a new chat? (The answer will reveal whether the problem occurs at the time of pressing command-N)

Of course, here is an improved version of your message:

I probably misspoke, and the translation probably didn’t help. Sorry for the confusion.

I think the problem occurs when pasting the text, not when copying.

The ChatGPT window pops up and displays a new conversation, but pasting doesn’t work. This is the problem with “bing”.


Je me suis probablement mal exprimé, et la traduction n’a pas dû aider. Désolé pour la confusion.

Je pense que le problème survient au moment de coller le texte, et non lors de la copie.

La fenêtre de ChatGPT apparaît et affiche une nouvelle conversation, mais le collage ne fonctionne pas. C’est cela qui pose problème avec “bing”.

1 Like

To help me fault-find, will you please answer this:

Question: when the failure happens, does the ChatGPT app appear with the old chat showing, or does it open a new chat?

(With this question, I am trying to determine if the “command-N” key press is being received or not.)

The window appears with the new cat.

Thank you. I suspect that the 500ms delay is the one that is too short. I have found that a error sound is produced if ⌘V is pressed too soon after ⌘N. I have updated the extension, extending it to 800ms. Give it a try!

I will try.

Thank you very much for your kindness and responsiveness!

It seems to be ok; Thank you for your help !

1 Like

Hello,

Is it possible to change the application for the extension?
I would like to use Jan, HuggingChat or other software with the extension.

I imagine that it’s not as easy as changing a line in the extension and that you’d need an extension for each application?


Bonjour,

Est-il possible de changer l’application pour l’extension ?
J’aimerais utiliser Jan, HuggingChat ou d’autres logiciels avec l’extension.

J’imagine que ce n’est pas aussi facile que de modifier une ligne dans l’extension et qu’il faudrait avoir une extention par application ?

Tyopically each different app works in a different way and needs a new extension. Depends on how the app works in each case.