feat: better session creation handling
This commit is contained in:
@@ -29,10 +29,8 @@ impl App {
|
||||
};
|
||||
|
||||
let project = &item.project;
|
||||
let selected_title = self
|
||||
.selected_session(item)
|
||||
.map(|session| session.title.as_str())
|
||||
.unwrap_or(project.name.as_str());
|
||||
let active_title = self.active_session_title(item);
|
||||
let selected_title = active_title.unwrap_or(project.name.as_str());
|
||||
let header = row![
|
||||
icon(ICON_FOLDER, 19),
|
||||
text(selected_title).size(18),
|
||||
@@ -42,12 +40,12 @@ impl App {
|
||||
.spacing(10)
|
||||
.align_y(Alignment::Center);
|
||||
|
||||
let body: Element<'_, Message> = if let Some(session) = self.selected_session(item) {
|
||||
let body: Element<'_, Message> = if let Some(title) = active_title {
|
||||
let mut messages = column![].spacing(12);
|
||||
if self.conversation.is_empty() {
|
||||
messages = messages.push(
|
||||
column![
|
||||
text(&session.title).size(26),
|
||||
text(title).size(26),
|
||||
text("Run DeepSeek locally with the Rust Metal engine.").size(14),
|
||||
]
|
||||
.spacing(8),
|
||||
@@ -191,7 +189,8 @@ impl App {
|
||||
"Choose a session"
|
||||
})
|
||||
.size(24),
|
||||
text("Create a session above or select one from the sidebar.").size(14),
|
||||
text("Use the new session icon next to the project, or pick one from the sidebar.")
|
||||
.size(14),
|
||||
]
|
||||
.spacing(8)
|
||||
.align_x(Alignment::Center),
|
||||
|
||||
Reference in New Issue
Block a user