Commit 5aaddc5
committed
fix: move ESM provider wrapper from plugin to CDN
Move the ESM provider wrapper (jetpack-ai-provider-esm.mjs) from
Jetpack plugin files to the CDN build in calypso. This eliminates
the dependency on local plugin files for the provider URL, which
breaks on Simple sites where plugin files don't exist on disk.
- Delete local jetpack-ai-provider-esm.mjs
- Add AI_SIDEBAR_PROVIDER_URL constant pointing to CDN
- Update register_provider() to use CDN URL without ?ver= param
(wrapper reads from window global at import time, always in sync)
- Update test assertions to match new URL1 parent 3f4a41f commit 5aaddc5
File tree
3 files changed
+9
-14
lines changed- projects/plugins/jetpack
- extensions/plugins/ai-assistant-plugin/ai-sidebar
- tests/php/extensions/plugins/ai-sidebar
3 files changed
+9
-14
lines changedLines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
390 | 392 | | |
391 | 393 | | |
392 | 394 | | |
| |||
Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
| 323 | + | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
0 commit comments