Skip to content

Support configurable output language for LLM-generated content#4

Open
riue wants to merge 1 commit into
ddsyasas:mainfrom
riue:feat/specify-wiki-language
Open

Support configurable output language for LLM-generated content#4
riue wants to merge 1 commit into
ddsyasas:mainfrom
riue:feat/specify-wiki-language

Conversation

@riue

@riue riue commented Jun 7, 2026

Copy link
Copy Markdown

What changed

This PR adds a configurable global output language for LLM-generated content. It stores outputLanguage in the global config, exposes it through the settings API and the Settings UI, preserves it when onboarding state is reset, and threads the setting through chat, query, ingest, lint, and stub-page prompt builders so human-facing model output follows the configured language while slugs and structured enum values remain unchanged.

Why

This makes the wiki usable for people who want generated summaries, answers, lint feedback, and other prose in a language other than English, without changing the wiki’s structural conventions.

How tested

  • pnpm -r exec tsc --noEmit passes (typecheck)
  • pnpm --filter @llm-wiki/core test --run passes
  • pnpm --filter @llm-wiki/llm test --run passes
  • pnpm --filter @llm-wiki/ingestion test --run passes
  • Added new tests for the change (global config parsing and loadOutputLanguage(), prompt construction for chat, query, ingest, and lint to verify the configured language is explicitly enforced)
  • Manually tested in the browser (opened Settings, changed Output language, saved, reloaded settings, and verified
    the value persisted)

Screenshots

Type of change

  • 🐛 Bug fix (non-breaking change that fixes broken behavior)
  • 💡 New feature (non-breaking change that adds functionality)
  • 📖 Documentation only
  • 🧹 Refactor / cleanup (no functional change)
  • 🧪 Test additions
  • 💥 Breaking change (changes wiki on-disk format, CLI flag semantics, or API route shape)

Compatibility

Checklist before requesting review

  • I've read CONTRIBUTING.md and my change fits the project direction
  • My code follows the conventions in CLAUDE.md (TypeScript strict, named exports, kebab-case files, why-not-what comments)
  • No any types added without a comment explaining why
  • No new dependencies added without discussing first (or, deps added are justified in the "Why" section above)
  • No telemetry, analytics, or remote-storage code added
  • If this PR adds a feature, I've updated the relevant docs/ file(s) and/or in-app /help page

Anything else for the reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant