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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user