Retrieve credentials for saved conversations (#6949)
This PR fixes an issue where credentials for saved conversations weren't being fully retrieved, which was preventing continuing a conversation with the assistant in a saved conversation. Release Notes: - Fixed continuing a saved conversation with the Zed assistant.
This commit is contained in:
parent
8e523d812f
commit
444f918e51
1 changed files with 5 additions and 1 deletions
|
@ -1096,6 +1096,7 @@ impl AssistantPanel {
|
||||||
let conversation =
|
let conversation =
|
||||||
Conversation::deserialize(saved_conversation, path.clone(), languages, &mut cx)
|
Conversation::deserialize(saved_conversation, path.clone(), languages, &mut cx)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
this.update(&mut cx, |this, cx| {
|
this.update(&mut cx, |this, cx| {
|
||||||
// If, by the time we've loaded the conversation, the user has already opened
|
// If, by the time we've loaded the conversation, the user has already opened
|
||||||
// the same conversation, we don't want to open it again.
|
// the same conversation, we don't want to open it again.
|
||||||
|
@ -1507,7 +1508,9 @@ impl Conversation {
|
||||||
)
|
)
|
||||||
.await,
|
.await,
|
||||||
);
|
);
|
||||||
cx.update(|cx| completion_provider.retrieve_credentials(cx))?;
|
cx.update(|cx| completion_provider.retrieve_credentials(cx))?
|
||||||
|
.await;
|
||||||
|
|
||||||
let markdown = language_registry.language_for_name("Markdown");
|
let markdown = language_registry.language_for_name("Markdown");
|
||||||
let mut message_anchors = Vec::new();
|
let mut message_anchors = Vec::new();
|
||||||
let mut next_message_id = MessageId(0);
|
let mut next_message_id = MessageId(0);
|
||||||
|
@ -1676,6 +1679,7 @@ impl Conversation {
|
||||||
|
|
||||||
if should_assist {
|
if should_assist {
|
||||||
if !self.completion_provider.has_credentials() {
|
if !self.completion_provider.has_credentials() {
|
||||||
|
log::info!("completion provider has no credentials");
|
||||||
return Default::default();
|
return Default::default();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue