@wu529778790/open-im 1.11.2-beta.25 → 1.11.2-beta.27
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.
package/dist/index.js
CHANGED
|
@@ -159,29 +159,27 @@ function getEnabledPlugins() {
|
|
|
159
159
|
/**
|
|
160
160
|
* 统一通知格式模板
|
|
161
161
|
* 所有发送给 IM 的通知都使用这个格式,保持一致性
|
|
162
|
-
* 注意:ClawBot/微信不支持 \n
|
|
162
|
+
* 注意:ClawBot/微信不支持 \n,使用 | 分隔,插件列表截断
|
|
163
163
|
*/
|
|
164
164
|
function buildNotification(opts) {
|
|
165
165
|
const parts = [];
|
|
166
166
|
// 标题
|
|
167
167
|
parts.push(`${opts.emoji} ${opts.title}`);
|
|
168
|
-
//
|
|
168
|
+
// 详情(只显示关键信息)
|
|
169
169
|
if (opts.platform)
|
|
170
170
|
parts.push(`📱 ${opts.platform}`);
|
|
171
171
|
if (opts.aiCommand)
|
|
172
172
|
parts.push(`🤖 ${opts.aiCommand}`);
|
|
173
|
-
|
|
174
|
-
parts.push(`📁 ${opts.dir}`);
|
|
173
|
+
// 插件:最多显示 3 个,超过则截断
|
|
175
174
|
const plugins = getEnabledPlugins();
|
|
176
|
-
if (plugins.length > 0)
|
|
177
|
-
|
|
175
|
+
if (plugins.length > 0) {
|
|
176
|
+
const display = plugins.length <= 3
|
|
177
|
+
? plugins.join(", ")
|
|
178
|
+
: `${plugins.slice(0, 3).join(", ")} 等${plugins.length}个`;
|
|
179
|
+
parts.push(`🧩 ${display}`);
|
|
180
|
+
}
|
|
178
181
|
if (opts.uptime)
|
|
179
182
|
parts.push(`⏱️ ${opts.uptime}`);
|
|
180
|
-
// 额外信息
|
|
181
|
-
if (opts.extra?.length) {
|
|
182
|
-
parts.push(...opts.extra);
|
|
183
|
-
}
|
|
184
|
-
// 使用 | 分隔(ClawBot/微信不支持 \n)
|
|
185
183
|
return parts.join(" | ");
|
|
186
184
|
}
|
|
187
185
|
function buildStartupMessage(platform, appVersion, aiCommand, defaultWorkDir, sessionManager) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wu529778790/open-im",
|
|
3
|
-
"version": "1.11.2-beta.
|
|
3
|
+
"version": "1.11.2-beta.27",
|
|
4
4
|
"description": "Your AI coding assistant, in every chat app. Multi-platform IM bridge for Claude Code, Codex, and CodeBuddy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|