mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 13:47:15 +08:00
refactor(wechat_kf): rename channel from wechatcom_kf and split corp_id
Rename the WeCom customer-service channel and give it its own corp_id
field so users no longer have to share `wechatcom_corp_id` with the
self-built WeCom app channel.
Renames (channel-side):
- channel type / const: wechatcom_kf -> wechat_kf
- package dir: channel/wechatcom_kf/ -> channel/wechat_kf/
- python files / classes: WechatComKf* -> WechatKf*
- config keys: wechatcom_kf_{secret,token,aes_key,port} ->
wechat_kf_{secret,token,aes_key,port}; new wechat_kf_corp_id
- env vars: WECHATCOM_KF_* -> WECHAT_KF_*; new WECHAT_KF_CORP_ID
- log prefix / cursor file: [wechatcom_kf] -> [wechat_kf]
- web console CHANNEL_DEFS key + startup log line
Renames (docs):
- docs/channels/wecom-kf.mdx -> docs/channels/wechat-kf.mdx (zh/en/ja)
- update docs.json sidebar entries and all field names inside the docs
In addition, the Web Console "微信客服" entry now exposes its own
Corp ID field instead of reusing the wechatcom_app one, and includes
the screenshot of the visual config in the channel guide.
Web Console onboarding section is added (Tabs: Web Console / config
file) and the local URL `http://127.0.0.1:9899/` parenthetical is
dropped for consistency with other channel docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -713,7 +713,7 @@ class WebChannel(ChatChannel):
|
||||
logger.info("[WebChannel] 5. dingtalk - 钉钉")
|
||||
logger.info("[WebChannel] 6. wecom_bot - 企微智能机器人")
|
||||
logger.info("[WebChannel] 7. wechatcom_app - 企微自建应用")
|
||||
logger.info("[WebChannel] 8. wechatcom_kf - 微信客服")
|
||||
logger.info("[WebChannel] 8. wechat_kf - 微信客服")
|
||||
logger.info("[WebChannel] 9. wechatmp - 个人公众号")
|
||||
logger.info("[WebChannel] 10. wechatmp_service - 企业公众号")
|
||||
logger.info("[WebChannel] ✅ Web控制台已运行")
|
||||
@@ -1272,17 +1272,16 @@ class ChannelsHandler:
|
||||
{"key": "wechatcomapp_port", "label": "Port", "type": "number", "default": 9898},
|
||||
],
|
||||
}),
|
||||
("wechatcom_kf", {
|
||||
("wechat_kf", {
|
||||
"label": {"zh": "微信客服", "en": "WeCom Customer Service"},
|
||||
"icon": "fa-headset",
|
||||
"color": "emerald",
|
||||
"fields": [
|
||||
# wechatcom_corp_id is shared with wechatcom_app — same key, same value.
|
||||
{"key": "wechatcom_corp_id", "label": "Corp ID", "type": "text"},
|
||||
{"key": "wechatcom_kf_secret", "label": "Secret", "type": "secret"},
|
||||
{"key": "wechatcom_kf_token", "label": "Token", "type": "secret"},
|
||||
{"key": "wechatcom_kf_aes_key", "label": "AES Key", "type": "secret"},
|
||||
{"key": "wechatcom_kf_port", "label": "Port", "type": "number", "default": 9888},
|
||||
{"key": "wechat_kf_corp_id", "label": "Corp ID", "type": "text"},
|
||||
{"key": "wechat_kf_secret", "label": "Secret", "type": "secret"},
|
||||
{"key": "wechat_kf_token", "label": "Token", "type": "secret"},
|
||||
{"key": "wechat_kf_aes_key", "label": "AES Key", "type": "secret"},
|
||||
{"key": "wechat_kf_port", "label": "Port", "type": "number", "default": 9888},
|
||||
],
|
||||
}),
|
||||
("wechatmp", {
|
||||
|
||||
Reference in New Issue
Block a user