@wu529778790/open-im 1.8.3-beta.5 → 1.8.3-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/setup.js +22 -2
  2. package/package.json +1 -1
package/dist/setup.js CHANGED
@@ -308,7 +308,7 @@ export async function runInteractiveSetup() {
308
308
  value: "dingtalk",
309
309
  },
310
310
  {
311
- title: "微信 (WeChat) - 扫码登录获取 token(QClaw/AGP 协议,测试中)" +
311
+ title: "微信 (WeChat)" +
312
312
  (hasWc ? " ✓已配置" : ""),
313
313
  value: "wechat",
314
314
  },
@@ -435,7 +435,7 @@ export async function runInteractiveSetup() {
435
435
  value: "workbuddy",
436
436
  },
437
437
  {
438
- title: "扫码登录 - 用微信扫描二维码获取 token(QClaw/AGP 协议)",
438
+ title: "扫码登录 - 用微信扫描二维码获取 token",
439
439
  value: "qr",
440
440
  },
441
441
  {
@@ -473,6 +473,26 @@ export async function runInteractiveSetup() {
473
473
  workbuddyRefreshToken: tokenResult.refreshToken,
474
474
  userId,
475
475
  };
476
+ // Step 3: WeChat KF binding
477
+ console.log("\n正在获取微信客服绑定链接...");
478
+ const sessionId = oauth.buildSessionId();
479
+ const linkResult = await oauth.getWeChatKfLink(sessionId);
480
+ if (linkResult.success && linkResult.url) {
481
+ console.log("\n━━━ 微信客服绑定 ━━━");
482
+ console.log("请复制以下链接,在微信中发给「文件传输助手」并点击打开:");
483
+ console.log(linkResult.url);
484
+ console.log("\n等待绑定完成(最长 5 分钟)...\n");
485
+ const bindResult = await oauth.pollBindStatus(sessionId);
486
+ if (bindResult.bound) {
487
+ console.log(`✅ 微信客服绑定成功!${bindResult.nickname ? ` 用户: ${bindResult.nickname}` : ""}`);
488
+ }
489
+ else {
490
+ console.log("⚠️ 绑定超时,你可以稍后重新运行 open-im init 完成绑定");
491
+ }
492
+ }
493
+ else {
494
+ console.log("⚠️ 获取微信客服链接失败,你可以稍后重新运行 open-im init 完成绑定");
495
+ }
476
496
  console.log("\n✅ WorkBuddy 登录成功,配置已保存");
477
497
  }
478
498
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.8.3-beta.5",
3
+ "version": "1.8.3-beta.6",
4
4
  "description": "Multi-platform IM bridge for AI CLI tools (Claude, Codex, CodeBuddy)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",