From afee0dfa4d776f7d0bafeb4d391566f5d873b091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Tue, 29 Sep 2026 18:57:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AFHESUPIPE=E5=93=81?= =?UTF-8?q?=E7=89=8C=E5=8C=96+=E7=AE=A1=E9=81=93=E6=96=87=E6=A1=88+GDPR?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 品牌色橙#f08a31→HESUPIPE蓝#066fc0(取自官网主题CSS a:hover/导航主色),7槽位色板三处同步:theme.js/widget.js内联副本/style.css :root - chat.html/widget.js/js/chat.js:标题HESUPIPE Support、管道场景描述、欢迎语、热门话题Get Quotation/Pipe Specifications/Delivery & Shipping、WhatsApp+8615937108317、邮箱hesu@hesuu.com - 邀请卡文案管道化(pipe specs, MOQ, delivery timing)+GDPR小字;聊天面板footer GDPR行(复用.chat-footer) - admin.html VOLT→HESUPIPE;头像PIL重绘为品牌蓝底白H(512/128px) - widget-test.html色值同步+断言基准更新(浏览器断言9/9 Δ=0);.gitignore排除.playwright-mcp/ Co-Authored-By: Claude Code --- .gitignore | 1 + .../2026-09-29-building-materials-ai-kefu.md | 20 ++++----- static/admin.html | 10 ++--- static/chat.html | 16 ++++---- static/css/style.css | 19 +++++---- static/js/chat.js | 4 +- static/js/theme.js | 16 ++++---- static/kefu-small.png | Bin 30204 -> 904 bytes static/kefu.png | Bin 682482 -> 4097 bytes static/widget-test.html | 24 +++++------ static/widget.js | 38 ++++++++++-------- 11 files changed, 81 insertions(+), 67 deletions(-) diff --git a/.gitignore b/.gitignore index d348235..c8d5c92 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ __pycache__/ data/ .superpowers/ *.db +.playwright-mcp/ diff --git a/docs/superpowers/plans/2026-09-29-building-materials-ai-kefu.md b/docs/superpowers/plans/2026-09-29-building-materials-ai-kefu.md index 4732fd3..ff96b13 100644 --- a/docs/superpowers/plans/2026-09-29-building-materials-ai-kefu.md +++ b/docs/superpowers/plans/2026-09-29-building-materials-ai-kefu.md @@ -392,7 +392,7 @@ python -m pytest -q && git add -A && git commit -m "feat: 会话编排建材化+ **Files:** - Modify: `app/main.py`、`app/services/email_service.py`、`app/api/routes/chat_rest.py`、`app/services/rate_limit.py`、`app/config.py`(如有 DB 默认名) -- [ ] **Step 1: 逐文件更名** +- [x] **Step 1: 逐文件更名** | 文件 | 改动 | |---|---| @@ -402,14 +402,14 @@ python -m pytest -q && git add -A && git commit -m "feat: 会话编排建材化+ | `app/services/rate_limit.py` | docstring "Mirrors hesu's" 更新 | | `app/config.py` + `.env.example` | DATABASE_URL 默认 `data/hesupipe_ai_kefu.db` | -- [ ] **Step 2: 全局残留扫描** +- [x] **Step 2: 全局残留扫描** ```bash grep -rin "汽车\|vehicle\|byd\|toyota\|hesu auto\|borderlesscar\|VOLT\|XYH\|cc-ai-kefu\|cc_ai_kefu\|car\b\|cars\|什么车\|车型\|车价" app/ tests/ scripts/ --include="*.py" | grep -v "docs/" ``` 预期:无输出(docstring/注释里的行业残留一并清零;`car\b|cars|什么车|车型` 抓 boundary_filter 话术池等用户可见输出)。 -- [ ] **Step 3: 全量测试 + Commit** +- [x] **Step 3: 全量测试 + Commit** ```bash python -m pytest -q && git add -A && git commit -m "chore: 服务端品牌与行业残留更名清零" @@ -422,7 +422,7 @@ python -m pytest -q && git add -A && git commit -m "chore: 服务端品牌与行 **Files:** - Modify: `docker-compose.yml`、`deploy.sh`、`openresty.conf`、`.env.example` -- [ ] **Step 1: 更名** +- [x] **Step 1: 更名** | 文件 | 改动 | |---|---| @@ -431,14 +431,14 @@ python -m pytest -q && git add -A && git commit -m "chore: 服务端品牌与行 | `openresty.conf` | upstream `cc_ai_kefu`→`hesupipe_ai_kefu`;127.0.0.1:8016→8017;alias `/www/cc_ai_kefu/`→`/www/hesupipe_ai_kefu/`;日志名同步(含注释掉的 HTTPS 段) | | `.env.example` | `APP_PORT=8017`;`PUSH_EXTERNAL_KEY_PREFIX=ai-kefu-jc`;`PUSH_ENABLED=false`(开发期) | -- [ ] **Step 2: 残留扫描** +- [x] **Step 2: 残留扫描** ```bash grep -rn "cc_ai_kefu\|cc-ai-kefu\|8016" docker-compose.yml deploy.sh openresty.conf .env.example ``` 预期:无输出。 -- [ ] **Step 3: 测试 + Commit** +- [x] **Step 3: 测试 + Commit** ```bash python -m pytest -q && git add -A && git commit -m "chore: 部署配置更名(hs-ai-kefu/8017/hesupipe_ai_kefu)" @@ -452,14 +452,14 @@ python -m pytest -q && git add -A && git commit -m "chore: 部署配置更名(hs - Modify: `static/chat.html`、`static/widget.js`、`static/js/chat.js`、`static/js/theme.js`、`static/admin.html`、`static/widget-test.html` - Test: `tests/test_invite_static.py`、`tests/test_theme_static.py` -- [ ] **Step 1: 了解静态测试的真实性质(避免走错路)** +- [x] **Step 1: 了解静态测试的真实性质(避免走错路)** `tests/test_invite_static.py`/`test_theme_static.py` 是**结构回归网**,不是文案断言—— 它们断言的是邀请卡面板出厂 hide、pointer-events、回流顺序、theme.js 与 widget.js 调色板逐字同步、无残留旧色 hex 等结构性质。所以本任务的测试策略是: **直接改前端文件,然后跑结构回归测试防破坏**(它们会在你漏改某处色值/结构时指路)。 -- [ ] **Step 2: 前端文案与配置** +- [x] **Step 2: 前端文案与配置** | 文件 | 改动 | |---|---| @@ -471,14 +471,14 @@ python -m pytest -q && git add -A && git commit -m "chore: 部署配置更名(hs | `widget.js` | **GDPR 行**:首次对话邀请卡/首条消息附加 "By chatting, you agree to our privacy policy."(链接指向 hesupipe.com 隐私政策页,URL 实施时与需求方确认,可先 `https://hesupipe.com/privacy-policy/` 占位) | | 头像 | `kefu.png`/`kefu-small.png` 替换(需求方提供 logo 或用品牌蓝底 "H" 字母临时生成) | -- [ ] **Step 3: 跑静态断言与全量测试至绿** +- [x] **Step 3: 跑静态断言与全量测试至绿** ```bash python -m pytest tests/test_invite_static.py tests/test_theme_static.py -q python -m pytest -q ``` -- [ ] **Step 4: 残留扫描 + Commit** +- [x] **Step 4: 残留扫描 + Commit** ```bash grep -rin "HESU Support\|hesu auto\|vehicle\|VOLT\|borderlesscar\|1903717\|f08a31" static/ | grep -v blog diff --git a/static/admin.html b/static/admin.html index 555b1b8..d5d3127 100644 --- a/static/admin.html +++ b/static/admin.html @@ -3,7 +3,7 @@ - VOLT - 管理后台 + HESUPIPE - 管理后台 @@ -39,11 +39,11 @@

Expected behavior: