pi-render-btw 0.6.22 → 0.6.23
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/CHANGELOG.md +5 -0
- package/extensions/btw-transcript.test.ts +23 -0
- package/extensions/btw.ts +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.23 — 2026-11-24
|
|
4
|
+
|
|
5
|
+
- Keep the selected BTW transcript rail continuous across blank Markdown rows within the same message block.
|
|
6
|
+
- Leave inter-block spacers and turn separators unrailed so message boundaries remain visually distinct.
|
|
7
|
+
|
|
3
8
|
## 0.6.22 — 2026-11-24
|
|
4
9
|
|
|
5
10
|
- Align BTW transcript focus rails with Agent View: reserve a leading railable cell before fitting each selectable row, then replace it with `▎` only for the selected block.
|
|
@@ -57,6 +57,29 @@ describe("BTW transcript message layout", () => {
|
|
|
57
57
|
expect(lines[1].startsWith("▎ Response")).toBe(true);
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
+
it("keeps the selected rail continuous through blank markdown rows", () => {
|
|
61
|
+
const lines = transcriptLines([
|
|
62
|
+
{ id: 1, turnId: 1, type: "assistant-text", text: "First paragraph.\n\nSecond paragraph.", streaming: false },
|
|
63
|
+
]);
|
|
64
|
+
|
|
65
|
+
expect(lines).toEqual([
|
|
66
|
+
"▎ ASSISTANT ",
|
|
67
|
+
"▎ First paragraph.",
|
|
68
|
+
"▎ ",
|
|
69
|
+
"▎ Second paragraph.",
|
|
70
|
+
]);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("does not draw the selected rail in the spacer between blocks", () => {
|
|
74
|
+
const lines = transcriptLines([
|
|
75
|
+
{ id: 1, turnId: 1, type: "user-message", text: "Question" },
|
|
76
|
+
{ id: 2, turnId: 1, type: "assistant-text", text: "Answer", streaming: false },
|
|
77
|
+
]);
|
|
78
|
+
|
|
79
|
+
expect(lines).toContain("");
|
|
80
|
+
expect(lines[lines.indexOf("") + 1]).toBe("▎ ASSISTANT ");
|
|
81
|
+
});
|
|
82
|
+
|
|
60
83
|
it("reserves the selected rail cell before framing long tool headers", () => {
|
|
61
84
|
const lines = transcriptLines([
|
|
62
85
|
{ id: 1, turnId: 1, type: "tool-call", toolCallId: "call-long", toolName: "read", args: "x".repeat(100) },
|
package/extensions/btw.ts
CHANGED
|
@@ -1616,7 +1616,10 @@ export class BtwOverlayComponent extends Container implements Focusable {
|
|
|
1616
1616
|
const plain = (line: string) => line.replace(/\x1b\[[0-9;?]*[ -\/]*[@-~]/g, "");
|
|
1617
1617
|
for (let index = start; index < allLines.length; index++) {
|
|
1618
1618
|
const value = plain(allLines[index]);
|
|
1619
|
-
|
|
1619
|
+
const trimmed = value.trim();
|
|
1620
|
+
// The first blank row is the inter-block spacer inserted by pushBlank.
|
|
1621
|
+
// Later blank rows belong to this block's Markdown and must carry its rail.
|
|
1622
|
+
lineEntryIds[index] = !/^─+$/.test(trimmed) && (trimmed || index > start) ? entryId : null;
|
|
1620
1623
|
}
|
|
1621
1624
|
};
|
|
1622
1625
|
const userBadge = buildTranscriptBadge(this.theme, "USER", "userMessageBg", "accent");
|
package/package.json
CHANGED