No description
Find a file
wujunchen 38ba0acdb2 fix: parse Claude Code JSON array output and drop --model flag
Claude Code `--output-format json` returns a JSON array of event
objects, not a single object. Parse the array and extract the
result event. Also stop passing --model to let Claude Code use
its own default model. Revert timeout to 120s.

Change-Id: I5b5d4aa589ff78c0a2806a3e700bac0676a9b354
2026-04-26 11:09:47 +08:00
.github/workflows ci: add GitHub Actions workflow for build, typecheck, test, and lint 2026-04-26 09:31:38 +08:00
src fix: parse Claude Code JSON array output and drop --model flag 2026-04-26 11:09:47 +08:00
tests security: strip path traversal segments from vault paths 2026-04-26 09:48:19 +08:00
.editorconfig chore: add .editorconfig for consistent formatting 2026-04-25 23:48:27 +08:00
.gitignore refactor: remove CLI backends, add Chinese README 2026-04-26 09:57:30 +08:00
biome.json chore: upgrade biome noExplicitAny from off to warn 2026-04-26 08:59:40 +08:00
esbuild.config.mjs feat: add TypeScript build and provider architecture 2026-04-25 14:12:17 +08:00
LICENSE init: Obsidian Parallel Reader v0.1.0 2026-04-24 19:31:23 +08:00
main.js fix: parse Claude Code JSON array output and drop --model flag 2026-04-26 11:09:47 +08:00
main.ts feat: restore Codex CLI backend 2026-04-26 10:11:59 +08:00
manifest.json fix: remove authorUrl pointing to repo (rejected by marketplace) 2026-04-26 10:54:17 +08:00
package-lock.json feat: add Biome for lint and format 2026-04-25 23:47:49 +08:00
package.json test: add comprehensive unit tests for pure modules 2026-04-26 09:25:23 +08:00
README.md docs: modern English README with badges and star history 2026-04-26 11:00:29 +08:00
README.zh-CN.md docs: modern English README with badges and star history 2026-04-26 11:00:29 +08:00
styles.css feat: add streaming API responses for OpenAI Chat and Anthropic 2026-04-26 09:30:51 +08:00
tsconfig.json refactor: enable full TypeScript strict mode 2026-04-26 09:21:54 +08:00
versions.json chore: prepare 1.0.0 for Obsidian community plugin submission 2026-04-26 10:41:18 +08:00

Release CI License Stars

Obsidian Parallel Reader

中文文档

Split-view reading for Obsidian — your original note on the left, AI-generated summary cards on the right, with scroll-sync highlighting.

Inspired by this reading workflow demo.

Features

  • Adaptive segmentation — the LLM decides natural topic boundaries. Short sections merge, long ones split. No dependency on markdown headings.
  • Scroll-sync — scrolling the editor auto-highlights the matching card on the right.
  • Streaming — real-time SSE streaming for OpenAI Chat and Anthropic APIs, so you see progress as it generates.
  • 20+ providers — Anthropic, OpenAI, Gemini, OpenRouter, Groq, DeepSeek, Moonshot, Ollama, LM Studio, and more. Plus Claude Code CLI and Codex CLI backends.
  • Persistent cache — summaries are cached by content SHA-1 + settings fingerprint. Reopen a note and cards appear instantly. Edits or config changes show a stale banner.
  • Rich rendering — cards render through Obsidian's MarkdownRenderer, so tables, bold, code, and wikilinks all work natively.
  • Card editing — right-click any card to copy, edit, delete, or jump to source.
  • Export — save cards as a Markdown note in your vault, or copy to clipboard.
  • Bilingual UI — full Chinese and English support for commands, settings, and notices.

Quick Start

Install

Manual — Download main.js, manifest.json, and styles.css from the latest release, place them in .obsidian/plugins/parallel-reader/, and enable the plugin in Obsidian settings.

Configure a Provider

Open plugin settings, pick a provider preset, enter your API key and model ID. Done.

Provider Format Notes
Anthropic anthropic-messages Default, recommended
OpenAI openai-chat Chat Completions
Google Gemini google-generative-ai generateContent
OpenRouter / Groq / DeepSeek / Moonshot / ... openai-chat OpenAI-compatible
Ollama / LM Studio openai-chat Local, no API key needed
Custom endpoint Any Just fill in Base URL

Model IDs support provider/model notation (e.g. anthropic/claude-sonnet-4-6) — the matching prefix is stripped automatically.

CLI Backends (Optional)

Switch backend to Claude Code CLI or Codex CLI to use your local CLI installation.

Since Obsidian's GUI doesn't inherit your shell PATH, enter the absolute CLI path in settings:

which claude    # Claude Code
which codex     # Codex

Usage

Action Effect
Click a card Jump editor to that section
Right-click a card Context menu: copy, edit, delete, jump to source
Scroll the editor Right-side card auto-highlights
Alt+↑ / Alt+↓ Navigate between cards
Enter in summary pane Jump to active card's source line
Ribbon icon Open the parallel reader pane
File context menu Generate / regenerate / clear cache

How It Works

The LLM returns structured JSON:

{
  "cards": [
    {
      "title": "Short heading",
      "anchor": "Verbatim quote from source for positioning",
      "gist": "One-sentence lead-in",
      "bullets": ["Supporting detail 1", "Supporting detail 2"]
    }
  ]
}

Anchor is the key mechanism — a verbatim quote that the plugin locates via indexOf with multi-level fallbacks, keeping scroll-sync working without relying on headings.

Gist + bullets gives both overview and scannable detail — pure prose felt like a wall of text, pure bullets felt fragmented.

Development

npm install
npm run dev       # watch mode
npm run build     # production build
npm run typecheck # TypeScript strict mode
npm run lint      # Biome
npm test          # build + typecheck + tests

Star History

Star History Chart

License

MIT