Save conversations to ~/.config/zed/conversations

Still need to implement loading / listing.
I'd really be rather write operations to a database. Maybe we
should be auto-saving? Integrating with panes? I just did
the simple thing for now.
This commit is contained in:
Nathan Sobo 2023-06-16 16:15:07 -06:00
parent 75b5ac8488
commit 882009bc75
4 changed files with 61 additions and 6 deletions

View file

@ -14,6 +14,13 @@ struct OpenAIRequest {
stream: bool,
}
#[derive(Serialize, Deserialize)]
struct SavedConversation {
zed: String,
version: String,
messages: Vec<RequestMessage>,
}
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
struct RequestMessage {
role: Role,