foliko 1.1.25 → 1.1.26
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.
|
@@ -1496,6 +1496,55 @@
|
|
|
1496
1496
|
"text": "<think>已停止思考,现在给用户一个总结。</think>\n\n\n\n✅ **已停止持续思考和讨论模式**\n\n---\n\n### 📋 讨论总结\n\n针对 **website_v2** 的主要发现:\n\n| 状态 | 问题 | 建议 |\n|------|------|------|\n| ⚠️ | 版本号 v2.0 与实际 1.1.23 不符 | 修复 |\n| ⚠️ | 安装脚本域名不可用 | 改用 npm |\n| ❌ | 缺失多个插件展示 | 补充 |\n| ❌ | Examples 示例未展示 | 添加 |\n\n---\n\n### 🚀 快速行动项\n\n如果现在想做点什么,我建议:\n\n| 任务 | 预计时间 |\n|------|----------|\n| 1. 修复版本号和安装命令 | 5分钟 |\n| 2. 添加缺失插件展示 | 15分钟 |\n| 3. 添加代码示例到快速开始 | 20分钟 |\n| 4. 移动端菜单修复 | 15分钟 |\n\n---\n\n**随时说 \"继续讨论\" 或 \"开启思考\" 来恢复!**"
|
|
1497
1497
|
}
|
|
1498
1498
|
]
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"role": "user",
|
|
1502
|
+
"content": "开启持续思考模式,探讨/website_v2 目录网站根据本项目的完善的讨论,看看还有哪些需要添加的"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
"role": "assistant",
|
|
1506
|
+
"content": [
|
|
1507
|
+
{
|
|
1508
|
+
"type": "text",
|
|
1509
|
+
"text": "<think>用户想恢复持续思考模式,继续探讨 website_v2 网站需要根据 Foliko 真实项目完善的内容。让我启动思考插件。</think>\n\n\n\n\n"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"type": "tool-call",
|
|
1513
|
+
"toolCallId": "call_1bbaa93cabf749ad91f52868",
|
|
1514
|
+
"toolName": "ext_call",
|
|
1515
|
+
"input": {
|
|
1516
|
+
"plugin": "think",
|
|
1517
|
+
"tool": "think_continue",
|
|
1518
|
+
"args": {
|
|
1519
|
+
"interval": 60000,
|
|
1520
|
+
"topic": "website_v2 网站完善 - 基于 Foliko 真实项目补充缺失内容"
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
]
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"role": "tool",
|
|
1528
|
+
"content": [
|
|
1529
|
+
{
|
|
1530
|
+
"type": "tool-result",
|
|
1531
|
+
"toolCallId": "call_1bbaa93cabf749ad91f52868",
|
|
1532
|
+
"toolName": "ext_call",
|
|
1533
|
+
"output": {
|
|
1534
|
+
"type": "text",
|
|
1535
|
+
"value": "{\"success\":true,\"result\":{\"success\":true,\"message\":\"【持续思考已启动】\\n间隔: 60000ms\\n主题: website_v2 网站完善 - 基于 Foliko 真实项目补充缺失内容\\n\\nLLM 将定期自动思考并在有新想法时通知你。\"}}"
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
]
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"role": "assistant",
|
|
1542
|
+
"content": [
|
|
1543
|
+
{
|
|
1544
|
+
"type": "text",
|
|
1545
|
+
"text": "<think>用户想让我进行深度思考,关于 website_v2 网站基于 Foliko 真实项目需要完善的内容。让我结合之前分析的结果,进行综合性的思考和建议。</think>\n\n\n\n---\n\n## 🧠 持续思考已开启\n\n**主题**:website_v2 网站完善 - 基于 Foliko 真实项目补充缺失内容\n\n**间隔**:60 秒\n\n---\n\n### 💡 当前思考焦点\n\n结合之前对 Foliko 真实项目的分析,持续思考将围绕以下问题展开:\n\n| 思考方向 | 关注点 |\n|---------|--------|\n| **内容补全** | 缺失的插件、功能、示例代码 |\n| **信息对齐** | 版本号、安装命令、描述准确性 |\n| **差异化展示** | 真实项目的亮点如何呈现 |\n| **开发者需求** | 文档、API、Examples 如何展示 |\n\n---\n\n### 🔔 通知机制\n\n有新洞察时 **自动推送通知**\n\n---\n\n### 📊 当前分析进度\n\n基于之前分析,已确认以下差距:\n\n```\nWebsite_v2 缺失内容:\n├── 8个插件未展示(gate-trading, web, audit, rules, coordinator 等)\n├── Examples 示例未展示(19个示例文件)\n├── 版本号错误(v2.0 → 1.1.23)\n├── 安装命令不可用(folikoai.com → npm)\n├── Docker 部署说明缺失\n└── 环境变量文档不完整\n```\n\n---\n\n**有新想法我会通知你!** 🔔"
|
|
1546
|
+
}
|
|
1547
|
+
]
|
|
1499
1548
|
}
|
|
1500
1549
|
],
|
|
1501
1550
|
"variables": {},
|
package/package.json
CHANGED
package/plugins/weixin-plugin.js
CHANGED
|
@@ -598,7 +598,7 @@ class WeixinPlugin extends Plugin {
|
|
|
598
598
|
*/
|
|
599
599
|
async _sendMessageBatch(originalMsg, userId, text, useReply = true) {
|
|
600
600
|
const MAX_LEN = 500
|
|
601
|
-
text=removeMarkdown(text)
|
|
601
|
+
text = removeMarkdown(text)
|
|
602
602
|
if (!text || text.length <= MAX_LEN) {
|
|
603
603
|
if (useReply && originalMsg) {
|
|
604
604
|
await this._bot.reply(originalMsg, text)
|
|
@@ -608,22 +608,41 @@ class WeixinPlugin extends Plugin {
|
|
|
608
608
|
return
|
|
609
609
|
}
|
|
610
610
|
|
|
611
|
-
//
|
|
611
|
+
// 按换行符分割成段落,优先按段落分割
|
|
612
|
+
const paragraphs = text.split('\n')
|
|
612
613
|
const chunks = []
|
|
613
|
-
|
|
614
|
-
|
|
614
|
+
let currentChunk = ''
|
|
615
|
+
|
|
616
|
+
for (const paragraph of paragraphs) {
|
|
617
|
+
// 如果单个段落超过 MAX_LEN,按字符分割
|
|
618
|
+
if (paragraph.length > MAX_LEN) {
|
|
619
|
+
if (currentChunk.trim()) {
|
|
620
|
+
chunks.push(currentChunk.trim())
|
|
621
|
+
currentChunk = ''
|
|
622
|
+
}
|
|
623
|
+
for (let i = 0; i < paragraph.length; i += MAX_LEN) {
|
|
624
|
+
chunks.push(paragraph.slice(i, i + MAX_LEN))
|
|
625
|
+
}
|
|
626
|
+
} else if ((currentChunk + '\n' + paragraph).length > MAX_LEN) {
|
|
627
|
+
if (currentChunk.trim()) {
|
|
628
|
+
chunks.push(currentChunk.trim())
|
|
629
|
+
}
|
|
630
|
+
currentChunk = paragraph
|
|
631
|
+
} else {
|
|
632
|
+
currentChunk = currentChunk ? currentChunk + '\n' + paragraph : paragraph
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
if (currentChunk.trim()) {
|
|
636
|
+
chunks.push(currentChunk.trim())
|
|
615
637
|
}
|
|
616
|
-
|
|
617
|
-
// log.info(` Message too long (${text.length}), splitting into ${chunks.length} parts`)
|
|
618
638
|
|
|
619
639
|
for (let i = 0; i < chunks.length; i++) {
|
|
620
|
-
const chunk = `[${i + 1}/${chunks.length}]\n${chunks[i]}`
|
|
640
|
+
const chunk = chunks.length > 1 ? `[${i + 1}/${chunks.length}]\n${chunks[i]}` : chunks[i]
|
|
621
641
|
if (useReply && originalMsg) {
|
|
622
642
|
await this._bot.reply(originalMsg, chunk)
|
|
623
643
|
} else {
|
|
624
644
|
await this._bot.sendText(userId, chunk)
|
|
625
645
|
}
|
|
626
|
-
// 批次间隔,避免发送太快
|
|
627
646
|
if (i < chunks.length - 1) {
|
|
628
647
|
await new Promise(r => setTimeout(r, 1000))
|
|
629
648
|
}
|