Skip to content

Commit f37adee

Browse files
authored
fix(changed-files): make file change notifications droppable (#1904)
1 parent e430557 commit f37adee

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

crates/forge_app/src/changed_files.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::sync::Arc;
22

3-
use forge_domain::{Agent, ContextMessage, Conversation};
3+
use forge_domain::{Agent, ContextMessage, Conversation, Role, TextMessage};
44
use forge_template::Element;
55

66
use crate::utils::format_display_path;
@@ -64,9 +64,13 @@ impl<S: FsReadService + EnvironmentService> ChangedFiles<S> {
6464
.to_string();
6565

6666
let context = conversation.context.take().unwrap_or_default();
67-
conversation = conversation.context(
68-
context.add_message(ContextMessage::user(notification, self.agent.model.clone())),
69-
);
67+
68+
let mut message = TextMessage::new(Role::User, notification).droppable(true);
69+
if let Some(model) = self.agent.model.clone() {
70+
message = message.model(model);
71+
}
72+
73+
conversation = conversation.context(context.add_message(ContextMessage::from(message)));
7074

7175
conversation
7276
}

0 commit comments

Comments
 (0)