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:
1 parent
719370c8f7
commit
6081e3e325
1743 files changed
+205459
-131704
No files matched your search
+8
-2
@@ -34,12 +34,15 @@ describe("AgentSession tool result images", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("passes images.autoResize to tool result normalization", async () => {
|
||||
it("passes image settings and the current model profile to tool result normalization", async () => {
|
||||
const resizeOptions = { maxWidth: 1200, maxHeight: 1000, maxBytes: 500000, jpegQuality: 70 };
|
||||
const harness = await createHarness({
|
||||
tools: [screenshotTool],
|
||||
settings: { images: { autoResize: false } },
|
||||
});
|
||||
harnesses.push(harness);
|
||||
if (!harness.session.model) throw new Error("Expected a model");
|
||||
harness.session.model.inputLimits = { images: { resize: resizeOptions } };
|
||||
harness.setResponses([
|
||||
fauxAssistantMessage([fauxToolCall("screenshot", {})], { stopReason: "toolUse" }),
|
||||
fauxAssistantMessage("done"),
|
||||
@@ -47,6 +50,9 @@ describe("AgentSession tool result images", () => {
|
||||
|
||||
await harness.session.prompt("take a screenshot");
|
||||
|
||||
expect(normalizeToolResultImages).toHaveBeenCalledWith(expect.any(Array), { autoResizeImages: false });
|
||||
expect(normalizeToolResultImages).toHaveBeenCalledWith(expect.any(Array), {
|
||||
autoResizeImages: false,
|
||||
resizeOptions,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user