agent: Restore last used agent session on startup (#36401)
Release Notes: - N/A
This commit is contained in:
parent
2eadd5a396
commit
5591fc810e
4 changed files with 60 additions and 35 deletions
|
@ -622,7 +622,10 @@ impl Thread {
|
|||
) -> Result<mpsc::UnboundedReceiver<Result<AgentResponseEvent>>> {
|
||||
self.cancel();
|
||||
|
||||
let model = self.model.clone().context("No language model configured")?;
|
||||
let model = self
|
||||
.model()
|
||||
.cloned()
|
||||
.context("No language model configured")?;
|
||||
let (events_tx, events_rx) = mpsc::unbounded::<Result<AgentResponseEvent>>();
|
||||
let event_stream = AgentResponseEventStream(events_tx);
|
||||
let message_ix = self.messages.len().saturating_sub(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue