@tryarcanist/cli 0.1.75 → 0.1.76
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 +15 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -883,6 +883,15 @@ function projectBranchChanged(data, index) {
|
|
|
883
883
|
...resolvePromptId(data) ? { promptId: resolvePromptId(data) } : {}
|
|
884
884
|
};
|
|
885
885
|
}
|
|
886
|
+
function projectMemoryUsage(data, index) {
|
|
887
|
+
const activeMemoryIds = Array.isArray(data?.activeMemoryIds) ? data.activeMemoryIds.filter((id) => typeof id === "string" && id.trim().length > 0) : [];
|
|
888
|
+
return {
|
|
889
|
+
type: "memory_usage",
|
|
890
|
+
id: `mem-${data?.timestamp ?? index}`,
|
|
891
|
+
activeMemoryIds,
|
|
892
|
+
...resolvePromptId(data) ? { promptId: resolvePromptId(data) } : {}
|
|
893
|
+
};
|
|
894
|
+
}
|
|
886
895
|
function projectAgentTimeline(data, index) {
|
|
887
896
|
return {
|
|
888
897
|
type: "agent_timeline",
|
|
@@ -1083,6 +1092,9 @@ function flattenSessionEvents(raw) {
|
|
|
1083
1092
|
case "branch_changed":
|
|
1084
1093
|
pushEvent(state, projectBranchChanged(data, state.merged.length));
|
|
1085
1094
|
break;
|
|
1095
|
+
case "memory_usage":
|
|
1096
|
+
pushEvent(state, projectMemoryUsage(data, state.merged.length));
|
|
1097
|
+
break;
|
|
1086
1098
|
case "agent_timeline":
|
|
1087
1099
|
pushEvent(state, projectAgentTimeline(data, state.merged.length));
|
|
1088
1100
|
break;
|
|
@@ -1362,6 +1374,9 @@ ${event.answer ? `**Answer:** ${event.answer}
|
|
|
1362
1374
|
case "branch_changed":
|
|
1363
1375
|
return `*[switched to branch \`${event.branch}\`]*
|
|
1364
1376
|
`;
|
|
1377
|
+
case "memory_usage":
|
|
1378
|
+
return event.activeMemoryIds.length > 0 ? `*[used ${event.activeMemoryIds.length === 1 ? "1 memory" : `${event.activeMemoryIds.length} memories`}: ${event.activeMemoryIds.map((id) => `\`${id}\``).join(", ")}]*
|
|
1379
|
+
` : "";
|
|
1365
1380
|
case "agent_timeline":
|
|
1366
1381
|
return `*[${event.eventType}${event.status ? ` (${event.status})` : ""}: ${event.summary}]*
|
|
1367
1382
|
`;
|