auto-reply: single emoji per verbose tool line
This commit is contained in:
@@ -641,6 +641,9 @@ export async function runCommandReply(
|
|||||||
return "🛠️";
|
return "🛠️";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const stripToolPrefix = (text: string) =>
|
||||||
|
text.replace(/^\[🛠️ [^\]]+\]\s*/, "");
|
||||||
|
|
||||||
const formatPreview = (texts: string[]) => {
|
const formatPreview = (texts: string[]) => {
|
||||||
const joined = texts.join(" ").trim();
|
const joined = texts.join(" ").trim();
|
||||||
if (!joined) return "";
|
if (!joined) return "";
|
||||||
@@ -651,7 +654,7 @@ export async function runCommandReply(
|
|||||||
for (const tr of aggregated) {
|
for (const tr of aggregated) {
|
||||||
const prefix = formatToolAggregate(tr.toolName, tr.metas);
|
const prefix = formatToolAggregate(tr.toolName, tr.metas);
|
||||||
const preview = formatPreview(tr.previews);
|
const preview = formatPreview(tr.previews);
|
||||||
const decorated = `${emojiForTool(tr.toolName)} ${prefix}${preview}`;
|
const decorated = `${emojiForTool(tr.toolName)} ${stripToolPrefix(prefix)}${preview}`;
|
||||||
const { text: cleanedText, mediaUrls: mediaFound } =
|
const { text: cleanedText, mediaUrls: mediaFound } =
|
||||||
splitMediaFromOutput(decorated);
|
splitMediaFromOutput(decorated);
|
||||||
replyItems.push({
|
replyItems.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user