feat(apes): revive the task/message tabs in the info layer

C6 removed apes:tasks as a duplicate of the host session panel; in practice the two answer different questions (host panel = switch workspaces, plugin tab = who is running right now), so the tab is restored and the info layer goes back to five types.

tasks: live session list (current / running / subagent markers) + showInactive toggle via pluginSettings['apes:tasks']; messages: placeholder that states the host has no message feed yet; both get badge counters, and the whole layer now honours the visible gate (auto-collapse) so hidden tabs stop waking on session events.

zh/en/ja dictionaries in sync (AGENTS 5); wiki 02/03/07 reverted from three to five tabs; decision record in docs/plans/2026-10-11-apes-tab-revival.md.
This commit is contained in:
figmar committed 2026-10-11 21:18:08 +08:00
1 parent 5a715acb85
commit 66ee3953c9
10 files changed
+597 -67

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# apes 信息层 tab 复活(C6 → C7 反演)· 2026-10-11
## 为什么
C6 那次收紧把 `apes:tasks` 从信息层删掉了,理由是与宿主自带的会话面板「职责重叠」。
实际用下来这个判断过于保守:**宿主的会话面板按工作区分组、服务于「换项目」,插件这个 tab
服务于「此刻谁在跑」**——它把当前会话、运行中会话、子智能体三种状态压进一屏,是切会话的入口,
不是另一份项目列表。删掉之后,「我现在有几个会话在跑」这件事在界面上就没有观测点了。
因此本轮按 C-2 的口径**照字面复活**:把 from-scratch 线(`apes-sidebar@2.0.0`)当年的五个
tab 完整搬回 `dsh-apes-sidebar`,并顺手把它当年没做完的两件事补上(角标计数、隐藏门控)。
## 变成什么
| tab | order | 作用 | 相对 v2.0.0 |
| --- | --- | --- | --- |
| `apes:tasks` | 55 | 会话列表:当前 / 运行中 / 子智能体标记,点击切换会话 | 复活 |
| `apes:agents` | 60 | 主代理 + 直系子代理拓扑 | 复活(沿用 1.2.0 已有的拓扑实现) |
| `apes:apps` | 65 | 当前会话所属工作区 | 复活(宿主无应用 feed,占位) |
| `apes:messages` | 67 | 消息流占位 | 复活(宿主无消息流 feed) |
| `apes:profile` | 70 | 当前会话摘要(标题 / cwd / 运行态) | 复活 |
新增的两条行为:
- **角标**:`apes:tasks` 显示运行中会话数,`apes:agents` 显示直系子代理数;计数为 0 时不发角标。
- **门控**:tab 不可见时不订阅会话 feed(不吃会话事件);`apes:tasks` 带 `showInactive` 开关,
落在 `prefs.pluginSettings['apes:tasks']`,缺省显示全部。
## 与 C6 的关系(如何避免重复搬运)
C6 删的是「与宿主会话面板重复的那部分」;本轮复活的是「宿主没有的那部分」。判断标准不是
「有没有相似的 UI」,而是**这件事在宿主里有没有观测点**:会话的运行态、子智能体的直系拓扑,
宿主的两处面板都不给,插件给。据此定下取舍线——**宿主给了 feed 就不自造(apps / messages 明确
写空态),宿主没给才自己接(tasks / agents)**。
## 相关
- 代码:`src/client/apes/tabs.tsx`、`locales.ts`(zh/en/ja)、`icons.tsx`、`src/client/index.tsx`
- 契约:`docs/wiki/03-功能说明.md` §一 总表 / §二 信息层五 tab(行为契约)
- 守护:`tests/apes-tabs.spec.ts`(五 tab 注册、角标、门控、过滤与排序、三语词条齐备)