assistant2: Add new conversation button, that also saves the current conversation (#11522)
This PR updates the new assistant with a button to start a new conversation. Clicking on it will reset the chat and put it into a fresh state. The current conversation will be serialized and written to `~/.config/zed/conversations`. Release Notes: - N/A
This commit is contained in:
parent
c77dd8b9e0
commit
33a72219c0
5 changed files with 126 additions and 6 deletions
|
@ -106,6 +106,11 @@ impl SavedConversationMetadata {
|
|||
.and_then(|name| name.to_str())
|
||||
.zip(metadata)
|
||||
{
|
||||
// This is used to filter out conversations saved by the new assistant.
|
||||
if !re.is_match(file_name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let title = re.replace(file_name, "");
|
||||
conversations.push(Self {
|
||||
title: title.into_owned(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue