logancyang_obsidian-copilot/scripts
Zero Liu 6331631dd0
chore(popout): window-global API swaps — timers, globalThis, base64 (W3/9) (#2401)
Fourth of nine workspaces splitting #2397. Mechanical swaps to
window-namespaced globals for Obsidian popout window compatibility.
No semantic behavior change beyond "works correctly in a popout."

- setTimeout / clearTimeout / setInterval / clearInterval /
  requestAnimationFrame → window.* across all callsites
- globalThis → window (BedrockChatModel fetch.bind, scattered sites)
- atob / btoa → Buffer.from(..., 'base64') / Buffer.from(...).toString('base64')
  - src/encryptionService.ts (drops Node 'buffer' import; Buffer is global)
  - src/utils.ts safeFetch arrayBuffer() branch
  - src/LLMProviders/BedrockChatModel.ts decodeBase64ToUint8Array

Builds on top of #2398 (W0 — deps bump).

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 22:24:17 -07:00
..
stubs Merge 3.1.0 preview (#1906) 2025-10-10 21:38:50 -07:00
printPromptDebug.js Merge 3.1.0 preview (#1906) 2025-10-10 21:38:50 -07:00
printPromptDebugEntry.ts chore(popout): window-global API swaps — timers, globalThis, base64 (W3/9) (#2401) 2026-05-12 22:24:17 -07:00