assistant2: Add general structure for conversation history (#11516)
This PR adds the general structure for conversation history to the new assistant. Right now we have a placeholder button in the assistant panel that will toggle a picker containing some placeholder saved conversations. Release Notes: - N/A
This commit is contained in:
parent
47ca343803
commit
6a64b732b6
5 changed files with 239 additions and 1 deletions
29
crates/assistant2/src/saved_conversation.rs
Normal file
29
crates/assistant2/src/saved_conversation.rs
Normal file
|
@ -0,0 +1,29 @@
|
|||
pub struct SavedConversation {
|
||||
/// The title of the conversation, generated by the Assistant.
|
||||
pub title: String,
|
||||
pub messages: Vec<SavedMessage>,
|
||||
}
|
||||
|
||||
pub struct SavedMessage {
|
||||
pub text: String,
|
||||
}
|
||||
|
||||
/// Returns a list of placeholder conversations for mocking the UI.
|
||||
///
|
||||
/// Once we have real saved conversations to pull from we can use those instead.
|
||||
pub fn placeholder_conversations() -> Vec<SavedConversation> {
|
||||
vec![
|
||||
SavedConversation {
|
||||
title: "How to get a list of exported functions in an Erlang module".to_string(),
|
||||
messages: vec![],
|
||||
},
|
||||
SavedConversation {
|
||||
title: "7 wonders of the ancient world".to_string(),
|
||||
messages: vec![],
|
||||
},
|
||||
SavedConversation {
|
||||
title: "Size difference between u8 and a reference to u8 in Rust".to_string(),
|
||||
messages: vec![],
|
||||
},
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue