Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

feat: 增加env可配置欢迎语

strLights_ef1d74328a10
diff --git a/jiuwenswarm/channels/web/frontend/.env.development b/jiuwenswarm/channels/web/frontend/.env.development
index db4eb1a039..45420b2eef 100644
--- a/jiuwenswarm/channels/web/frontend/.env.development
+++ b/jiuwenswarm/channels/web/frontend/.env.development
@@ -2,3 +2,6 @@
VITE_BASE_PATH=/
# 接口前缀
VITE_API_PREFIX=
+# 首页欢迎语(留空则使用默认文案)
+VITE_WELCOME_TITLE_ZH=
+VITE_WELCOME_TITLE_EN=
\ No newline at end of file
diff --git a/jiuwenswarm/channels/web/frontend/.env.production b/jiuwenswarm/channels/web/frontend/.env.production
index 71fc56fefe..fa23d9ebd7 100644
--- a/jiuwenswarm/channels/web/frontend/.env.production
+++ b/jiuwenswarm/channels/web/frontend/.env.production
@@ -5,3 +5,6 @@
VITE_BASE_PATH=./
# 接口前缀
VITE_API_PREFIX=
+# 首页欢迎语(留空则使用默认文案)
+VITE_WELCOME_TITLE_ZH=
+VITE_WELCOME_TITLE_EN=
diff --git a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/index.tsx b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/index.tsx
index b32d22894a..eda9e14a0d 100644
--- a/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/index.tsx
+++ b/jiuwenswarm/channels/web/frontend/src/components/ChatPanel/index.tsx
@@ -413,14 +413,14 @@ function WelcomeHeading() {
if (isZh) {
return (
<>
- JiuwenSwarm 轻松解决工作每个问题!
+ {import.meta.env.VITE_WELCOME_TITLE_ZH || 'JiuwenSwarm 轻松解决工作每个问题!'}
</>
);
}
return (
<>
- JiuwenSwarm makes work easier!
+ {import.meta.env.VITE_WELCOME_TITLE_EN || 'JiuwenSwarm makes work easier!'}
</>
);
}
diff --git a/jiuwenswarm/channels/web/frontend/src/vite-env.d.ts b/jiuwenswarm/channels/web/frontend/src/vite-env.d.ts
index 1af3c4720e..028913bb4f 100644
--- a/jiuwenswarm/channels/web/frontend/src/vite-env.d.ts
+++ b/jiuwenswarm/channels/web/frontend/src/vite-env.d.ts
@@ -12,6 +12,8 @@ interface ImportMetaEnv {
readonly VITE_LOGIN_AUTH_SIMULATE?: string;
readonly VITE_BASE_PATH?: string;
readonly VITE_API_PREFIX?: string;
+ readonly VITE_WELCOME_TITLE_ZH?: string;
+ readonly VITE_WELCOME_TITLE_EN?: string;
}
interface ImportMeta {