diff --git a/Dockerfile b/Dockerfile index 02dbd28..4acad54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -409,7 +409,7 @@ COPY --from=s3final node_modules /supabase/storage-api/node_modules COPY --from=s3final dist /supabase/storage-api/dist COPY --from=s3final migrations /supabase/storage-api/migrations -#========================================= chatai-ui ======================================================== +#========================================= chatdesk-ui ======================================================== # # 拷贝依赖声明并安装仅生产依赖 COPY chatdesk-ui/package.json chatdesk-ui/package-lock.json supabase/chatdesk/ WORKDIR /supabase/chatdesk diff --git a/chatdesk-ui/Dockerfile b/chatdesk-ui/Dockerfile index 7bd9cfb..6e62777 100644 --- a/chatdesk-ui/Dockerfile +++ b/chatdesk-ui/Dockerfile @@ -42,4 +42,4 @@ ENV NODE_ENV=production EXPOSE 3000 # 正确使用 pm2-runtime 保持容器挂起 -CMD ["pm2-runtime", "start", "npm", "--name", "chatai-ui", "--", "run", "start"] +CMD ["pm2-runtime", "start", "npm", "--name", "chatdesk-ui", "--", "run", "start"] diff --git a/chatdesk-ui/app/[locale]/layout.tsx b/chatdesk-ui/app/[locale]/layout.tsx index 37269d8..da759a2 100644 --- a/chatdesk-ui/app/[locale]/layout.tsx +++ b/chatdesk-ui/app/[locale]/layout.tsx @@ -14,10 +14,10 @@ import { getRuntimeEnv } from "@/lib/ipconfig" // 新增引入 import Script from "next/script" const inter = Inter({ subsets: ["latin"] }) -const APP_NAME = "ChatAI UI" -const APP_DEFAULT_TITLE = "ChatAI UI" -const APP_TITLE_TEMPLATE = "%s - ChatAI UI" -const APP_DESCRIPTION = "ChaAI UI PWA!" +const APP_NAME = "ChatDesk UI" +const APP_DEFAULT_TITLE = "ChatDesk UI" +const APP_TITLE_TEMPLATE = "%s - ChatDesk UI" +const APP_DESCRIPTION = "ChatDesk UI PWA!" interface RootLayoutProps { children: ReactNode diff --git a/chatdesk-ui/components/setup/finish-step.tsx b/chatdesk-ui/components/setup/finish-step.tsx index 52160d3..f4268cc 100644 --- a/chatdesk-ui/components/setup/finish-step.tsx +++ b/chatdesk-ui/components/setup/finish-step.tsx @@ -10,7 +10,7 @@ export const FinishStep: FC = ({ displayName }) => { return (
- {t("setup.WelcomeToChatAIUI")} + {t("setup.WelcomeToChatDeskUI")} {displayName.length > 0 ? `, ${displayName.split(" ")[0]}` : null}!
diff --git a/chatdesk-ui/package.json b/chatdesk-ui/package.json index a63697b..83d8b18 100644 --- a/chatdesk-ui/package.json +++ b/chatdesk-ui/package.json @@ -11,7 +11,7 @@ "prebuild": "node scripts/generate-env.js", "build": "next build", "start": "next start -H 0.0.0.0 -p 3030", - "start:prod": "npm run build && pm2 start npm --name \"chatai-ui\" -- run start", + "start:prod": "npm run build && pm2 start npm --name \"chatdesk-ui\" -- run start", "lint": "next lint", "lint:fix": "next lint --fix", "analyze": "ANALYZE=true npm run build", diff --git a/chatdesk-ui/public/locales/en/translation.json b/chatdesk-ui/public/locales/en/translation.json index 6f5dc88..30ca36f 100644 --- a/chatdesk-ui/public/locales/en/translation.json +++ b/chatdesk-ui/public/locales/en/translation.json @@ -10,7 +10,7 @@ "setup": { "LetsCreateYourProfile": "Let's create your profile.", - "WelcomeToChatbotUI": "Welcome to ChatAI UI", + "WelcomeToChatbotUI": "Welcome to ChatDesk UI", "EnterAPIKeysForEachServiceYoudLikeToUse": "Enter API keys for each service you'd like to use.", "SetAPIKeysOptional": "Set API Keys (optional)", "YouAreAllSetUp": "You are all set up!", @@ -36,7 +36,7 @@ "switchToAzureOpenAI": "Switch To Azure OpenAI", "back": "Back", "next": "Next", - "WelcomeToChatAIUI": "Welcome to the Enterprise AI Chat Platform", + "WelcomeToChatDeskUI": "Welcome to the Enterprise AI Chat Platform", "ClickNextToStartChatting": "Click Next to start chatting with the AI." }, diff --git a/chatdesk-ui/public/locales/ja/translation.json b/chatdesk-ui/public/locales/ja/translation.json index 58d3dbb..c8decdc 100644 --- a/chatdesk-ui/public/locales/ja/translation.json +++ b/chatdesk-ui/public/locales/ja/translation.json @@ -10,7 +10,7 @@ "setup": { "LetsCreateYourProfile": "プロフィールを作成しましょう。", - "WelcomeToChatbotUI": "ChatAI UIへようこそ", + "WelcomeToChatbotUI": "ChatDesk UIへようこそ", "EnterAPIKeysForEachServiceYoudLikeToUse": "使用する各サービスのAPIキーを入力してください。", "SetAPIKeysOptional": "APIキーの設定(オプション)", "YouAreAllSetUp": "設定が完了しました!", @@ -36,7 +36,7 @@ "switchToAzureOpenAI": "Azure OpenAI に切り替え", "back": "戻る", "next": "次へ", - "WelcomeToChatAIUI": "エンタープライズAIチャットプラットフォームへようこそ", + "WelcomeToChatDeskUI": "エンタープライズAIチャットプラットフォームへようこそ", "ClickNextToStartChatting": "「次へ」をクリックして AI との対話を始めましょう。" }, diff --git a/chatdesk-ui/public/locales/zh/translation.json b/chatdesk-ui/public/locales/zh/translation.json index 344d0df..5f45901 100644 --- a/chatdesk-ui/public/locales/zh/translation.json +++ b/chatdesk-ui/public/locales/zh/translation.json @@ -10,7 +10,7 @@ "setup": { "LetsCreateYourProfile": "让我们来创建您的个人资料。", - "WelcomeToChatbotUI": "欢迎使用 ChatAI UI", + "WelcomeToChatbotUI": "欢迎使用 ChatDesk 通用AI对话工具前端界面", "EnterAPIKeysForEachServiceYoudLikeToUse": "输入您希望使用的每个服务的 API 密钥。", "SetAPIKeysOptional": "设置 API 密钥(可选)", "YouAreAllSetUp": "设置完成!", @@ -36,7 +36,7 @@ "switchToAzureOpenAI": "切换为 Azure OpenAI", "back": "返回", "next": "下一步", - "WelcomeToChatAIUI": "欢迎使用企业AI对话平台", + "WelcomeToChatDeskUI": "欢迎使用企业AI对话平台", "ClickNextToStartChatting": "点击“下一步”开始与 AI 对话。" }, diff --git a/supabase/chatdesk/init.sh b/supabase/chatdesk/init.sh index 3df766e..2f1e478 100644 --- a/supabase/chatdesk/init.sh +++ b/supabase/chatdesk/init.sh @@ -25,14 +25,14 @@ echo "🚀 Starting database initialization..." # 执行 migrations echo "📂 Running migrations..." -for file in $(ls /supabase/chatai-ui/supabase/migrations/*.sql | sort); do +for file in $(ls /supabase/chatdesk-ui/supabase/migrations/*.sql | sort); do echo " ▶ Executing $file" psql -f "$file" done # 执行 seed.sql echo "🌱 Running seed.sql..." -psql -f /supabase/chatai-ui/supabase/seed.sql +psql -f /supabase/chatdesk-ui/supabase/seed.sql # 写入初始化标记 touch "$FLAG_FILE" diff --git a/supabase/chatdesk/wrapper.sh b/supabase/chatdesk/wrapper.sh index ab0e89c..9a8df5e 100644 --- a/supabase/chatdesk/wrapper.sh +++ b/supabase/chatdesk/wrapper.sh @@ -3,10 +3,10 @@ set -euo pipefail export SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0" -echo "[chatai-ui] Waiting for Kong to proxy PostgREST..." +echo "[chatdesk-ui] Waiting for Kong to proxy PostgREST..." until curl -s -o /dev/null -w "%{http_code}" -H "apikey: $SUPABASE_ANON_KEY" http://localhost:8000/rest/v1/ | grep -qE "^(200|401|403)$"; do - echo "[chatai-ui] Still waiting for /rest/v1/ ..." + echo "[chatdesk-ui] Still waiting for /rest/v1/ ..." sleep 1 done @@ -19,12 +19,12 @@ fi # ✅ 删除旧的 env.js(如果存在) ENV_FILE="/supabase/chatdesk/public/env.js" if [ -f "$ENV_FILE" ]; then - echo "[chatai-ui] Removing old env.js" + echo "[chatdesk-ui] Removing old env.js" rm -f "$ENV_FILE" fi # ✅ 写入新的 env.js -echo "[chatai-ui] Writing env.js with SUPABASE_URL=$SUPABASE_URL" +echo "[chatdesk-ui] Writing env.js with SUPABASE_URL=$SUPABASE_URL" cat < "$ENV_FILE" window.RUNTIME_ENV = { "SUPABASE_URL": "${SUPABASE_URL}" @@ -32,7 +32,7 @@ window.RUNTIME_ENV = { EOF -echo "[chatai-ui] API is reachable via Kong. Starting UI..." +echo "[chatdesk-ui] API is reachable via Kong. Starting UI..." /bin/bash /supabase/chatdesk/init.sh diff --git a/supabase/postgres/supervisord.conf b/supabase/postgres/supervisord.conf index 21ab8f4..2a94a1c 100644 --- a/supabase/postgres/supervisord.conf +++ b/supabase/postgres/supervisord.conf @@ -53,9 +53,9 @@ redirect_stderr=true stdout_logfile=auto -[program:chatai-ui] -command=/bin/bash /supabase/chatai-ui/wrapper.sh +[program:chatdesk-ui] +command=/bin/bash /supabase/chatdesk-ui/wrapper.sh user=root autorestart=true -stderr_logfile=/var/log/chatai-ui.err.log -stdout_logfile=/var/log/chatai-ui.out.log +stderr_logfile=/var/log/chatdesk-ui.err.log +stdout_logfile=/var/log/chatdesk-ui.out.log