File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import Anthropic from "@anthropic-ai/sdk";
15
15
import { ToolSet } from "ai" ;
16
16
import { AgentClient } from "./AgentClient" ;
17
17
import { mapKeyToPlaywright } from "./utils/cuaKeyMapping" ;
18
+ import { compressConversationImages } from "./utils/imageCompression" ;
18
19
19
20
export type ResponseInputItem = AnthropicMessage | AnthropicToolResult ;
20
21
@@ -323,6 +324,8 @@ export class AnthropicCUAClient extends AgentClient {
323
324
const nextInputItems : ResponseInputItem [ ] = [ ...inputItems ] ;
324
325
325
326
// Add the assistant message with tool_use blocks to the history
327
+ compressConversationImages ( nextInputItems ) ;
328
+
326
329
nextInputItems . push ( assistantMessage ) ;
327
330
328
331
// Generate tool results and add them as a user message
You can’t perform that action at this time.
0 commit comments