feat: enhance localization and configuration support

- Added timezone and language settings to the environment configuration.
- Introduced built-in agent configurations with multilingual support for various agents.
- Updated Docker Compose to utilize new environment variables for timezone and language.
- Created new prompt templates for question generation, summary generation, and keywords extraction.
This commit is contained in:
wizardchen
2026-03-17 15:33:19 +08:00
committed by lyingbug
parent 09d9fe5ddb
commit 139a9c40ff
54 changed files with 2524 additions and 1482 deletions
+8
View File
@@ -19,6 +19,11 @@ const instance = axios.create({
},
});
// 获取当前用户语言(用于 Accept-Language header)
function getCurrentLanguage(): string {
return i18n.global.locale?.value || localStorage.getItem('locale') || 'zh-CN'
}
instance.interceptors.request.use(
(config) => {
@@ -28,6 +33,9 @@ instance.interceptors.request.use(
config.headers["Authorization"] = `Bearer ${token}`;
}
// 添加用户语言偏好
config.headers["Accept-Language"] = getCurrentLanguage();
// 添加跨租户访问请求头(如果选择了其他租户)
const selectedTenantId = localStorage.getItem('weknora_selected_tenant_id');
const defaultTenantId = localStorage.getItem('weknora_tenant');