foliko 1.0.59 → 1.0.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foliko",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "description": "简约的插件化 Agent 框架",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -40,6 +40,7 @@
40
40
  "node-telegram-bot-api": "^0.67.0",
41
41
  "nodemailer": "^6.10.0",
42
42
  "qrcode-terminal": "^0.12.0",
43
+ "remove-markdown": "^0.6.3",
43
44
  "tiktoken": "^1.0.22",
44
45
  "zod": "^3.24.0"
45
46
  }
@@ -10,6 +10,7 @@
10
10
 
11
11
  const { Plugin } = require('../src/core/plugin-base')
12
12
  const {cleanResponse} =require('../src/utils')
13
+ const removeMarkdown = require('remove-markdown');
13
14
  class FeishuPlugin extends Plugin {
14
15
  constructor(config = {}) {
15
16
  super()
@@ -323,6 +324,7 @@ class FeishuPlugin extends Plugin {
323
324
 
324
325
  async _sendMessage(openId, text, originalMsg) {
325
326
  if (!this._client) return
327
+ text=removeMarkdown(text)
326
328
  try {
327
329
  const chatId = originalMsg?.chat_id || originalMsg?.message?.chat_id
328
330
  if (!chatId) return
@@ -9,6 +9,7 @@
9
9
 
10
10
  const { Plugin } = require('../src/core/plugin-base')
11
11
  const {cleanResponse} =require('../src/utils')
12
+ const removeMarkdown = require('remove-markdown');
12
13
  const { z } = require('zod')
13
14
  const { WeixinBot } = require('@chnak/weixin-bot')
14
15
 
@@ -24,9 +25,6 @@ class WeixinPlugin extends Plugin {
24
25
  this.path=`.agent/data`
25
26
  this.systemPrompt=`你是一个微信助手。
26
27
 
27
- **重要:**
28
- -回复内容使用纯文本,不要使用markdown
29
-
30
28
  **命令执行规范:**
31
29
  - 执行 npx skills add / npx skills remove / npx skills list 命令时,必须自动添加参数:-a openclaw -y
32
30
  - 禁止添加 -g 参数
@@ -290,6 +288,7 @@ class WeixinPlugin extends Plugin {
290
288
  */
291
289
  async _sendMessageBatch(originalMsg, userId, text, useReply = true) {
292
290
  const MAX_LEN = 500
291
+ text=removeMarkdown(text)
293
292
  if (!text || text.length <= MAX_LEN) {
294
293
  if (useReply && originalMsg) {
295
294
  await this._bot.reply(originalMsg, text)