@tryarcanist/cli 0.1.9 → 0.1.11
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 +2 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -539,12 +539,6 @@ function resolveAuthoritativePromptEvents(raw) {
|
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
// src/utils/session-output.ts
|
|
542
|
-
function flattenSessionEvents2(raw) {
|
|
543
|
-
return flattenSessionEvents(raw);
|
|
544
|
-
}
|
|
545
|
-
function partitionEventsByPrompt2(allEvents, promptIds) {
|
|
546
|
-
return partitionEventsByPrompt(allEvents, promptIds);
|
|
547
|
-
}
|
|
548
542
|
function formatDate(value) {
|
|
549
543
|
const date = new Date(value);
|
|
550
544
|
if (Number.isNaN(date.getTime())) return value;
|
|
@@ -605,7 +599,7 @@ function formatNumber(value) {
|
|
|
605
599
|
function renderSessionTranscript(exportData) {
|
|
606
600
|
const lines = [];
|
|
607
601
|
const promptIds = exportData.prompts.map((prompt) => prompt.id);
|
|
608
|
-
const eventBuckets =
|
|
602
|
+
const eventBuckets = partitionEventsByPrompt(exportData.events, promptIds);
|
|
609
603
|
lines.push("# Session transcript\n");
|
|
610
604
|
if (exportData.session.repoUrl) lines.push(`**Repo:** ${exportData.session.repoUrl} `);
|
|
611
605
|
lines.push(`**Session:** ${exportData.session.id.slice(0, 8)} `);
|
|
@@ -619,7 +613,7 @@ function renderSessionTranscript(exportData) {
|
|
|
619
613
|
for (let i = 0; i < exportData.prompts.length; i++) {
|
|
620
614
|
const prompt = exportData.prompts[i];
|
|
621
615
|
const rawEvents = eventBuckets.get(prompt.id) ?? [];
|
|
622
|
-
const events =
|
|
616
|
+
const events = flattenSessionEvents(resolveAuthoritativePromptEvents(rawEvents));
|
|
623
617
|
lines.push("---\n");
|
|
624
618
|
lines.push(`## Turn ${i + 1}
|
|
625
619
|
`);
|