77 collectLegacyInlineImages ,
88 type ResolvedAttachment ,
99} from "../../src/engines/sandbox_agent/attachments.ts" ;
10+ import { COLD_FRAME_USER_LABEL } from "../../src/engines/sandbox_agent/transcript.ts" ;
1011import type { ChatMessage } from "../../src/protocol.ts" ;
1112
1213const ATTACHMENT_ID = "019a52c2-14c0-7c14-b874-2f5798f9cd21" ;
@@ -72,7 +73,8 @@ describe("attachment prompt blocks", () => {
7273 it ( "places mentions in the latest-user section of a cold replay frame" , ( ) => {
7374 const turnText =
7475 "Conversation so far:\nassistant: ready\n\n" +
75- "Continue the conversation. The user now says:\ndescribe this" ;
76+ COLD_FRAME_USER_LABEL +
77+ "describe this" ;
7678 const blocks = buildPromptBlocks (
7779 turnText ,
7880 [ resolved ( "workspace_only" ) ] ,
@@ -84,7 +86,7 @@ describe("attachment prompt blocks", () => {
8486 assert . equal (
8587 text ,
8688 "Conversation so far:\nassistant: ready\n\n" +
87- "Continue the conversation. The user now says:\n" +
89+ COLD_FRAME_USER_LABEL +
8890 "[attached file: photo.png at attachments/" +
8991 ATTACHMENT_ID +
9092 "/photo.png]\ndescribe this" ,
@@ -93,8 +95,7 @@ describe("attachment prompt blocks", () => {
9395
9496 it ( "puts attachment-only mentions after the cold frame's closing label" , ( ) => {
9597 const turnText =
96- "Conversation so far:\nassistant: ready\n\n" +
97- "Continue the conversation. The user now says:\n" ;
98+ "Conversation so far:\nassistant: ready\n\n" + COLD_FRAME_USER_LABEL ;
9899 const blocks = buildPromptBlocks (
99100 turnText ,
100101 [ resolved ( "workspace_only" ) ] ,
0 commit comments