But it looks like it cannot co-exist with the ChatGPT extension. I had to delete (disabling is not enough) the cost estimator extension for the ChatGPT extension to work.
The corresponding error message is:
Result: error: Error: XMLHttpRequest may not be used at this time (axios.js.lzfse:211:17) <no output text>
(Edited because I hadn’t read the initial code properly!)
(Edit 2: DIsregard the below – It’s still true, but not relevant here. I will investigate further…)
An actions function that’s actually being run while generating the actions for the PopClip bar, it isn’t allowed to access the internet.
That’s a decision I made because this code runs for every text the user selects without explicit invocation of the action. Therefore it presents an opportunity for someone to make a nefarious text-sniffing extension to hover up all the text a user selects.
While designing this feature, I was quite worried about that potential, so I decided to disallow network access for dynamic extensions.
This is hardcoded into PopClip, even for signed extensions I’ve made, and there isn’t currently any way to disable that.
So the solution, in this case, is to make it an action you have to invoke explicitly. Not so convenient, but hopefully, you can appreciate the security vs functionality tradeoff here.
(In fact, this extension wouldn’t work anyway because it would need both the network and dynamic entitlements. If you tried to set both at once, you would get an explicit error message saying nope, not allowed.)
I could definitely improve the documentation and error message to make this clearer.
Replying a third time because I still didn’t read the code properly! My apologies. I see that it isn’t actually using the network; indeed you may have discovered a bug. I shall look into it.