MDium v0.2.4
Release Notes — v0.2.4
Highlights
This release migrates the mindmap save format from KityMinder .km to binary XMind .xmind (with image/layout/theme round-tripping and a one-way .km import bridge), adds BM25/vector hybrid search to RAG, and brings RAG and speech up to working in offline / blocked-network environments. It also reworks the OpenCode RAG integration around an HTTP bridge with built-in custom tools, hardens OpenCode connectivity behind proxies and against rate-limit stalls, and adds a batch delete mode for generated .md files.
New Features
Mindmap — XMind (.xmind) Format
- Mindmaps are now saved as binary XMind (
.xmind) at every save site;.xmindis the only editable mindmap extension, and is always parsed as XMind - KityMinder graphs are serialized to XMind
content.jsonand an XMind 8content.xmlis also built for interoperability with the desktop XMind app - Node images are embedded into and restored from
resources/inside the.xmindpackage, with SVG image-extension normalization - Layout, theme, and image sizing are preserved on save and restored on parse, including a layout ⇆
structureClassmapping .kmfiles become import-only: opening a.kmconverts it to.xmindvia an import bridge, and the intermediate.kmis removed after conversion- XMind icon, panel label, and i18n messages for save/import added
OpenCode — convert-specmd-to-xmind Command
- The mindmap builtin command is renamed to
convert-specmd-to-xmindand repurposed to turn a specification Markdown file into a testcase mindmap - It analyzes the spec and emits one test item per specification point as KityMinder
.kmJSON, which mdium then auto-converts to.xmind - Node labels follow a concise expected-result style (e.g. "{check item} should be {expected value}")
RAG — BM25 / Vector Hybrid Search
rag_searchnow performs hybrid vector + BM25 retrieval, fused with Reciprocal Rank Fusion (RRF)- New FTS5 index with sync triggers and a legacy backfill, plus a trigram (
build_fts_query) query builder for CJK-friendly matching - Search mode and BM25-weight controls added to the RAG panel, with settings persistence and legacy migration (
searchMode/bm25Weight) query_textis optional, and RRF score computation is de-duplicated
RAG — Offline / Blocked-Network Support
- ONNX/ORT WASM is served locally (via a dev middleware in development) instead of from a CDN, fixing the "Building…" hang and no-backend errors in closed networks
- Embedding models are stored under
app_local_data_dir, fixing OS error 5 - Manual model-placement UX for blocked networks, including an Open-folder button that works even when the model directory already exists
model_subpathis hardened against path traversal
RAG — OpenCode Bridge & Custom Tools
- OpenCode's
rag_searchis delegated to the mdium app over a local HTTP bridge (sidecar written at startup), so search runs against mdium's active folder rather than OpenCode's worktree - Built-in custom tools can be added via "+ Built-in" (replacing connect-time auto-copy); adding the RAG agent prompts to install the required tool
- Default embedding model is
ruri-v3-30mfor the Japanese UI, and the model is pre-warmed on OpenCode connect - The RAG agent prompt is strengthened to mandate
rag_searchfirst
Export — Batch Delete Generated .md
- New delete mode in the batch convert modal to move generated
.mdfiles to the recycle bin delete_generated_mdcommand moves files to the recycle bin rather than hard-deleting.mdfilenames are shown in the batch delete tree, with apruneTreeByHasMdhelper and a confirm dialog- Type-safe delete-status enum and a shared md-path helper
OpenCode — Stall Watchdog
- A stall watchdog is wired into the chat SSE loop, surfacing a soft "still waiting" notice instead of an indefinite "Thinking…" hang on rate-limit (429) stalls
- Pure
evaluateStalltiming logic with test coverage across the full notice window
Bug Fixes
OpenCode
- Connects via a reqwest-backed fetch to bypass the WinINET proxy hang ("Connecting…" freeze) in proxy environments
- Stall give-up is guarded against stomping a new turn
RAG
- The RAG bridge always responds and is guarded against a model-load hang;
node:import specifiers and a fetch timeout are used in therag_searchtool - Settings dialog height is capped with
max-height
Editor & UI
- Editor scroll position is preserved on programmatic content edits
- The file-tree context menu is clamped within the viewport
- The source-control badge is cleared when all folder tabs are closed
Dependencies
- The
tauricrate is bumped to 2.11.2 to match@tauri-apps/api
Chores & Docs
- Vitest no longer double-counts
.claudeworktree copies (excluded from discovery) - Temporary SSE event diagnostics added for the rate-limit hang investigation
- Specs and implementation plans added for XMind export, RAG BM25/vector hybrid search, RAG offline/blocked-env support, the OpenCode stall watchdog, and batch delete of generated
.md