chore(vendor): import pi 1.3.0

Imported as a linear vendor commit so forge rebases do not replay the upstream root tree.

git-subtree-dir: third_party/pi

git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
This commit is contained in:
2026-10-15 17:58:48 -04:00
parent 719370c8f7
commit 6081e3e325
1743 changed files with 205460 additions and 131705 deletions

View File

@@ -156,6 +156,43 @@ describe("TreeSelectorComponent", () => {
expect(list.getSelectedNode()?.entry.id).toBe("user-2");
});
test("hides context edits by default and labels them in all mode", () => {
const entries: SessionEntry[] = [
userMessage("user-1", null, "hello"),
assistantMessage("asst-1", "user-1", "hi"),
{
type: "context_edit",
id: "edit-1",
parentId: "asst-1",
timestamp: new Date().toISOString(),
targetId: "asst-1",
replacement: null,
},
];
const tree = buildTree(entries);
const defaultSelector = new TreeSelectorComponent(
tree,
"edit-1",
24,
() => {},
() => {},
);
expect(defaultSelector.getTreeList().getSelectedNode()?.entry.id).toBe("asst-1");
const allSelector = new TreeSelectorComponent(
tree,
"edit-1",
24,
() => {},
() => {},
undefined,
undefined,
"all",
);
const rendered = allSelector.getTreeList().render(200).map(stripVTControlCharacters).join("\n");
expect(rendered).toContain("[context omit: asst-1]");
});
test("focuses nearest visible ancestor when currentLeafId is a thinking_level_change entry", () => {
// Similar structure with thinking_level_change instead of model_change
const entries = [