feat: better session creation handling

This commit is contained in:
Georg Bauer
2026-07-25 12:02:04 +02:00
parent 4292e0d3f9
commit 51c1b2a7dc
5 changed files with 182 additions and 58 deletions

View File

@@ -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),