v0.7.2 — the language sample is really the recent pages
Patch on v0.7.1's session-language default.
Fixes
- Detection now samples the pages it claimed to. The code stored a placeholder in place of each page's modification time and then took a tail slice, so the "newest twelve pages" were really "twelve in directory order". A wiki that ran in English for a long time and recently switched to Korean stayed English, outvoted by its own history. It now sorts by real mtime — and sampling the newest pages keeps the check cheap on a large wiki.
How it decides, stated plainly
- One vote per document, the most-used language wins. Inside a document the script counts decide, so "the language used most, ignoring code" holds at both levels.
- Order is unchanged:
LLMWIKI_LANG→ an explicit[wiki] lang→ the wiki's recent content pages → your own utterances in this repo's captured transcripts → English. - Your pages are unaffected as always: page prose follows your conversation.
Update
git pull && ./setup.sh548 tests passing via bun test, tsc --noEmit clean. Verified on a mixed wiki (two Korean pages, one English → Korean) and on a switched wiki (fourteen old English pages, six recent Korean → Korean).