fix: preserve paired input evidence context (#204)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
import {
|
||||
expandImagePromptReferences,
|
||||
extractImageTagPaths,
|
||||
imageTagCaption,
|
||||
missingImageTagCaption,
|
||||
@@ -59,6 +60,23 @@ describe('shared agent protocol helpers', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('expands MEDIA image directives into image prompt tags', () => {
|
||||
expect(expandImagePromptReferences('증거\nMEDIA:/tmp/render.png\n끝')).toBe(
|
||||
'증거\n[Image: render.png → /tmp/render.png]\n끝',
|
||||
);
|
||||
});
|
||||
|
||||
it('expands markdown image links into image prompt tags', () => {
|
||||
expect(
|
||||
expandImagePromptReferences('증거  끝'),
|
||||
).toBe('증거 [Image: render.png → /tmp/render.png] 끝');
|
||||
});
|
||||
|
||||
it('keeps non-image media and fenced media text unchanged', () => {
|
||||
const text = 'MEDIA:/tmp/demo.mp4\n```text\nMEDIA:/tmp/render.png\n```';
|
||||
expect(expandImagePromptReferences(text)).toBe(text);
|
||||
});
|
||||
|
||||
it('normalizes plain text runner output as public text', () => {
|
||||
expect(normalizePublicTextOutput('DONE')).toEqual({
|
||||
result: 'DONE',
|
||||
|
||||
Reference in New Issue
Block a user