assistant2: Rework how tool results are stored and referred to (#25817)
This PR reworks how we store tool results and refer to them later. We now maintain a mapping of the tool uses to their corresponding results, with separate mappings for the messages and the tool uses they correspond to. Release Notes: - N/A
This commit is contained in:
parent
508b581215
commit
b445e4ce24
2 changed files with 56 additions and 64 deletions
|
@ -255,12 +255,7 @@ impl ActiveThread {
|
|||
let task = tool.run(tool_use.input, self.workspace.clone(), window, cx);
|
||||
|
||||
self.thread.update(cx, |thread, cx| {
|
||||
thread.insert_tool_output(
|
||||
tool_use.assistant_message_id,
|
||||
tool_use.id.clone(),
|
||||
task,
|
||||
cx,
|
||||
);
|
||||
thread.insert_tool_output(tool_use.id.clone(), task, cx);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue