All your AI agent sessions in one place — browse, search, resume. Rust + GPUI.
Rust
docs: update project documentation for v0.2.7
Corey Chiu126e00eae04f
diff --git a/.github/workflows/windows-artifact.yml b/.github/workflows/windows-artifact.ymlindex cd28b4d..ff7ce74 100644--- a/.github/workflows/windows-artifact.yml+++ b/.github/workflows/windows-artifact.yml@@ -1,6 +1,7 @@# Windows 发行产物:手动触发,在真 Windows runner 上跑 make-windows.ps1# 打 zip 传 artifact(gpui 的 DirectX shader 编译无法交叉,zip 只能产自-# 真 Windows;维护者无 Windows 真机,这条 workflow 是唯一产物来源)。+# 真 Windows;维护者无 Windows 真机)。发版产物由 release.yml 的 windows+# job 自动出,这条是发版之外的手动出包/验证通道。# 与 ci.yml 互不相干:CI 管测试与编译门槛,这里只管打包。name: Windows artifactdiff --git a/DESIGN.md b/DESIGN.mdindex 5164451..8b32498 100644--- a/DESIGN.md+++ b/DESIGN.md@@ -5,7 +5,7 @@ description: 本地 Coding Agent 会话资料库的 macOS 桌面设计系统# Wake Design System-> 代码是唯一真相:`crates/wake/src/theme.rs` 定义主题,`workbench.rs` 定义界面结构,`detail.rs` 定义对话正文。修改视觉后同步本文。+> 代码是唯一真相:`crates/wake/src/theme.rs` 定义主题,`workbench.rs` 定义界面结构与对话正文渲染(原 detail.rs 已并入)。修改视觉后同步本文。## 设计命题@@ -37,7 +37,7 @@ Wake 的目标不是展示技术感,而是让用户在几秒内重新找到并|---|---|| 默认窗口 | 1180 × 760,居中(14" 屏约占 78% × 77%) || 最小窗口 | 940 × 620 |-| 窗口顶部 | 不设全宽标题栏;交通灯与拖拽区收在侧栏顶部 |+| 窗口顶部 | macOS 不设全宽标题栏,交通灯与拖拽区收在侧栏顶部;Windows 用原生标题栏,Linux 视 compositor 装饰协商而定 || 资料库侧栏 | 224px 固定宽度 || 会话流 | 336px 固定宽度 || 阅读区 | 剩余宽度,`min_w(0)` |@@ -122,7 +122,7 @@ UI 语言英文;会话正文保持原语言。元信息分隔符固定为前后### 窗口顶部-不设置横跨三栏的自定义 header。系统交通灯保留在侧栏顶部,其所在拖拽区与侧栏使用完全相同的材质和颜色;会话流与阅读区不为标题栏预留另一条色带。+macOS 不设置横跨三栏的自定义 header。系统交通灯保留在侧栏顶部,其所在拖拽区与侧栏使用完全相同的材质和颜色;会话流与阅读区不为标题栏预留另一条色带。Windows 保留系统原生标题栏(贴靠布局与深色模式经 DWM 处理);Linux 由 compositor 装饰协商决定,报 Client 时侧栏顶部挂自绘 TitleBar。### 资料库侧栏@@ -133,7 +133,7 @@ UI 语言英文;会话正文保持原语言。元信息分隔符固定为前后- 线条图标比实心品牌图视觉轻,同档里给小一号:分组项 Lucide 14 / 品牌图 18,主导航 Lucide 15。- 行内容 = 行首元素 + 标题 + 计数;计数一律 Label 档 muted。- 组头 "Agents"/"Projects" 用 Body 档常规字重 + muted 色(与主导航同字号同字重,仅靠颜色和"无行首图标"区分——加粗会让组头压过它统辖的行),带 13px chevron 可折叠。-- 底部工具条常驻,顶部 hairline 分隔,按钮靠右排列(次要操作区:透明底、hover 才出色,不与导航行选中态抢注意力)——左为 "Session locations"(硬盘图标,开面板列出每家 agent 的数据路径、会话数,点击行在 Finder 打开;行按 AgentId 声明序稳定成组(自定义根紧随该家默认根之后);**行点击即编辑**,预设与自定义同权、均可改可删(2026-08-24 定稿)。添加/编辑共用一个表单弹窗(480px,agent 下拉 + 路径输入框可手输 ~ 展开 + 目录选择钮,Add|Save / Cancel)**压栈**在面板之上,esc/取消原生弹回面板;**纯路径管理无内容校验**(同日定稿),保存后先出通知、待补扫终态(增量,常亚秒)再重开面板——此刻计数才是真值,立即重开会让新根恒显 0(2026-08-24 Codex review)。行尾仅计数 badge(悬停工具图标试过、否决,同日——Show in Finder 与 Remove 收进编辑表单的动作行——破坏性靠左惯例:Remove(danger 红字 ghost)压内容左缘,Show in Finder 靠右);底部 hairline 下左 "Add location" 右 "Restore defaults"(仅存在偏离时出现,双清自定义与被移除预设;hover 胶囊只包按钮本体——整行 hover 否决,同日)),右为 refresh。+- 底部工具条常驻,顶部 hairline 分隔,按钮靠右排列(次要操作区:透明底、hover 才出色,不与导航行选中态抢注意力)——左为 "Session locations"(硬盘图标,开面板列出每家 agent 的数据路径、会话数,点击行在 Finder(平台文件管理器,文案走 SHOW_IN_FM)打开;行按 AgentId 声明序稳定成组(自定义根紧随该家默认根之后);**行点击即编辑**,预设与自定义同权、均可改可删(2026-08-24 定稿)。添加/编辑共用一个表单弹窗(480px,agent 下拉 + 路径输入框可手输 ~ 展开 + 目录选择钮,Add|Save / Cancel)**压栈**在面板之上,esc/取消原生弹回面板;**纯路径管理无内容校验**(同日定稿),保存后先出通知、待补扫终态(增量,常亚秒)再重开面板——此刻计数才是真值,立即重开会让新根恒显 0(2026-08-24 Codex review)。行尾仅计数 badge(悬停工具图标试过、否决,同日——Show in Finder 与 Remove 收进编辑表单的动作行——破坏性靠左惯例:Remove(danger 红字 ghost)压内容左缘,Show in Finder 靠右);底部 hairline 下左 "Add location" 右 "Restore defaults"(仅存在偏离时出现,双清自定义与被移除预设;hover 胶囊只包按钮本体——整行 hover 否决,同日)),右为 refresh。- 工具条内的**状态行"常态沉默"**:仅刷新中或监听不可用时出现在按钮行上方;文案须可 truncate,窄侧栏放不下长句(故为 "Live updates off" 而非带操作建议的整句)。- 不把项目包装成卡片,不堆叠分支、时间或重复图标。项目行不加彩色标识——同一图标重复十几次不传递信息。@@ -159,7 +159,7 @@ UI 语言英文;会话正文保持原语言。元信息分隔符固定为前后头部元信息(路径/属性/时间/文件)四行收成 4px 紧组,与标题区之间保持 8px——组内紧、组间松,四行等距摊开会读成四个并列区块(2026-08-24 polish)。-对话框标题一律 Heading 16 semibold:组件内建 `.title()` 不设字号(实渲窗口默认 14px),必须显式补 `text_size(FONT_HEADING)`。破坏性确认的主按钮点名动作并用 danger 形态("Move to Trash",不留裸 "OK");表单弹窗内控件同档取齐(输入框与下拉/浏览钮同高,次级动作行才允许 small)。+对话框标题一律 Heading 16 semibold:组件内建 `.title()` 不设字号(实渲窗口默认 14px),必须显式补 `text_size(FONT_HEADING)`。破坏性确认的主按钮点名动作并用 danger 形态("Move to Trash",Windows 上经 trash_copy! 平台文案为 "Move to Recycle Bin",不留裸 "OK");表单弹窗内控件同档取齐(输入框与下拉/浏览钮同高,次级动作行才允许 small)。### 阅读卡diff --git a/PRODUCT.md b/PRODUCT.mdindex cc42219..8cf15e5 100644--- a/PRODUCT.md+++ b/PRODUCT.md@@ -4,7 +4,7 @@## Platform-macos(原生桌面,Rust + GPUI;非 web)+macos(主平台,原生桌面,Rust + GPUI;非 web);Linux(experimental,2026-08-24 起,arm64/x86_64 预编包)与 Windows(experimental,2026-08-25 起,x86_64 zip)为次级平台,数据层三端同测,桌面集成 experimental## Stack@@ -12,7 +12,7 @@ Rust + gpui 0.2 + gpui-component 0.5(用户既定,workspace: crates/wake-core## Users-Corey 本人(独立开发者,主力工具 Claude Code 与 Codex,中文为主)。已开源(2026-08-18 v0.1.0 首发,当前 v0.2.0 2026-08-20,github.com/iAmCorey/Wake,MIT):面向同时使用多个 coding agent 的开发者。+Corey 本人(独立开发者,主力工具 Claude Code 与 Codex,中文为主)。已开源(2026-08-18 v0.1.0 首发,当前 v0.2.7 2026-08-25,github.com/iAmCorey/Wake,MIT):面向同时使用多个 coding agent 的开发者。## Product Purpose@@ -28,7 +28,7 @@ Corey 本人(独立开发者,主力工具 Claude Code 与 Codex,中文为主)。## Capabilities and Constraints-已实现:十三家 adapter、FTS5 trigram 搜索(<3 码点 LIKE 降级)、**搜索跳转定位**(2026-08-18:⌘K 命中直达详情页对应消息并高亮,seq 契约保证)、详情页逐消息渲染(气泡/工具折叠簇/thinking/tree-sitter 高亮;2026-08-17 由整篇 markdown 方案升级)、恢复/收藏/置顶/导出/删除(废纸篓+墓碑)、文件监听增量、测试套件(adapter 契约、DB 往返、scanner 回归 + CI + pre-commit,合成 fixture)。+已实现:十三家 adapter、FTS5 trigram 搜索(<3 码点 LIKE 降级)、**搜索跳转定位**(2026-08-18:⌘K 命中直达详情页对应消息并高亮,seq 契约保证)、详情页逐消息渲染(气泡/工具折叠簇/thinking/tree-sitter 高亮;2026-08-17 由整篇 markdown 方案升级)、恢复/收藏/置顶/导出/删除(废纸篓+墓碑)、文件监听增量、测试套件(adapter 契约、DB 往返、scanner 回归 + CI 三平台 + pre-commit,合成 fixture)、三端桌面(macOS 主平台;Linux/Windows experimental,终端恢复/废纸篓·回收站/剪贴板按平台原生实现,发版 CI 自动出六产物)。约束:对 agent 数据目录只读;绝不写 Codex 的 SQLite;不读凭证;GPUI 无 SF Symbols(图标用 lucide SVG 自备)。已支持十三家 agent:Claude Code、Codex、Copilot CLI、Cursor(CLI transcripts)、OpenCode(含 OpenCode 2 next,stable 的 `opencode.db` 与 next 的 `opencode-next.db` 同时扫描;逐会话兼容 `message+part`、真实 `session+session_message` 及早期 `session_v2` schema;preview 会话标 opencode2 徽章)、Kiro、Gemini CLI(2026-08-17 P1 五家落地)+ Pi、Oh My Pi、Grok Build、Kimi Code、Antigravity CLI(2026-08-19 对齐 kooky 内置 roster;Antigravity 正文加密仅元数据卡片)+ DeepSeek Harness(dsh,2026-08-20,zstd 事件日志透明解压;格式由源码推断,当天用户跑出真实会话完成首验)。做不了的:Cursor IDE chats 正文加密,Windsurf/Trae 加密,Amp/Factory(Droid)/Warp 云端无本地数据,Reasonix 本机零会话格式未实测。diff --git a/README.md b/README.mdindex a1072bf..d987a5e 100644--- a/README.md+++ b/README.md@@ -16,9 +16,9 @@ Your agent history is scattered across `~/.claude`, `~/.codex`, and ten other pr## Features- **Unified browsing** — all sessions grouped by agent / project, live file watching for incremental updates-- **Full-text search** (⌘K) — SQLite FTS5 trigram index; handles CJK text and code substrings (like `useEffect(`) equally well; jumps straight to the matched message in the transcript+- **Full-text search** (⌘K / Ctrl+K) — SQLite FTS5 trigram index; handles CJK text and code substrings (like `useEffect(`) equally well; jumps straight to the matched message in the transcript- **Transcript view** — per-message rendering with user/assistant bubbles, collapsible tool-call clusters, thinking summaries, tree-sitter code highlighting (30+ languages)-- **One-click resume** — reopens the session in Terminal/iTerm at the original project directory (`claude --resume`, `codex resume`, …)+- **One-click resume** — reopens the session in your terminal (Terminal/iTerm on macOS; native terminal hosts on Linux and Windows) at the original project directory (`claude --resume`, `codex resume`, …)- **Manage** — star/pin (stored in Wake's own DB, original files untouched), export to Markdown, delete (system Trash + tombstone so deleted sessions stay deleted)@@ -59,7 +59,7 @@ On the author's machine (~310 sessions, ~800 MB of JSONL): full index ~5 s, subs## Install-Build from source (requires a Rust toolchain):+Download `Wake-<version>-macos.zip` from the [latest release](https://github.com/iAmCorey/Wake/releases/latest), unzip, and drag Wake to Applications. Or build from source (requires a Rust toolchain):```bashgit clone https://github.com/iAmCorey/Wake && cd Wake@@ -71,7 +71,7 @@ The app is ad-hoc signed, so if you download a prebuilt copy instead of building### Linux (experimental)-Prebuilt packages for arm64 and x86_64 are attached to each release: a `.deb`, and a tar.gz with a user-level `install.sh` (no root needed). Or build from source:+Prebuilt packages for arm64 and x86_64 (asset names use Debian's `amd64`) are attached to each release: a `.deb`, and a tar.gz with a user-level `install.sh` (no root needed). Or build from source:```bashsudo apt-get install -y libasound2-dev libfontconfig1-dev libwayland-dev \@@ -84,7 +84,7 @@ The data layer, rendering and search are fully tested on Linux; terminal-resume### Windows (experimental)-Build from source (requires a Rust toolchain with the MSVC target):+Download `wake-<version>-windows-x86_64.zip` from the [latest release](https://github.com/iAmCorey/Wake/releases/latest), unzip, and run `Wake.exe` — the binary is unsigned, so SmartScreen may block the first launch (click *More info* → *Run anyway*). Or build from source (requires a Rust toolchain with the MSVC target):```powershellgit clone https://github.com/iAmCorey/Wake; cd Wake@@ -92,7 +92,7 @@ powershell -ExecutionPolicy Bypass -File scripts/make-windows.ps1 # builds dis# or just: cargo run -p wake```-Resume opens sessions in Windows Terminal, PowerShell, Command Prompt, Alacritty or WezTerm (whichever are installed); delete goes to the Recycle Bin. Agent data lives in the same `~/.claude`-style directories under your user profile, so everything indexed on macOS/Linux is indexed here too. Same beta caveat as Linux: the data layer is fully tested, desktop integration has seen less mileage — issues welcome.+Resume opens sessions in Windows Terminal, PowerShell (7+ or the built-in Windows PowerShell), Command Prompt, Alacritty or WezTerm (whichever are installed); delete goes to the Recycle Bin. Agent data lives in the same `~/.claude`-style directories under your user profile, so everything indexed on macOS/Linux is indexed here too. Same beta caveat as Linux: the data layer is fully tested, desktop integration has seen less mileage — issues welcome.## Development@@ -104,6 +104,7 @@ cargo test -p wake-core # data-layer tests only (adapter contractcargo run -p wake-core --bin scan # data-layer smoke test: scan and print statscargo run -p wake-core --bin scan -- --search "useEffect(" # search smoke testWAKE_THEME=dark cargo run -p wake # force dark/light (defaults to system)+WAKE_HOME=/path cargo run -p wake # point all agent adapters at a different home dir (portable installs, testing)git config core.hooksPath scripts/hooks # optional: run tests before every commitpython3 scripts/demo-home.py # build a synthetic fake-home dataset for screenshots/demos```@@ -120,9 +121,9 @@ crates/│ │ # (AgentAdapter trait — add an adapter, get the whole UI for free)│ ├── scanner.rs # single-pass scan: meta + FTS in one go, mtime incremental│ ├── watcher.rs # notify-based file watching → per-file incremental updates-│ ├── db.rs # rusqlite (WAL): sessions / messages / messages_fts / user_data / tombstones+│ ├── db.rs # rusqlite (WAL): sessions / messages / messages_fts / user_data / tombstones (+ location & schema meta tables)│ └── services/ # terminal resume (per-platform: AppleScript / argv / Win32) / export / trash-└── wake # GPUI app (three-pane workbench + ⌘K palette)+└── wake # GPUI app (three-pane workbench + ⌘K / Ctrl+K palette)```Design notes live in [DESIGN.md](DESIGN.md), product decisions in [PRODUCT.md](PRODUCT.md).diff --git a/scripts/test.sh b/scripts/test.shindex b6c7ca4..1d27979 100755--- a/scripts/test.sh+++ b/scripts/test.sh@@ -1,7 +1,7 @@#!/bin/zsh# Wake 本地测试入口——改完代码跑一跑(对齐 kooky 的 `swift test` 习惯)。#-# scripts/test.sh # 数据层 48 测试 + UI 编译门槛,~秒级+# scripts/test.sh # 数据层 50 测试 + UI 编译门槛,~秒级# scripts/test.sh --smoke # 追加真实数据冒烟:全量扫描统计(人眼对量级,# # 基准见 CLAUDE.md;只读你本机的 agent 数据)set -euo pipefail