foliko 1.1.21 → 1.1.23
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/.agent/mcp_config.json +1 -0
- package/.agent/sessions/cli_default.json +72 -2212
- package/.claude/settings.local.json +13 -1
- package/cli/src/commands/chat.js +1 -1
- package/cli/src/ui/chat-ui.js +15 -9
- package/examples/test-chat.js +7 -1
- package/package.json +2 -1
- package/plugins/telegram-plugin.js +8 -0
- package/plugins/weixin-plugin.js +1 -3
- package/poster_sanhuali.svg +1 -0
- package/src/core/agent-chat.js +17 -37
- package/src/core/context-compressor.js +52 -36
- package/src/core/framework.js +4 -0
- package/src/core/subagent.js +34 -9
- package/src/utils/chat-queue.js +12 -30
- package/src/utils/logger.js +6 -3
- package/undefined.svg +1 -8
- package/.agent/data/web/web-config.json +0 -30
- package/nul +0 -3
- package/weixin-bot-poster-v2.png +0 -0
- package/weixin-bot-poster.png +0 -0
package/src/utils/logger.js
CHANGED
|
@@ -33,8 +33,9 @@ class Logger {
|
|
|
33
33
|
info: '\x1b[32m', // 绿色
|
|
34
34
|
warn: '\x1b[33m', // 黄色
|
|
35
35
|
error: '\x1b[31m', // 红色
|
|
36
|
+
grey: '\x1b[90m', // 暗灰色
|
|
36
37
|
reset: '\x1b[0m',
|
|
37
|
-
dim: '\x1b[2m', //
|
|
38
|
+
dim: '\x1b[2m', // 暗灰色
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -72,6 +73,7 @@ class Logger {
|
|
|
72
73
|
const color = this.colors[levelName.toLowerCase()] || '';
|
|
73
74
|
const reset = this.colors.reset;
|
|
74
75
|
const dim = this.colors.dim;
|
|
76
|
+
const grey = this.colors.grey;
|
|
75
77
|
|
|
76
78
|
const parts = [];
|
|
77
79
|
|
|
@@ -91,7 +93,8 @@ class Logger {
|
|
|
91
93
|
parts.push(levelName.padEnd(5));
|
|
92
94
|
}
|
|
93
95
|
|
|
94
|
-
//
|
|
96
|
+
// 消息(根据级别着色)
|
|
97
|
+
const msgColor = this.enableColors ? color : '';
|
|
95
98
|
const message = args
|
|
96
99
|
.map((arg) => {
|
|
97
100
|
if (arg instanceof Error) {
|
|
@@ -108,7 +111,7 @@ class Logger {
|
|
|
108
111
|
})
|
|
109
112
|
.join(' ');
|
|
110
113
|
|
|
111
|
-
parts.push(message);
|
|
114
|
+
parts.push(`${grey}${message}${reset}`);
|
|
112
115
|
return parts.join(' ');
|
|
113
116
|
}
|
|
114
117
|
|
package/undefined.svg
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="
|
|
2
|
-
|
|
3
|
-
const bot = new WeixinBot({
|
|
4
|
-
onQRCode: (qr) => console.log(qr),
|
|
5
|
-
onMessage: (msg) => bot.sendText(msg.from, 'Hello!')
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
bot.start();</text><path d="M100,850h600" fill="none" stroke="#ffffff" stroke-width="2"></path><path d="M106,920c-3.31371,0 -6,-2.68629 -6,-6v-38c0,-3.31371 2.68629,-6 6,-6h588c3.31371,0 6,2.68629 6,6v38c0,3.31371 -2.68629,6 -6,6z" fill="#2d2d2d" stroke="none" stroke-width="1"></path><text x="400" y="885" fill="#50fa7b" stroke="none" stroke-width="1" font-family="Consolas, Microsoft YaHei, seguiemj, sans-serif" font-weight="normal" font-size="18" text-anchor="middle">$ npm install @chnak/weixin-bot</text><text x="400" y="950" fill="#6b6459" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="14" text-anchor="middle">v1.2.9 · MIT License · Node.js >= 14.0.0</text><text x="400" y="980" fill="#b85450" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="14" text-anchor="middle">npmjs.com/package/@chnak/weixin-bot</text><text x="400" y="1020" fill="#6b6459" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="14" text-anchor="middle">━━━━━━━━━━━━━━━ ◆ ━━━━━━━━━━━━━━━</text><text x="400" y="1045" fill="#6b6459" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="12" text-anchor="middle">❖ ❖</text></g></svg>
|
|
1
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1080" height="1920" viewBox="0,0,1080,1920"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="none" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,1920v-1920h1080v1920z" fill="#f5f5f0" stroke="none" stroke-width="1"></path><text x="540" y="120" fill="#ffffff" stroke="#c41e3a" stroke-width="2" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="48" text-anchor="middle">广东信宜特产</text><text x="540" y="200" fill="#2c1810" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="72" text-anchor="middle">钱排银妃三华李</text><text x="540" y="300" fill="#8b4513" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="36" text-anchor="middle">果中爱马仕 | 酸甜脆爽</text><path d="M90,900v-450h900v450z" fill="none" stroke="none" stroke-width="1"></path><text x="540" y="480" fill="#c41e3a" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="32" text-anchor="middle">核心卖点</text><text x="155" y="582" fill="#007bff" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="32" text-anchor="start">location</text><text x="155" y="607" fill="#ffffff" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="20" text-anchor="start">产地直发</text><text x="155" y="626" fill="#aaaaaa" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="14" text-anchor="start">广东信宜钱排镇</text><text x="155" y="732" fill="#007bff" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="32" text-anchor="start">leaf</text><text x="155" y="757" fill="#ffffff" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="20" text-anchor="start">新鲜采摘</text><text x="155" y="776" fill="#aaaaaa" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="14" text-anchor="start">当季现摘 冷链配送</text><text x="555" y="582" fill="#007bff" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="32" text-anchor="start">star</text><text x="555" y="607" fill="#ffffff" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="20" text-anchor="start">精选大果</text><text x="555" y="626" fill="#aaaaaa" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="14" text-anchor="start">单果30g以上</text><text x="555" y="732" fill="#007bff" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="32" text-anchor="start">heart</text><text x="555" y="757" fill="#ffffff" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="20" text-anchor="start">酸甜脆爽</text><text x="555" y="776" fill="#aaaaaa" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="14" text-anchor="start">自然成熟 口感极佳</text><path d="M302,1070c-6.62742,0 -12,-5.37258 -12,-12v-96c0,-6.62742 5.37258,-12 12,-12h176c6.62742,0 12,5.37258 12,12v96c0,6.62742 -5.37258,12 -12,12z" fill="#ffffff" stroke="#e5e7eb" stroke-width="1"></path><text x="306" y="1001.8" fill="#64748b" stroke="none" stroke-width="1" font-family="Microsoft YaHei, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="14" text-anchor="start">Total Users</text><text x="306" y="1032.24" fill="#1e293b" stroke="none" stroke-width="1" font-family="Microsoft YaHei, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="27.6" text-anchor="start">19.8</text><text x="540" y="1850" fill="#666666" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="28" text-anchor="middle">长按识别 立即购买</text><text x="472" y="474.8" fill="#000000" stroke="none" stroke-width="1" font-family="Microsoft YaHei, msyh, PatuaOne-Regular, seguiemj, seguisym, SegUIVar, wryh, Segoe UI Emoji, sans-serif" font-weight="normal" font-size="38.4" text-anchor="middle">🍑</text><text x="540" y="1880" fill="#999999" stroke="none" stroke-width="1" font-family="Microsoft YaHei, SimHei, KaiTi, seguiemj, sans-serif" font-weight="normal" font-size="20" text-anchor="middle">正宗钱排三华李 假一赔十</text></g></svg>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"routes": [],
|
|
3
|
-
"webhooks": [],
|
|
4
|
-
"statics": [
|
|
5
|
-
{
|
|
6
|
-
"urlPath": "/news/",
|
|
7
|
-
"folder": "D:\\code\\vb-agent",
|
|
8
|
-
"options": {
|
|
9
|
-
"dotfiles": "ignore",
|
|
10
|
-
"index": "index.html"
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"urlPath": "/news/",
|
|
15
|
-
"folder": "D:\\code\\vb-agent",
|
|
16
|
-
"options": {
|
|
17
|
-
"dotfiles": "ignore",
|
|
18
|
-
"index": "index.html"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"urlPath": "/news/",
|
|
23
|
-
"folder": "D:\\code\\vb-agent",
|
|
24
|
-
"options": {
|
|
25
|
-
"dotfiles": "ignore",
|
|
26
|
-
"index": "index.html"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
}
|
package/nul
DELETED
package/weixin-bot-poster-v2.png
DELETED
|
Binary file
|
package/weixin-bot-poster.png
DELETED
|
Binary file
|