@delt/claude-alarm 0.6.4 → 0.6.6

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 CHANGED
@@ -552,13 +552,14 @@ ${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>" : "";
556
- const text = `\u26A0\uFE0F <b>Permission Request</b>
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);
559
+ const text = `\u26A0\uFE0F <b>Permission Request</b> \u2014 ${this.escHtml(sessionLabel)}
557
560
 
558
- \u{1F4C2} <b>${this.escHtml(sessionLabel)}</b>
559
- \u{1F527} <code>${this.escHtml(toolName)}</code> \u2014 ${this.escHtml(description)}
560
-
561
- <pre>${this.escHtml(preview.slice(0, 800))}</pre>${truncNote}`;
561
+ \u{1F527} <code>${this.escHtml(toolName)}</code>
562
+ ${previewHtml}${truncNote}`;
562
563
  const replyMarkup = {
563
564
  inline_keyboard: [[
564
565
  { text: "\u2705 Allow", callback_data: `perm:allow:${sessionId2}:${requestId}` },