lossless-group_perplexed-pl.../changelog
mpstaton 01897c0903 fix(perplexityService, directoryTemplateService): CORS bypass — Node.js https replaces activeWindow.fetch for all Perplexity streaming paths
Perplexity's API stopped including Access-Control-Allow-Origin headers
for app://obsidian.md, so Electron's Chromium renderer began blocking
every streaming response body — even on successful 200 OK requests.
Every Perplexity query that used streaming was silently producing nothing.

Both streaming call sites now use https.request from node:https instead
of activeWindow.fetch. Node.js routes through the OS network stack and
has no CORS constraint at all. The resulting IncomingMessage stream is
wrapped in a Web ReadableStream<Uint8Array> and passed to the existing
SSE parsing machinery unchanged — idle-timeout, chunk accumulation,
citations, images, and AbortController signal handling all preserved.

Non-streaming requests (Obsidian's request() function) were never
affected and are untouched.

perplexityService.ts:
- Added import * as https from 'node:https' + import type { IncomingMessage }
- Replaced activeWindow.fetch in queryPerplexity streaming branch with
  https.request → IncomingMessage → ReadableStream<Uint8Array> bridge

directoryTemplateService.ts:
- Same imports
- Replaced activeWindow.fetch in streamPerplexityToFile with same bridge
- AbortController.signal threaded into https.request signal option so
  ceiling-timer and user-cancel abort behavior is fully preserved

Bumps to 0.3.1 — manifest.json, package.json, versions.json updated.

Files changed:
- src/services/perplexityService.ts
- src/services/directoryTemplateService.ts
- manifest.json
- package.json
- versions.json
- changelog/2026-07-06_01.md
- changelog/releases/0.3.1.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 14:41:12 -05:00
..
releases fix(perplexityService, directoryTemplateService): CORS bypass — Node.js https replaces activeWindow.fetch for all Perplexity streaming paths 2026-07-06 14:41:12 -05:00
2025-07-19_01.md revise(changelog): de-emphasize starter-fork lineage in retrospective 2026-05-04 21:57:51 -05:00
2026-04-30_01.md improve(modals): upgrade Perplexical Modal UI, context and changelogs 2026-05-02 17:07:10 -05:00
2026-05-01_01.md improve(modals): upgrade Perplexical Modal UI, context and changelogs 2026-05-02 17:07:10 -05:00
2026-05-02_01.md improve(modals): upgrade Perplexical Modal UI, context and changelogs 2026-05-02 17:07:10 -05:00
2026-05-10_01.md docs(changelog): 2026-05-10_01 — directory templates paradigm with auto-seeding 2026-05-10 00:45:52 -05:00
2026-05-12_01.md fix(marketplace): comply with ObsidianReviewBot recommended config — sentence-case, no-restricted-globals, async hygiene 2026-05-12 06:58:09 -05:00
2026-05-19_01.md feat(directory-templates): partials + preambles — vault-visible shared rules, plus fix that resurrected 11 hidden settings sections 2026-05-19 20:14:04 -05:00
2026-05-19_02.md feat(release): 0.2.0 — Ask Gemini joins the lineup, with the per-claim citations Claude's web_search can't keep 2026-05-20 01:35:31 -05:00
2026-05-20_01.md feat(release): 0.2.0 — Ask Gemini joins the lineup, with the per-claim citations Claude's web_search can't keep 2026-05-20 01:35:31 -05:00
2026-05-26_01.md feat(directory-templates): market-map analyst profile + per-template request-timeout-ms cft override 2026-05-26 17:08:43 -05:00
2026-05-26_02.md feat(release): 0.3.0 — three analyst-grade templates for VC/PE/equities + four infrastructure fixes for deep-research reliability 2026-05-27 17:41:13 -05:00
2026-05-27_01.md feat(release): 0.3.0 — three analyst-grade templates for VC/PE/equities + four infrastructure fixes for deep-research reliability 2026-05-27 17:41:13 -05:00
2026-07-06_01.md fix(perplexityService, directoryTemplateService): CORS bypass — Node.js https replaces activeWindow.fetch for all Perplexity streaming paths 2026-07-06 14:41:12 -05:00