Localization issue: Hardcoded Chinese prompts in L1/L2/L3 extraction layers
Summary
The system prompts for scene extraction, persona generation, and L1 deduplication are currently hardcoded in Chinese within the source code. This causes the Gateway to generate Chinese filenames (e.g., 个人身份与安全偏好.md) and Chinese content within the memory blocks, even when the user is conversing in English and using a non-Chinese LLM provider.
Files Affected
src/core/prompts/scene-extraction.tssrc/core/prompts/persona-generation.tssrc/core/prompts/l1-dedup.ts
Impact
Non-Chinese speaking users find it difficult to manage or audit their memory files (scene blocks) as the metadata and categorization are not in their native language. This limits the project's accessibility for a global audience.
Suggested Resolution
- Prompt Externalization: Move the prompt templates out of the TypeScript files and into a dedicated
prompts/directory with support for multiple languages (e.g.,zh.md,en.md). - Configuration Support: Add a
localeorlanguagefield totdai-gateway.yaml(defaulting tozh) to allow users to switch the internal prompt language. - English Templates: Provide English translations for the core extraction and synthesis prompts.
Hi @codxt, thanks for the detailed report!
You're right — the extraction prompts are currently hardcoded in Chinese. This is a known limitation. We'll review internally and schedule a fix soon.
Got it! We will fix this in our next version.
Thanks @codxt — fixed and shipping in the next release. The L1/L2/L3 prompts now adapt to the user's input language automatically (no locale config needed); JSON keys / file names / timestamps stay English as a stable contract. Will close once the release is out.
Released in v0.3.6 🎉 Closing now — thanks again!