claude-telegram-bot 0.3.6 → 0.3.7
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/bot.mjs +4 -6
- package/package.json +1 -1
package/bot.mjs
CHANGED
|
@@ -518,12 +518,10 @@ function runClaude(prompt, sessionId, opts = {}) {
|
|
|
518
518
|
currentChild = null;
|
|
519
519
|
try {
|
|
520
520
|
const j = JSON.parse(out);
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
cost: j.total_cost_usd,
|
|
526
|
-
});
|
|
521
|
+
const text = j.is_error
|
|
522
|
+
? classifyClaudeError(j.result ?? "", code)
|
|
523
|
+
: (j.result ?? "(empty response)");
|
|
524
|
+
resolve({ ok: !j.is_error, text, sessionId: j.session_id, cost: j.total_cost_usd });
|
|
527
525
|
} catch {
|
|
528
526
|
const raw = (err || out || "no output").slice(0, 3500);
|
|
529
527
|
resolve({ ok: false, text: classifyClaudeError(raw, code) });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-telegram-bot",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Drive Claude Code from Telegram — messages run headless `claude -p` in a project dir and replies come back to the chat. Zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|