@erdoai/cli 0.217.0 → 0.217.1
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/index.js +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5553,11 +5553,14 @@ conversationParticipantsCmd.command("remove <threadId> <agent>").description("Re
|
|
|
5553
5553
|
fail(e);
|
|
5554
5554
|
}
|
|
5555
5555
|
});
|
|
5556
|
-
function contentBlockLabel(c) {
|
|
5556
|
+
function contentBlockLabel(c, verbose = false) {
|
|
5557
5557
|
const type = c.ui_content_type || c.content_type;
|
|
5558
5558
|
const payload = c.content;
|
|
5559
5559
|
const toolName = payload && typeof payload === "object" && !Array.isArray(payload) && typeof payload.name === "string" ? payload.name : void 0;
|
|
5560
|
-
|
|
5560
|
+
let label = toolName ? `${type}: ${toolName}` : type;
|
|
5561
|
+
const producer = [c.created_by_agent_key, verbose && c.created_by_agent_run_id ? `run ${c.created_by_agent_run_id}` : void 0].filter(Boolean).join(" ");
|
|
5562
|
+
if (producer) label += ` \xB7 by ${producer}`;
|
|
5563
|
+
return label;
|
|
5561
5564
|
}
|
|
5562
5565
|
agentCmd.command("messages <threadId>").description("Show a thread's messages (role + text)").option("-v, --verbose", "print full content for non-text entries (tool calls, results, etc.) instead of a placeholder").action(async (threadId, opts) => {
|
|
5563
5566
|
try {
|
|
@@ -5573,7 +5576,7 @@ agentCmd.command("messages <threadId>").description("Show a thread's messages (r
|
|
|
5573
5576
|
if (c.content_type === "text") {
|
|
5574
5577
|
console.log(c.content);
|
|
5575
5578
|
} else if (opts.verbose) {
|
|
5576
|
-
console.log(`\x1B[2m[${contentBlockLabel(c)}]\x1B[0m`);
|
|
5579
|
+
console.log(`\x1B[2m[${contentBlockLabel(c, true)}]\x1B[0m`);
|
|
5577
5580
|
console.log(typeof c.content === "string" ? c.content : JSON.stringify(c.content, null, 2));
|
|
5578
5581
|
} else {
|
|
5579
5582
|
console.log(`\x1B[2m[${contentBlockLabel(c)}]\x1B[0m`);
|