fix context logic
This commit is contained in:
@@ -269,7 +269,6 @@ fn build_tool_context(document: &EditorAgentConversationMessagesDocument) -> Edi
|
||||
|
||||
for msg in document.messages.iter().rev() {
|
||||
if let Some(tc) = &msg.tool_call {
|
||||
if !tc.images.is_empty() {
|
||||
for img in &tc.images {
|
||||
let image_id = ImageId {
|
||||
id: img.object_key.clone().unwrap_or_default(),
|
||||
@@ -277,8 +276,6 @@ fn build_tool_context(document: &EditorAgentConversationMessagesDocument) -> Edi
|
||||
let metadata = ImageMetadata { tag: String::new() };
|
||||
images.insert(image_id, metadata);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
for a in &msg.attachments {
|
||||
let image_id = ImageId {
|
||||
|
||||
Reference in New Issue
Block a user