@delt/claude-alarm 0.6.9 → 0.6.10
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 +13 -4
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/hub/server.js +13 -4
- package/dist/hub/server.js.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/dashboard/index.html +2 -2
package/dist/cli.js
CHANGED
|
@@ -535,8 +535,7 @@ ${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 =
|
|
539
|
-
${p.message}`;
|
|
538
|
+
else if (p.title && p.message) preview = p.message;
|
|
540
539
|
else if (p.file_path) {
|
|
541
540
|
preview = p.file_path;
|
|
542
541
|
if (p.content) {
|
|
@@ -559,8 +558,18 @@ ${p.message}`;
|
|
|
559
558
|
const isShort = !previewSlice.includes("\n") && previewSlice.length < 100;
|
|
560
559
|
const previewHtml = isShort ? `<code>${this.escHtml(previewSlice)}</code>` : this.escHtml(previewSlice);
|
|
561
560
|
let displayTool = toolName;
|
|
562
|
-
|
|
563
|
-
|
|
561
|
+
if ((toolName.endsWith("__notify") || toolName === "notify") && inputPreview) {
|
|
562
|
+
try {
|
|
563
|
+
const pp = JSON.parse(inputPreview);
|
|
564
|
+
if (pp.title) displayTool = pp.title;
|
|
565
|
+
} catch {
|
|
566
|
+
const tm = inputPreview.match(/"title"\s*:\s*"((?:[^"\\]|\\.)*)"/);
|
|
567
|
+
if (tm) displayTool = tm[1];
|
|
568
|
+
}
|
|
569
|
+
} else {
|
|
570
|
+
const mcpMatch = toolName.match(/__([^_]+)$/);
|
|
571
|
+
if (mcpMatch) displayTool = mcpMatch[1].charAt(0).toUpperCase() + mcpMatch[1].slice(1);
|
|
572
|
+
}
|
|
564
573
|
const text = `\u26A0\uFE0F <b>Permission Request</b> \u2014 ${this.escHtml(sessionLabel)}
|
|
565
574
|
|
|
566
575
|
\u{1F527} <b>${this.escHtml(displayTool)}</b>
|