@bty/customer-service-cli 0.1.20 → 0.1.22
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/bin.js +9 -2
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1463,7 +1463,7 @@ function recordsToMsgList(records) {
|
|
|
1463
1463
|
return records.map((r, i) => {
|
|
1464
1464
|
const context = r.context ?? {};
|
|
1465
1465
|
const text = context.text ?? "";
|
|
1466
|
-
const imageUrl = context.image_url;
|
|
1466
|
+
const imageUrl = context.image_url ?? context.image;
|
|
1467
1467
|
const content = {
|
|
1468
1468
|
text,
|
|
1469
1469
|
input: text,
|
|
@@ -1477,7 +1477,7 @@ function recordsToMsgList(records) {
|
|
|
1477
1477
|
match_id: r.record_id ?? `match_${timestamp}_${Math.floor(Math.random() * 100)}`,
|
|
1478
1478
|
content,
|
|
1479
1479
|
timestamp,
|
|
1480
|
-
type: "TEXT",
|
|
1480
|
+
type: r.context_type || "TEXT",
|
|
1481
1481
|
role: r.role
|
|
1482
1482
|
};
|
|
1483
1483
|
});
|
|
@@ -1621,6 +1621,12 @@ function registerDebugCommand(program2) {
|
|
|
1621
1621
|
pollInterval: Number(opts.pollInterval),
|
|
1622
1622
|
category: "agent_response"
|
|
1623
1623
|
});
|
|
1624
|
+
let traceId = null;
|
|
1625
|
+
try {
|
|
1626
|
+
const debugInfo = await getRecordDebugInfo(agentRecords[0].record_id);
|
|
1627
|
+
traceId = debugInfo.trace_id ?? null;
|
|
1628
|
+
} catch {
|
|
1629
|
+
}
|
|
1624
1630
|
formatOutput({
|
|
1625
1631
|
success: true,
|
|
1626
1632
|
data: {
|
|
@@ -1630,6 +1636,7 @@ function registerDebugCommand(program2) {
|
|
|
1630
1636
|
agent_config_name: agentConfig.config_name,
|
|
1631
1637
|
user_name: userName,
|
|
1632
1638
|
context_messages_count: msgList.length,
|
|
1639
|
+
trace_id: traceId,
|
|
1633
1640
|
reply: agentRecords
|
|
1634
1641
|
}
|
|
1635
1642
|
}, program2.opts().table);
|