Skip to content

[6.2.0] LLM Translation, analysis, anki integration

Choose a tag to compare

@hockyy hockyy released this 05 Jul 22:53

What's New in Miteiru 6.2.0

Changes since v6.1.0.

Features

  • Learn page AI translation — The left column on /learn translates source text into Japanese, Mandarin (zh-CN), or Cantonese with formal, neutral, and casual variants per line. Results include grammar notes, glossary, and wording notes. Powered by OpenRouter (API key and model in settings, Ctrl+X).
  • Learn page AI analysis — Analyze the current sentence from the middle column. Structured results in the right panel: English translation, summary, grammar, vocabulary, cultural notes, and learning tips (JSON-backed UI instead of a raw text dump).
  • Anki export from MeaningBox — Export the current term as Anki cards (Miteiru::{Language}::Easy and ::Hard) with definitions, readings, user notes, and examples.
  • Learn page Anki card builder — Build sentence cards for Miteiru::{Language}::Hard: preview and edit front/back (ruby markup, translation, note), then open the import file.
  • Live Captions on Learn — On Windows, start Live CC from the learn page middle column; captions flow into the current sentence display with tokenized ruby (same pipeline as the video page).
  • MeaningBox copy shortcuts — Copy word and Copy with reading buttons in the help section (same as W / Shift+W).

Improvements

  • OpenRouter on Learn — Learning sidebar stores OpenRouter API key (auto-save) and AI model (draft + Save button). Default model: z-ai/glm-5.2:nitro.
  • Anki import flow — Open in Anki writes a TSV to user-data, reveals it in the file manager, and launches Anki when installed. Works on Windows, macOS, and Linux (including Flatpak/Snap/which anki on Linux, open -a Anki on macOS).
  • Shared Learn utilities — OpenRouter client, JSON parsers, useAiTranslation / useSentenceAnalysis / useSentenceAnki hooks, reusable copy button, and loading animation for AI panels.
  • MeaningBox refactor — Dictionary lookups and Anki card building extracted into meaningEntries.ts and ankiExport.ts.
  • Home page — Removed the auto-load option to simplify startup.

Fixes

  • Copy buttons — Learn and MeaningBox copy actions no longer clip labels (fixed-width AwesomeButton overflow).
  • Live CC open-path handler — Correctly checks Electron shell.openPath error strings instead of always reporting success.

Developer notes

  • New tests: parseAiTranslation, parseSentenceAnalysis, parseSentenceAnkiBack, textUtils, ankiImportReveal.
  • New main helper: main/helpers/ankiImportReveal.ts for cross-platform Anki file reveal and launch.

Full Changelog: v6.1.0...v6.2.0