session-tree
安装Install

170 个会话,
一棵树。
170 sessions.
One tree.

给 Claude 桌面端的 Code 页加一个侧边面板:父组、子组、项目、会话,四层,有颜色,换账号不丢。 A side pane for the Code tab in Claude's desktop app: groups, subgroups, projects, sessions. Colour-coded, and it stays put when you switch accounts.

上面是可以点的演示,数据都是编的:点文件夹折叠,点「等你回复」筛选,点「编辑」换颜色。 That's a live demo with made-up data: click a folder to fold it, "Waiting on you" to filter, "Edit" to recolour.

父组、子组、项目、会话;运行中;等你回复;真实日期;中文与英文;换账号不丢。Groups, subgroups, projects, sessions; running; waiting on you; real dates; Chinese and English; survives account switches.

为什么做这个Why this exists

每天开十几个会话以后,原生侧边栏有四件事不够用。Open a dozen sessions a day and the built-in sidebar falls short in four ways.

只有一层分组One level of groups

四层:父组 → 子组 → 项目 → 会话Four levels: group → subgroup → project → session

项目按工作目录自动归类。把项目放进文件夹一次,它以后的新会话都会自己归位。Projects come from each session's folder. File a project once and its future sessions follow it.

Work父组group
客户门户Client portal子组subgroup
billing-api项目project
修复退款回调重复入账Fix duplicate refund webhook14:32

换个账号,分组全没了Switch accounts, lose your groups

分组存在本机,所有账号共用Groups live on your Mac, shared by every account

原生分组跟着账号走,每次登录都被替换。这里的配置写在 ~/.claude 里,切哪个账号都一样。Built-in groups belong to the account and get replaced at every sign-in. This one keeps its settings in ~/.claude, the same for every account.

原生侧边栏分组Built-in groups

Work
客户门户Client portal
论文Thesis

没有分组No groups

session-tree

Work
客户门户Client portal
Research
Dev

没变Unchanged

哪个会话在等我回?Which session is waiting on me?

橙点:跑完了,你还没看Orange: finished, not opened yet

绿点是正在跑。文件夹和项目上会汇总这两个数,不展开也看得到。一键只看「等你回复」。Green means running. Folders and projects add both up, so you see them folded. One click shows only what's waiting on you.

「5 天前」是哪天?"5 days ago" is when, exactly?

直接写日期Just the date

今天写时间,昨天写「昨天」,再早写月-日,跨年带年份。Today shows the time, then "Yesterday", then month-day, with the year once it's last year.

只能靠名字认Names are all you get

颜色自己挑,文件夹和项目都能设Pick colours for folders and projects

15 个色块,也可以填 #RRGGBB。项目不设颜色时跟随文件夹。Fifteen swatches, or type a #RRGGBB. A project without its own colour wears its folder's.

装上它Install

需要 macOS 上的 Claude 桌面端。装好后,新开的会话会自动打开面板。Needs Claude's desktop app on macOS. New sessions open the pane by themselves.

在终端里的 Claude Code 会话中In a Claude Code terminal session

/plugin install session-tree --marketplace a1024053774/claude-session-tree

出现 Add marketplace? 输入 y,范围选 user。Answer y to Add marketplace?, then pick the user scope.

或者在桌面端里Or inside the desktop app

+→Plugins→Add marketplace→a1024053774/claude-session-tree→Add plugin

面板关掉了,输入 /tree 再打开。面板右上角的 EN / 中文 切换语言。Closed the pane? Type /tree. The EN / 中文 button in the pane switches language.

更新到新版本Update to a new version

claude plugin marketplace update session-tree && claude plugin update session-tree@session-tree

在 shell 里运行;新开的会话用上新版。Run it in a shell; new sessions get the new version.

现在还做不到的What it can't do yet

只支持 macOSmacOS only会话列表读自桌面端在 Mac 上的本地文件。It reads the desktop app's local files on a Mac.
认不出「等你批准权限」No "approve a permission" state这种会话暂时显示为运行中。Those show as running for now.
不替换原生侧边栏Doesn't replace the sidebar它是另加的一块面板;已归档的会话不显示。It's an extra pane; archived sessions are left out.