@delt/claude-alarm 0.6.4 → 0.6.5
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/dist/cli.js +7 -3
- package/dist/cli.js.map +1 -1
- package/dist/hub/server.js +7 -3
- package/dist/hub/server.js.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -552,13 +552,17 @@ ${sessionList}`);
|
|
|
552
552
|
if (cmdMatch) preview = `$ ${cmdMatch[1]}`;
|
|
553
553
|
else if (contentMatch) preview = contentMatch[1].slice(0, 500);
|
|
554
554
|
}
|
|
555
|
-
const truncNote = truncated ? "\n<i>...truncated</i>" : "";
|
|
555
|
+
const truncNote = truncated ? "\n\n<i>...truncated</i>" : "";
|
|
556
|
+
const previewSlice = preview.slice(0, 800);
|
|
557
|
+
const isShort = !previewSlice.includes("\n") && previewSlice.length < 100;
|
|
558
|
+
const previewHtml = isShort ? `<code>${this.escHtml(previewSlice)}</code>` : this.escHtml(previewSlice);
|
|
556
559
|
const text = `\u26A0\uFE0F <b>Permission Request</b>
|
|
557
560
|
|
|
558
561
|
\u{1F4C2} <b>${this.escHtml(sessionLabel)}</b>
|
|
559
|
-
\u{1F527} <code>${this.escHtml(toolName)}</code>
|
|
562
|
+
\u{1F527} <code>${this.escHtml(toolName)}</code>
|
|
563
|
+
${this.escHtml(description)}
|
|
560
564
|
|
|
561
|
-
|
|
565
|
+
${previewHtml}${truncNote}`;
|
|
562
566
|
const replyMarkup = {
|
|
563
567
|
inline_keyboard: [[
|
|
564
568
|
{ text: "\u2705 Allow", callback_data: `perm:allow:${sessionId2}:${requestId}` },
|