@delt/claude-alarm 0.6.7 → 0.6.9

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
@@ -535,6 +535,8 @@ ${sessionList}`);
535
535
  try {
536
536
  const p = JSON.parse(inputPreview);
537
537
  if (p.command) preview = `$ ${p.command}`;
538
+ else if (p.title && p.message) preview = `${p.title}
539
+ ${p.message}`;
538
540
  else if (p.file_path) {
539
541
  preview = p.file_path;
540
542
  if (p.content) {
@@ -556,9 +558,12 @@ ${sessionList}`);
556
558
  const previewSlice = preview.slice(0, 800);
557
559
  const isShort = !previewSlice.includes("\n") && previewSlice.length < 100;
558
560
  const previewHtml = isShort ? `<code>${this.escHtml(previewSlice)}</code>` : this.escHtml(previewSlice);
561
+ let displayTool = toolName;
562
+ const mcpMatch = toolName.match(/__([^_]+)$/);
563
+ if (mcpMatch) displayTool = mcpMatch[1].charAt(0).toUpperCase() + mcpMatch[1].slice(1);
559
564
  const text = `\u26A0\uFE0F <b>Permission Request</b> \u2014 ${this.escHtml(sessionLabel)}
560
565
 
561
- \u{1F527} <code>${this.escHtml(toolName)}</code>
566
+ \u{1F527} <b>${this.escHtml(displayTool)}</b>
562
567
  ${previewHtml}${truncNote}`;
563
568
  const replyMarkup = {
564
569
  inline_keyboard: [[
@@ -580,7 +585,7 @@ ${previewHtml}${truncNote}`;
580
585
  await this.answerCallbackQuery(query.id, behavior === "allow" ? "\u2705 Allowed" : "\u274C Denied");
581
586
  if (query.message) {
582
587
  const label = behavior === "allow" ? "\u2705 <b>Allowed</b>" : "\u274C <b>Denied</b>";
583
- const original = query.message.text || "";
588
+ const original = this.escHtml(query.message.text || "");
584
589
  await this.editMessageText(query.message.chat.id, query.message.message_id, original + `
585
590
 
586
591
  ${label}`);