Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

test(attachments): sync history source contract

vastsa328eab250426
diff --git a/apps/desktop/test/composer-paste-files.test.mjs b/apps/desktop/test/composer-paste-files.test.mjs
index cc9085ede..c34e87d4c 100644
--- a/apps/desktop/test/composer-paste-files.test.mjs
+++ b/apps/desktop/test/composer-paste-files.test.mjs
@@ -269,7 +269,7 @@ test("large image attachments avoid whole-file startup reads", () => {
assert.match(attachments, /await copyFile\(source, target, fsConstants\.COPYFILE_EXCL\)/);
assert.doesNotMatch(attachments, /const bytes = readFileSync\(source\.absolute\)/);
assert.match(history, /const size = \(await stat\(canonical\)\)\.size/);
- assert.match(history, /shouldInline && size <= MAX_INLINE_IMAGE_BYTES/);
+ assert.match(history, /const canInline =[\s\S]*size <= MAX_INLINE_IMAGE_BYTES/);
assert.match(history, /await copyFile\(source, target, fsConstants\.COPYFILE_EXCL\)/);
});