codex-to-im 1.0.17 → 1.0.18
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/daemon.mjs +21 -3
- package/package.json +1 -1
package/dist/daemon.mjs
CHANGED
|
@@ -5118,9 +5118,27 @@ function htmlToFeishuMarkdown(html) {
|
|
|
5118
5118
|
}
|
|
5119
5119
|
function buildToolProgressMarkdown(tools) {
|
|
5120
5120
|
if (tools.length === 0) return "";
|
|
5121
|
-
const
|
|
5122
|
-
|
|
5123
|
-
|
|
5121
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
5122
|
+
for (const tool of tools) {
|
|
5123
|
+
const key = tool.name || "tool";
|
|
5124
|
+
const bucket = grouped.get(key) || { running: 0, complete: 0, error: 0 };
|
|
5125
|
+
if (tool.status === "running") bucket.running += 1;
|
|
5126
|
+
else if (tool.status === "error") bucket.error += 1;
|
|
5127
|
+
else bucket.complete += 1;
|
|
5128
|
+
grouped.set(key, bucket);
|
|
5129
|
+
}
|
|
5130
|
+
const lines = Array.from(grouped.entries()).map(([name, counts]) => {
|
|
5131
|
+
const total = counts.running + counts.complete + counts.error;
|
|
5132
|
+
const icon = counts.running > 0 ? "\u{1F504}" : counts.error > 0 ? "\u274C" : "\u2705";
|
|
5133
|
+
const countSuffix = total > 1 ? ` \xD7${total}` : "";
|
|
5134
|
+
const detailParts = [];
|
|
5135
|
+
if (counts.running > 0) detailParts.push(`\u8FD0\u884C\u4E2D ${counts.running}`);
|
|
5136
|
+
if (counts.error > 0) detailParts.push(`\u5F02\u5E38 ${counts.error}`);
|
|
5137
|
+
if ((counts.running > 0 || counts.error > 0) && counts.complete > 0) {
|
|
5138
|
+
detailParts.push(`\u5B8C\u6210 ${counts.complete}`);
|
|
5139
|
+
}
|
|
5140
|
+
const detailSuffix = detailParts.length > 0 ? `\uFF08${detailParts.join(" / ")}\uFF09` : "";
|
|
5141
|
+
return `${icon} \`${name}\`${countSuffix}${detailSuffix}`;
|
|
5124
5142
|
});
|
|
5125
5143
|
return lines.join("\n");
|
|
5126
5144
|
}
|
package/package.json
CHANGED