Skip to content

v0.7.8 — Fix: plugin now loads on mobile

Choose a tag to compare

@github-actions github-actions released this 28 May 17:56
· 504 commits to main since this release
c8c89d7

Bug fix

Plugin failed to load on Obsidian Mobile

Root cause: MobileView.ts imported formatToolName from ClaudeSession.ts. ClaudeSession.ts imports from @anthropic-ai/claude-agent-sdk (sdk.mjs), which has top-level ES module imports of Node.js built-ins:

import { execFile } from "child_process";

esbuild bundles this and leaves require('child_process') calls in the output. On mobile, Obsidian's require() returns null for Node built-ins — accessing .execFile on null throws TypeError at module load time, before onload() even runs.

Fix: Extracted formatToolName and getToolIcon into a new src/toolNameUtils.ts (zero imports — pure string logic). MobileView.ts now imports from there instead of ClaudeSession.ts, breaking the SDK dependency in the mobile module graph. Desktop callers are unaffected.

Also added try/catch around onloadMobile() so any future initialization errors surface as a visible Notice rather than silent failure.