Skip to content

armgit / Wake

Public Imported from GitHub
0

All your AI agent sessions in one place — browse, search, resume. Rust + GPUI.

Rust

Reorder the detail metadata

Corey Chiud959f193c853
diff --git a/DESIGN.md b/DESIGN.md
index fc3951c..81e0b84 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -156,11 +156,12 @@ macOS 不设置横跨三栏的自定义 header。主窗口透明标题栏高 44p
1. Agent、项目、分支等来源上下文与右侧操作工具条,共享一个 44px 高的 Flex 行;28px 操作条上下各保留 8px,不使用绝对定位。
2. 会话标题独占第二个 44px 行,与第一行合计 88px;标题行下沿与左栏身份区和会话列表标题区对齐。标题保持 22px,过长时单行截断。
-3. 独占一行的项目路径。
-4. 模型、来源 badge 与消息数、token 组成的统计行。
-5. 精确到秒的创建时间与更新时间;两者作为同一组从信息区左边界依次排列。
+3. 模型与来源(Via)badge 独占标题下方第一行。
+4. 消息数与 token 独占第二行。
+5. 项目路径独占第三行。
+6. 第四行以 12px 日期图标开头,随后依次排列精确到秒的创建时间与更新时间。
-五层信息一项不减;标题下方的信息继续保持独立层级,不压进 88px 标题区域。层内保持紧凑,层间至少 8–12px,让来源、标题、位置、运行统计和时间上下文能被分别扫读。
+六层信息一项不减;标题下方的四行信息继续保持独立层级,不压进 88px 标题区域。层内保持紧凑,层间至少 8–12px,让来源、标题、运行统计、位置和时间上下文能被分别扫读。
“在终端继续”是唯一主按钮。收藏、置顶保留为独立图标按钮;导出、Finder 和删除进入“更多”菜单。按钮圆角固定 6px,危险操作在菜单中用分组隔开并继续走确认框。
diff --git a/crates/wake/assets/icons/calendar.svg b/crates/wake/assets/icons/calendar.svg
new file mode 100644
index 0000000..cde79e5
--- /dev/null
+++ b/crates/wake/assets/icons/calendar.svg
@@ -0,0 +1,18 @@
+<!-- @license lucide-static v0.462.0 - ISC -->
+<svg
+ class="lucide lucide-calendar"
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
+ stroke-linecap="round"
+ stroke-linejoin="round"
+>
+ <path d="M8 2v4" />
+ <path d="M16 2v4" />
+ <rect width="18" height="18" x="3" y="4" rx="2" />
+ <path d="M3 10h18" />
+</svg>
diff --git a/crates/wake/src/assets.rs b/crates/wake/src/assets.rs
index b04f2e6..d266a14 100644
--- a/crates/wake/src/assets.rs
+++ b/crates/wake/src/assets.rs
@@ -76,6 +76,7 @@ icons!(
"pin",
"download",
"folder",
+ "calendar",
"trash-2",
"search",
"arrow-up-down",
diff --git a/crates/wake/src/workbench.rs b/crates/wake/src/workbench.rs
index a2d58bc..a3bf7f5 100644
--- a/crates/wake/src/workbench.rs
+++ b/crates/wake/src/workbench.rs
@@ -2945,6 +2945,7 @@ impl Workbench {
if let Some(tokens) = meta.tokens_used {
detail_facts.push(format!("{} tokens", fmt_tokens(Some(tokens))));
}
+ let has_detail_facts = !detail_facts.is_empty();
let detail_fact_line: SharedString = detail_facts.join(" · ").into();
let created_time: Option<SharedString> =
(meta.created_at > 0).then(|| format!("Created {}", abs_date(meta.created_at)).into());
@@ -3183,17 +3184,6 @@ impl Workbench {
.gap(SPACE_SM)
.text_size(FONT_LABEL)
.text_color(theme.muted_foreground)
- .child(
- h_flex()
- .min_w_0()
- .gap(px(6.))
- .child(
- icon("icons/folder.svg")
- .with_size(px(12.))
- .flex_shrink_0(),
- )
- .child(div().min_w_0().truncate().child(detail_path)),
- )
.child(
h_flex()
.min_w_0()
@@ -3215,26 +3205,65 @@ impl Workbench {
};
this.child(outline_badge(source, color))
},
- )
- .child(
- div()
- .min_w_0()
- .truncate()
- .child(detail_fact_line),
),
)
+ .when(has_detail_facts, |this| {
+ this.child(
+ div()
+ .min_w_0()
+ .truncate()
+ .child(detail_fact_line),
+ )
+ })
+ .child(
+ h_flex()
+ .min_w_0()
+ .gap(px(6.))
+ .child(
+ icon("icons/folder.svg")
+ .with_size(px(12.))
+ .flex_shrink_0(),
+ )
+ .child(div().min_w_0().truncate().child(detail_path)),
+ )
.when(created_time.is_some() || updated_time.is_some(), |this| {
this.child(
h_flex()
.w_full()
.min_w_0()
- .gap(SPACE_XL)
- .when_some(created_time.clone(), |row, created| {
- row.child(div().min_w_0().truncate().child(created))
- })
- .when_some(updated_time.clone(), |row, updated| {
- row.child(div().flex_shrink_0().child(updated))
- }),
+ .gap(px(6.))
+ .items_center()
+ .child(
+ icon("icons/calendar.svg")
+ .with_size(px(12.))
+ .flex_shrink_0(),
+ )
+ .child(
+ h_flex()
+ .min_w_0()
+ .gap(SPACE_XL)
+ .when_some(
+ created_time.clone(),
+ |row, created| {
+ row.child(
+ div()
+ .min_w_0()
+ .truncate()
+ .child(created),
+ )
+ },
+ )
+ .when_some(
+ updated_time.clone(),
+ |row, updated| {
+ row.child(
+ div()
+ .flex_shrink_0()
+ .child(updated),
+ )
+ },
+ ),
+ ),
)
}),
),