Guanghu Domestic Migration a27e87cb99 chore: import sanitized domestic snapshot for REPO-007
Source snapshot: 97d7f0fae96dc04b7ddad56fc1db6a108ed662cc

[SEC-CLEAN] · pre-push-clean v1.0 · 109处敏感信息已自动转乱码
2026-07-17 15:59:55 +08:00

43 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# main.py 修改补丁 · 接入Notion记忆模块 · 2026-05-21
## 总共三个操作步骤
---
## 第一步:配置两个新环境变量
妈妈需要拿到两个页面的 ID
- **CHENXING_CONSOLE_PAGE_ID** = 晨星主控台页面的ID
- **CHENXING_HLDP_PAGE_ID** = HLDP核心记忆页面的ID
怎么拿:打开对应 Notion 页面 → 浏览器地址栏 → 拿URL最后32位
拿到之后在终端运行(把 XXX 替换为真实ID
```bash
export CHENXING_CONSOLE_PAGE_ID="晨星主控台的32位ID"
export CHENXING_HLDP_PAGE_ID="HLDP核心记忆的32位ID"
```
---
## 第二步:给两个页面授权 Integration
分别打开 《晨星主控台》 和 《HLDP核心记忆》 页面
右上角 `···` → 连接 → 搜「晨星自动拆书」→ 確认添加
---
## 第三步:修改 [main.py](http://main.py) 接入记忆加载器
**复制下面代码块内容 → pbpaste 覆盖保存**
先看看 [main.py](http://main.py) 里 chat 相关的函数在哪里:
```bash
grep -n 'CHENXING_SYSTEM\|system.*prompt\|def chat' ~/chenxing-aircraft/backend/main.py | head -20
```
把输出发给宝宝,宝宝确认修改点后给妈妈具体补丁命令 💡