@wu529778790/open-im 1.11.2-beta.27 → 1.11.2-beta.29
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 +13 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -159,28 +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
|
-
|
|
168
|
-
//
|
|
167
|
+
lines.push(`${opts.emoji} ${opts.title}`);
|
|
168
|
+
// 详情
|
|
169
|
+
const details = [];
|
|
169
170
|
if (opts.platform)
|
|
170
|
-
|
|
171
|
+
details.push(`📱 平台: ${opts.platform}`);
|
|
171
172
|
if (opts.aiCommand)
|
|
172
|
-
|
|
173
|
+
details.push(`🤖 AI: ${opts.aiCommand}`);
|
|
173
174
|
// 插件:最多显示 3 个,超过则截断
|
|
174
175
|
const plugins = getEnabledPlugins();
|
|
175
176
|
if (plugins.length > 0) {
|
|
176
177
|
const display = plugins.length <= 3
|
|
177
178
|
? plugins.join(", ")
|
|
178
179
|
: `${plugins.slice(0, 3).join(", ")} 等${plugins.length}个`;
|
|
179
|
-
|
|
180
|
+
details.push(`🧩 插件: ${display}`);
|
|
180
181
|
}
|
|
181
182
|
if (opts.uptime)
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
details.push(`⏱️ 运行: ${opts.uptime}`);
|
|
184
|
+
if (details.length > 0) {
|
|
185
|
+
lines.push("", ...details);
|
|
186
|
+
}
|
|
187
|
+
return lines.join("\n\n");
|
|
184
188
|
}
|
|
185
189
|
function buildStartupMessage(platform, appVersion, aiCommand, defaultWorkDir, sessionManager) {
|
|
186
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.29",
|
|
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",
|