diff options
| author | Seth Troisi <[email protected]> | 2025-06-12 16:17:44 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-12 16:17:44 -0700 |
| commit | dc378e8d604030d934959cceefed4aef5a1ea6b0 (patch) | |
| tree | edfeed860ef666af3f1120c882e602885926aa9e /packages/cli/src/ui/hooks/atCommandProcessor.test.ts | |
| parent | b7daa7c7021691e3466c4b629e600b7b3af949f0 (diff) | |
Have @ pass through images and other Part objects (#990)
Diffstat (limited to 'packages/cli/src/ui/hooks/atCommandProcessor.test.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/atCommandProcessor.test.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/cli/src/ui/hooks/atCommandProcessor.test.ts b/packages/cli/src/ui/hooks/atCommandProcessor.test.ts index dc2b89f3..3ae9a4c1 100644 --- a/packages/cli/src/ui/hooks/atCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/atCommandProcessor.test.ts @@ -240,8 +240,12 @@ describe('handleAtCommand', () => { // If it were to return actual image Part, the test and handling would be different. // Current implementation of read_many_files for images returns base64 in text. const imageFileTextContent = '[base64 image data for path/to/image.png]'; + const imagePart = { + mimeType: 'image/png', + inlineData: imageFileTextContent, + }; mockReadManyFilesExecute.mockResolvedValue({ - llmContent: [`--- ${imagePath} ---\n\n${imageFileTextContent}\n\n`], + llmContent: [imagePart], returnDisplay: 'Read 1 image.', }); @@ -256,8 +260,7 @@ describe('handleAtCommand', () => { expect(result.processedQuery).toEqual([ { text: `@${imagePath}` }, { text: '\n--- Content from referenced files ---' }, - { text: `\nContent from @${imagePath}:\n` }, - { text: imageFileTextContent }, + imagePart, { text: '\n--- End of content ---' }, ]); expect(result.shouldProceed).toBe(true); |
