halbot 1995.1.55 → 1995.1.56
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 +3 -3
- package/web/ogimage.mjs +1 -1
- package/web/turn.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "halbot",
|
|
3
3
|
"description": "Just another AI powered Telegram bot, which is simple design, easy to use, extendable and fun.",
|
|
4
|
-
"version": "1995.1.
|
|
4
|
+
"version": "1995.1.56",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/halbot",
|
|
7
7
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"jsdom": "^28.1.0",
|
|
42
42
|
"lorem-ipsum": "^2.0.8",
|
|
43
43
|
"mime": "^4.1.0",
|
|
44
|
-
"mysql2": "^3.17.
|
|
44
|
+
"mysql2": "^3.17.4",
|
|
45
45
|
"office-text-extractor": "^4.0.0",
|
|
46
46
|
"openai": "^6.22.0",
|
|
47
47
|
"parse-numeric-range": "^1.3.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"telegraf": "^4.16.3",
|
|
52
52
|
"tellegram": "^1.1.18",
|
|
53
53
|
"tesseract.js": "^7.0.0",
|
|
54
|
-
"webjam": "^1995.3.
|
|
54
|
+
"webjam": "^1995.3.8",
|
|
55
55
|
"youtube-transcript": "^1.2.1"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/web/ogimage.mjs
CHANGED
|
@@ -54,7 +54,7 @@ const process = async (ctx, next) => {
|
|
|
54
54
|
const chatId = result.chat_id || 'Unknown';
|
|
55
55
|
|
|
56
56
|
// Allow CSS to handle text clamping, but give a safe upper limit to prevent memory overloads
|
|
57
|
-
let previewText = userText.replace(/<[^>]+>/g, '').trim();
|
|
57
|
+
let previewText = userText.replace(/<[^>]+>/g, '').replace(/\s+/g, ' ').trim();
|
|
58
58
|
if (previewText.length > 500) {
|
|
59
59
|
previewText = previewText.substring(0, 500) + '...';
|
|
60
60
|
}
|
package/web/turn.mjs
CHANGED
|
@@ -108,7 +108,7 @@ const process = async (ctx, next) => {
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
let previewText = messages.length ? messages[0].text : 'A conversation with HAL9000';
|
|
111
|
-
previewText = previewText.replace(/<[^>]+>/g, '').substring(0, 160).trim() + '...';
|
|
111
|
+
previewText = previewText.replace(/<[^>]+>/g, '').replace(/\s+/g, ' ').substring(0, 160).trim() + '...';
|
|
112
112
|
|
|
113
113
|
const ogImageUrl = `https://${ctx.host}/og-image/${ctx.params.token}`;
|
|
114
114
|
|