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.ts
src/core/prompts/persona-generation.ts
src/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
locale or language field to tdai-gateway.yaml (defaulting to zh) to allow users to switch the internal prompt language.
- English Templates: Provide English translations for the core extraction and synthesis prompts.
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.tsImpact
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
prompts/directory with support for multiple languages (e.g.,zh.md,en.md).localeorlanguagefield totdai-gateway.yaml(defaulting tozh) to allow users to switch the internal prompt language.