We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19b83d7 commit 1b717d7Copy full SHA for 1b717d7
modules/backend-tokenApproximator.js
@@ -414,9 +414,11 @@
414
*
415
*/
416
function createEstimatorWorker() {
417
- // Gemini's CSP blocks blob workers. Fallback to an on-thread mock worker.
418
- if (Site === 'Gemini') {
419
- log('Using synchronous on-thread estimator for Gemini due to CSP.');
+ // CSP workaround: some sites (Gemini / AI Studio) block blob workers.
+ // In that case, return an on-thread mock worker.
+ if (Site === 'Gemini' || Site === 'AIStudio') {
420
+ // Use project logger; keep message site-specific for easier debugging.
421
+ log(`Using synchronous on-thread estimator for ${Site} due to CSP.`);
422
const mockWorker = {
423
onmessage: null,
424
postMessage: (data) => {
0 commit comments