@wu529778790/open-im 1.11.2-beta.26 → 1.11.2-beta.28
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 +17 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -159,30 +159,32 @@ function getEnabledPlugins() {
|
|
|
159
159
|
/**
|
|
160
160
|
* 统一通知格式模板
|
|
161
161
|
* 所有发送给 IM 的通知都使用这个格式,保持一致性
|
|
162
|
-
*
|
|
162
|
+
* 使用 \n\n 分隔各部分,ClawBot/微信支持双换行
|
|
163
163
|
*/
|
|
164
164
|
function buildNotification(opts) {
|
|
165
|
-
const
|
|
165
|
+
const lines = [];
|
|
166
166
|
// 标题
|
|
167
|
-
|
|
167
|
+
lines.push(`${opts.emoji} ${opts.title}`);
|
|
168
168
|
// 详情
|
|
169
|
+
const details = [];
|
|
169
170
|
if (opts.platform)
|
|
170
|
-
|
|
171
|
+
details.push(`📱 平台: ${opts.platform}`);
|
|
171
172
|
if (opts.aiCommand)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
parts.push(`📁 ${opts.dir}`);
|
|
173
|
+
details.push(`🤖 AI: ${opts.aiCommand}`);
|
|
174
|
+
// 插件:最多显示 3 个,超过则截断
|
|
175
175
|
const plugins = getEnabledPlugins();
|
|
176
|
-
if (plugins.length > 0)
|
|
177
|
-
|
|
176
|
+
if (plugins.length > 0) {
|
|
177
|
+
const display = plugins.length <= 3
|
|
178
|
+
? plugins.join(", ")
|
|
179
|
+
: `${plugins.slice(0, 3).join(", ")} 等${plugins.length}个`;
|
|
180
|
+
details.push(`🧩 插件: ${display}`);
|
|
181
|
+
}
|
|
178
182
|
if (opts.uptime)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
parts.push(...opts.extra);
|
|
183
|
+
details.push(`⏱️ 运行: ${opts.uptime}`);
|
|
184
|
+
if (details.length > 0) {
|
|
185
|
+
lines.push("", ...details);
|
|
183
186
|
}
|
|
184
|
-
|
|
185
|
-
return parts.join(" | ");
|
|
187
|
+
return lines.join("\n");
|
|
186
188
|
}
|
|
187
189
|
function buildStartupMessage(platform, appVersion, aiCommand, defaultWorkDir, sessionManager) {
|
|
188
190
|
let sessionDir;
|
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.28",
|
|
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",
|