koishi-plugin-stock 2.1.7 → 2.1.8

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/README.md CHANGED
@@ -65,13 +65,16 @@ npm install koishi-plugin-stock
65
65
 
66
66
  ## 更新日志
67
67
 
68
+ ### v2.1.8 (2026-03-02)
69
+ - 🎯 **用户体验优化**:为定时广播消息添加"[定时广播 - 内容]"前缀标识
70
+ - ✅ **消息识别**:用户可以清楚区分定时推送和手动触发的消息
71
+ - 📦 保持所有功能逻辑不变,仅优化消息格式
72
+
68
73
  ### v2.1.7 (2026-03-02)
69
74
  - 🐛 **核心修复**:修复定时广播任务只发送提示消息的问题
70
75
  - ✅ **功能完善**:定时任务现在直接获取并发送真实数据(活跃市值、涨跌停看板)
71
76
  - 🔧 **重试机制**:为定时任务添加HTTP重试机制和错误处理
72
77
  - 📊 **用户体验**:用户无需手动触发,定时任务自动推送完整数据
73
-
74
- ### v2.1.6 (2026-03-02)
75
78
  - ⚡ **性能优化**:超时时间从15秒调整为10秒
76
79
  - 🔁 **重试机制**:添加3次重试机制,使用指数退避策略(2s/4s/8s)
77
80
  - 🔄 **统一处理**:所有API请求使用统一的重试函数
@@ -57,7 +57,7 @@ class BroadcastScheduler {
57
57
  const responseText = await httpRequestWithRetry(ctx, 'https://stock.svip886.com/api/indexes', {
58
58
  responseType: 'text'
59
59
  });
60
- messageContent = `📊 指数看板:\n\n${responseText}`;
60
+ messageContent = `📊指数看板:\n\n${responseText}`;
61
61
  }
62
62
  catch (error) {
63
63
  logger.error('[定时任务] 获取活跃市值数据失败:', error);
@@ -92,6 +92,8 @@ class BroadcastScheduler {
92
92
  messageContent = '获取跌停看板图片失败,请稍后重试。';
93
93
  }
94
94
  }
95
+ // 添加定时广播前缀
96
+ messageContent = `[定时广播 - ${task.content}] ${messageContent}`;
95
97
  // 执行广播任务
96
98
  const targets = task.targetIds.split(',').map(id => id.trim()).filter(id => id);
97
99
  if (task.type === 'private') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-stock",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "A Koishi plugin that fetches stock data and provides market analysis, including active market cap, stock alerts, limit-up board, stock selection features, and heart method card drawing with configurable blacklists for each command.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",