Fix panic when re-editing old message with creases (#32017)
Co-authored-by: Cole Miller <m@cole-miller.net> Release Notes: - agent: Fixed a panic when re-editing old messages --------- Co-authored-by: Cole Miller <m@cole-miller.net> Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
parent
4aabba6cf6
commit
03357f3f7b
3 changed files with 93 additions and 4 deletions
|
@ -1032,6 +1032,7 @@ impl Thread {
|
|||
id: MessageId,
|
||||
new_role: Role,
|
||||
new_segments: Vec<MessageSegment>,
|
||||
creases: Vec<MessageCrease>,
|
||||
loaded_context: Option<LoadedContext>,
|
||||
checkpoint: Option<GitStoreCheckpoint>,
|
||||
cx: &mut Context<Self>,
|
||||
|
@ -1041,6 +1042,7 @@ impl Thread {
|
|||
};
|
||||
message.role = new_role;
|
||||
message.segments = new_segments;
|
||||
message.creases = creases;
|
||||
if let Some(context) = loaded_context {
|
||||
message.loaded_context = context;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue