@wu529778790/open-im 1.9.0 → 1.9.1-beta.1

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.
@@ -4,7 +4,7 @@ export declare const PAGE_TEXTS: {
4
4
  readonly heroBadge: "open-im local control";
5
5
  readonly heroTitle: "Local bridge control.";
6
6
  readonly heroBody: "";
7
- readonly heroBodyFull: "One local bridge for Telegram, Feishu, QQ, WeWork, and DingTalk.";
7
+ readonly heroBodyFull: "One local bridge for Telegram, Feishu, QQ, WeWork, DingTalk, and WorkBuddy.";
8
8
  readonly heroKicker: "Local AI bridge";
9
9
  readonly langButton: "中文";
10
10
  readonly darkModeToggle: "Toggle dark mode";
@@ -140,7 +140,7 @@ export declare const PAGE_TEXTS: {
140
140
  readonly heroBadge: "open-im";
141
141
  readonly heroTitle: "本地桥接控制台";
142
142
  readonly heroBody: "";
143
- readonly heroBodyFull: "一个本地桥接入口,统一连接 Telegram、Feishu、QQ、WeWork 和 DingTalk。";
143
+ readonly heroBodyFull: "一个本地桥接入口,统一连接 Telegram、Feishu、QQ、WeWork、DingTalkWorkBuddy。";
144
144
  readonly heroKicker: "本地 AI 桥接";
145
145
  readonly langButton: "EN";
146
146
  readonly darkModeToggle: "切换暗黑模式";
@@ -4,7 +4,7 @@ export const PAGE_TEXTS = {
4
4
  heroBadge: "open-im local control",
5
5
  heroTitle: "Local bridge control.",
6
6
  heroBody: "",
7
- heroBodyFull: "One local bridge for Telegram, Feishu, QQ, WeWork, and DingTalk.",
7
+ heroBodyFull: "One local bridge for Telegram, Feishu, QQ, WeWork, DingTalk, and WorkBuddy.",
8
8
  heroKicker: "Local AI bridge",
9
9
  langButton: "\u4e2d\u6587",
10
10
  darkModeToggle: "Toggle dark mode",
@@ -140,7 +140,7 @@ export const PAGE_TEXTS = {
140
140
  heroBadge: "open-im",
141
141
  heroTitle: "\u672c\u5730\u6865\u63a5\u63a7\u5236\u53f0",
142
142
  heroBody: "",
143
- heroBodyFull: "\u4e00\u4e2a\u672c\u5730\u6865\u63a5\u5165\u53e3\uff0c\u7edf\u4e00\u8fde\u63a5 Telegram\u3001Feishu\u3001QQ\u3001WeWork \u548c DingTalk\u3002",
143
+ heroBodyFull: "\u4e00\u4e2a\u672c\u5730\u6865\u63a5\u5165\u53e3\uff0c\u7edf\u4e00\u8fde\u63a5 Telegram\u3001Feishu\u3001QQ\u3001WeWork\u3001DingTalk \u548c WorkBuddy\u3002",
144
144
  heroKicker: "\u672c\u5730 AI \u6865\u63a5",
145
145
  langButton: "EN",
146
146
  darkModeToggle: "\u5207\u6362\u6697\u9ed1\u6a21\u5f0f",
@@ -169,7 +169,7 @@ export const PAGE_SCRIPT = String.raw ` const platformDefinitions = [
169
169
  ],
170
170
  platformLabels: {
171
171
  enabled: { suffix: "-label", key: "enabled" },
172
- description: { suffix: "-description", keys: { telegram: "telegramSummary", feishu: "feishuSummary", qq: "qqSummary", wework: "weworkSummary", dingtalk: "dingtalkSummary" } },
172
+ description: { suffix: "-description", keys: { telegram: "telegramSummary", feishu: "feishuSummary", qq: "qqSummary", wework: "weworkSummary", dingtalk: "dingtalkSummary", workbuddy: "workbuddySummary" } },
173
173
  fieldLabel: {
174
174
  "telegram-botToken": { key: "botToken" },
175
175
  "telegram-proxy": { key: "proxy" },
@@ -193,6 +193,12 @@ export const PAGE_SCRIPT = String.raw ` const platformDefinitions = [
193
193
  "dingtalk-cardTemplateId": { key: "cardTemplateId" },
194
194
  "dingtalk-aiCommand": { key: "platformAiTool" },
195
195
  "dingtalk-allowedUserIds": { key: "allowedUserIds" },
196
+ "workbuddy-accessToken": { key: "workbuddyAccessToken" },
197
+ "workbuddy-refreshToken": { key: "workbuddyRefreshToken" },
198
+ "workbuddy-userId": { key: "workbuddyUserId" },
199
+ "workbuddy-baseUrl": { key: "workbuddyBaseUrl" },
200
+ "workbuddy-aiCommand": { key: "platformAiTool" },
201
+ "workbuddy-allowedUserIds": { key: "allowedUserIds" },
196
202
  }
197
203
  },
198
204
  platformHelp: [
@@ -201,6 +207,7 @@ export const PAGE_SCRIPT = String.raw ` const platformDefinitions = [
201
207
  { platform: "qq", key: "qqHelp" },
202
208
  { platform: "wework", key: "weworkHelp" },
203
209
  { platform: "dingtalk", key: "dingtalkHelp" },
210
+ { platform: "workbuddy", key: "workbuddyHelp" },
204
211
  ],
205
212
  aiLabels: [
206
213
  { id: "aiCommonTitle", key: "aiCommonTitle" },
@@ -1070,9 +1070,11 @@ export const PAGE_HTML_PREFIX = String.raw `<!doctype html>
1070
1070
  </label>
1071
1071
  </div>
1072
1072
  <div class="platform-body">
1073
+ <p class="form-hint" id="workbuddy-description">CodeBuddy OAuth for WeChat customer service</p>
1073
1074
  <div class="form-group">
1074
1075
  <label class="form-label" id="workbuddy-aiCommand-label">AI Tool</label>
1075
1076
  <select id="workbuddy-aiCommand" class="form-select">
1077
+ <option value="">(default)</option>
1076
1078
  <option value="claude">claude</option>
1077
1079
  <option value="codex">codex</option>
1078
1080
  <option value="codebuddy">codebuddy</option>
@@ -29,6 +29,7 @@ describe("config web page assembly", () => {
29
29
  "qq",
30
30
  "wework",
31
31
  "dingtalk",
32
+ "workbuddy",
32
33
  ]);
33
34
  for (const platform of helpTargets) {
34
35
  expect(PAGE_HTML).toContain(`id="${platform}-help"`);
@@ -20,13 +20,14 @@ export function setupWorkBuddyHandlers(config, sessionManager) {
20
20
  const runningTasks = new Map();
21
21
  const taskKeyByChatId = new Map();
22
22
  const stopTaskCleanup = startTaskCleanup(runningTasks);
23
+ let currentMsgId = '';
23
24
  const commandHandler = new CommandHandler({
24
25
  config,
25
26
  sessionManager,
26
27
  requestQueue,
27
28
  sender: {
28
29
  sendTextReply: async (chatId, text) => {
29
- // We'll handle this in the AI request
30
+ await sendTextReply(null, chatId, text, currentMsgId);
30
31
  },
31
32
  },
32
33
  getRunningTasksSize: () => runningTasks.size,
@@ -71,6 +72,7 @@ export function setupWorkBuddyHandlers(config, sessionManager) {
71
72
  });
72
73
  }
73
74
  async function handleEvent(chatId, msgId, content) {
75
+ currentMsgId = msgId;
74
76
  log.info(`[handleEvent] chatId=${chatId}, msgId=${msgId}, content="${content.substring(0, 100)}"`);
75
77
  // Use chatId as userId for WorkBuddy (WeChat KF doesn't have separate userId)
76
78
  const userId = chatId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.9.0",
3
+ "version": "1.9.1-beta.1",
4
4
  "description": "Multi-platform IM bridge for AI CLI tools (Claude, Codex, CodeBuddy)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",