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

@@ -138,6 +138,7 @@ describe("InteractiveMode compaction events", () => {
const fakeThis = {
isInitialized: true,
footer: { invalidate: vi.fn() },
programStatus: { handleEvent: vi.fn() },
autoCompactionEscapeHandler: undefined as (() => void) | undefined,
autoCompactionLoader: undefined,
defaultEditor: {},
@@ -201,6 +202,7 @@ describe("InteractiveMode compaction events", () => {
const fakeThis = {
isInitialized: true,
footer: { invalidate: vi.fn() },
programStatus: { handleEvent: vi.fn() },
activeStatusIndicator: undefined,
workingVisible: true,
showWorkingStatusIndicator: vi.fn(),
@@ -228,6 +230,24 @@ describe("InteractiveMode compaction events", () => {
expect(fakeThis.ui.requestRender).toHaveBeenCalledTimes(2);
});
// Regression test for #9340.
test("routes interactive response aborts through AgentSession", () => {
const abort = vi.fn(async () => {});
const ui = {
clearAllQueues: () => ({ steering: [], followUp: [] }),
updatePendingMessagesDisplay: vi.fn(),
session: { abort },
};
const restoreQueuedMessagesToEditor = Reflect.get(InteractiveMode.prototype, "restoreQueuedMessagesToEditor") as (
this: typeof ui,
options?: { abort?: boolean },
) => number;
restoreQueuedMessagesToEditor.call(ui, { abort: true });
expect(abort).toHaveBeenCalledOnce();
});
test("preserves steering behavior when flushing into an active agent run", async () => {
const fakeThis = {
compactionQueuedMessages: [{ text: "change direction", mode: "steer" as const }],