pi-anchor 0.6.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # ⌖ Anchor
2
2
 
3
- > **A digital sticky note docked below your Pi editor — 0ms instant stick, micro progress bars `[■■□□ 2/4]`, 1-click session teleport (`↪`), and automatic teardown on `git commit`.**
3
+ > **A digital sticky note & cross-session `todo` checkpoint docked below your Pi editor — automatically catches unfinished `todo` lists when you close the terminal, sticks quick notes in 0ms (`pin: ...`), and teleports back to the original session (`/back`).**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/pi-anchor?color=blue)](https://www.npmjs.com/package/pi-anchor)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/pi-anchor?color=22c55e&label=downloads)](https://www.npmjs.com/package/pi-anchor)
7
7
  [![GitHub stars](https://img.shields.io/github/stars/3ZEROS12/anchor?style=flat&color=f59e0b)](https://github.com/3ZEROS12/anchor/stargazers)
8
8
  [![CI Status](https://github.com/3ZEROS12/anchor/actions/workflows/ci.yml/badge.svg)](https://github.com/3ZEROS12/anchor/actions/workflows/ci.yml)
9
- [![Tests: 10 Passed](https://img.shields.io/badge/Tests-10%20Passed-22c55e.svg)](tests/store.test.ts)
9
+ [![Tests: 15 Passed](https://img.shields.io/badge/Tests-15%20Passed-22c55e.svg)](tests/store.test.ts)
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-f97316.svg)](LICENSE)
11
11
 
12
- **English** | [日本語](./README_ja.md) | [简体中文](./README_zh.md)
12
+ **English** | [简体中文](./README_zh.md)
13
13
 
14
14
  ```bash
15
15
  pi install npm:pi-anchor
@@ -22,9 +22,14 @@ pi install npm:pi-anchor
22
22
  ```text
23
23
  ┌─ [aboveEditor stays 100% free for pi-lingual and other HUD widgets] ────────────┐
24
24
  ╭─┴─ Pi Editor ────────────────────────────────────────────────────────────────────╮
25
- │ ❯ pin: Refactor auth flow: 1. Extract interface 2. HttpOnly cookie 3. Unit tests │
25
+ │ ❯ pin: Refactor auth: 1. Extract interface 2. HttpOnly cookie 3. Unit tests │
26
26
  ╰─┬────────────────────────────────────────────────────────────────────────────────╯
27
- └─► ⌖ #1 [■■□□ 2/4] Refactor auth flow ▸ Unit tests (app · auth.ts ↪)
27
+ ├─► ⌖ #1 [■□□□ 1/3] Refactor auth (app · auth.ts ↪) [Alt+A fold]
28
+ │ ├─ ✓ 1. Extract auth interface (strikethrough)
29
+ │ ├─ ◐ 2. HttpOnly cookie (editing auth.ts)
30
+ │ ├─ ○ 3. Unit tests ⛓ #2
31
+ │ └─ 📌 #2 Double-check gateway timeout fallback (3h ago)
32
+ └─► (Folded via Alt+A): ⌖ #1 [■□□□ 1/3] Refactor auth ▸ HttpOnly cookie (auth.ts ↪)
28
33
  ```
29
34
 
30
35
  ---
@@ -37,11 +42,11 @@ Late at night, mid-way through fixing a bug, you spot a second issue in `src/aut
37
42
  2. **`TODO.md` Pollutes Git & Burns Context Tokens**: Tracking personal reminders inside repository markdown files dirties `git status` and re-injects stale checklists into the system prompt on every turn.
38
43
  3. **Splash Banners Vanish When You Start Typing**: Traditional startup widgets disappear on the first message. For the rest of a two-hour session, your notes are hidden unless you manually run a slash command.
39
44
 
40
- **Anchor acts like a physical sticky note stuck to the bottom bezel of your Pi editor**:
41
- - **Persistent Below-Editor Strip (`belowEditor`)**: Docks a single-line note strip directly beneath your input box. It stays in view while you code, leaves `aboveEditor` untouched for extensions like `pi-lingual`, and collapses to 0 lines when empty.
45
+ **Anchor acts like a physical sticky note and auto-save checkpoint stuck to the bottom bezel of your Pi editor**:
46
+ - **Auto-Todo Bridge (`todo` ➔ Cross-Session Checkpoint)**: Standard `todo` tools (`@juicesharp/rpiv-todo` and built-in `todo`) live only inside a single conversation with zero disk writes — closing the terminal or running `/new` wipes unfinished tasks. Anchor automatically mirrors unfinished `todo` snapshots to disk (`[■■□□ 2/5]`) and auto-clears them the moment all steps reach `completed`.
47
+ - **Persistent Below-Editor Strip (`belowEditor`)**: Docks a single-line note strip directly beneath your input box. It stays in view while you code, leaves `aboveEditor` untouched for extensions like `pi-lingual` and `rpiv-todo`, and collapses to 0 lines when empty.
42
48
  - **0ms Human-First Capture (`pin: ...`)**: Type `pin: Check token expiry` (or `/pin ...`) straight into the editor. An input hook intercepts the text in `0.00ms` without calling the language model or spending tokens.
43
- - **Micro Progress Bar (`[■■□□ 2/4]`)**: Write `[2/4]` or numbered steps (`1. Extract interface 2. HttpOnly cookie 3. Unit tests`) in your note to get an inline 4-cell progress bar with next-step hints.
44
- - **Session Teleport (`↪ Jump to session`)**: Every note bookmarks the exact `.jsonl` session file where it was created or last touched. Select `↪ Jump to session` in `/anchor` to switch Pi straight back to that conversation.
49
+ - **Session Teleport (`/back` & `↪ Jump to session`)**: Every note and auto-checkpoint bookmarks the exact `.jsonl` session file where work happened. Run `/back` (or select `↪ Jump to session` in `/anchor`) to switch Pi straight back to that conversation.
45
50
 
46
51
  ---
47
52
 
@@ -49,9 +54,10 @@ Late at night, mid-way through fixing a bug, you spot a second issue in `src/aut
49
54
 
50
55
  | Mode / Action | What You Input | What the Engine Does | What You See | Best For |
51
56
  | :--- | :--- | :--- | :--- | :--- |
57
+ | **Auto-Todo Checkpoint** | Agent calls `todo` (`2/5` done, then you quit or `/new`) | Mirrors unfinished `todo` snapshot + modified files + `sessionFile`; auto-clears at `5/5` | Next session shows: `⌖ #1 [■■□□ 2/5] Switch token ▸ Add tests (↪)` | Never losing unfinished `todo` lists across terminal restarts |
52
58
  | **Stick a Note (0ms)** | Type `pin: Fix auth in src/auth.ts` or `/pin ...` | Intercepts via input hook in `0ms`, extracts file paths, and links current `sessionFile` | 1-line strip appears below editor: `⌖ #1 Fix auth (app · auth.ts ↪)` | Capturing a tangent without derailing the current prompt |
53
59
  | **Track Multi-Step Work** | Type `/pin Refactor: 1. API 2. Cookie 3. Tests` then `/step 1` | Parses step list and increments `done / total` counter in `~/.anchor/state.json` | Strip updates in place: `⌖ #1 [■■□□ 2/3] Refactor ▸ Tests` | Multi-session features and long-running study goals |
54
- | **Resume Context (`↪`)** | Run `/anchor` ➔ select `↪ Jump to session` (or `/anchor jump 1`) | Invokes Pi's native `ctx.switchSession(note.sessionFile)` | Terminal switches directly back to the original conversation transcript | Picking up a complex task days later with full history |
60
+ | **Resume Context (`/back`)** | Run `/back` (or `/anchor` ➔ `↪ Jump to session`) | Invokes Pi's native `ctx.switchSession(note.sessionFile)` | Terminal switches directly back to the original conversation transcript | Picking up a complex task days later with full history |
55
61
  | **Auto-Tear on Commit** | Commit code (`git commit -m "feat: fix auth"`) or run `/done 1` | Matches commit message against active notes (filtering generic stop-words) | Note archives to `archive.jsonl`; strip clears (`⌖ Auto-torn off #1`) | Keeping the sticky strip clean without manual bookkeeping |
56
62
 
57
63
  ---
@@ -90,7 +96,7 @@ All state lives in `~/.anchor/` outside your git repository:
90
96
  | **Pi Slash** | `/pin <note>` | Stick a note (supports `[1/4]` or `1. A 2. B 3. C` steps) |
91
97
  | **Pi Slash** | `/anchor` | Open interactive sticky note board (tear off, `+1` step, `↪` jump to session, or read details) |
92
98
  | **Pi Slash** | `/step 1` | Advance progress bar on note `#1` by `+1` |
93
- | **Pi Slash** | `/anchor jump 1` | Switch Pi back to the conversation session linked to note `#1` |
99
+ | **Pi Slash** | `/back` (or `/anchor jump 1`) | Teleport Pi back to the conversation session of the latest unfinished note/todo checkpoint |
94
100
  | **Pi Slash** | `/done 1` / `/anchor 1` | Tear off note `#1` and archive it |
95
101
  | **Pi Slash** | `/anchor undo` | Put back the most recently torn-off note |
96
102
  | **Terminal CLI** | `anchor` / `anchor "<note>"` | View or stick notes from any shell outside Pi |
@@ -111,7 +117,7 @@ In `v0.4` and `v0.5`, I threw away 60% of the codebase and rebuilt Anchor around
111
117
 
112
118
  ```bash
113
119
  npm run typecheck # Strict tsc --noEmit check (0 errors)
114
- npm test # Native Node test runner (10/10 passing)
120
+ npm test # Native Node test runner (15/15 passing)
115
121
  npm run build # Dual ESM/CJS compilation via tsup + declaration emit
116
122
  ```
117
123
 
package/README_zh.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # ⌖ Anchor
2
2
 
3
- > **贴在 Pi 输入框正下方的电子便签 —— `便签: ...` 0ms 瞬贴上屏、长线任务迷你进度条 `[■■□□ 2/4]`、一键切回原对话上下文 (`↪`),`git commit` 提交代码自动撕便签。**
3
+ > **贴在 Pi 输入框正下方的跨会话电子便签与 `todo` 自动存档点 —— 关终端自动接管未完 `todo` 进度 `[■■□□ 2/5]`,敲 `便签: ...` 0ms 瞬贴支线灵感,敲 `/back` 一键穿越回原对话,`git commit` 自动撕便签。**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/pi-anchor?color=blue)](https://www.npmjs.com/package/pi-anchor)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/pi-anchor?color=22c55e&label=downloads)](https://www.npmjs.com/package/pi-anchor)
7
7
  [![GitHub stars](https://img.shields.io/github/stars/3ZEROS12/anchor?style=flat&color=f59e0b)](https://github.com/3ZEROS12/anchor/stargazers)
8
8
  [![CI 状态](https://github.com/3ZEROS12/anchor/actions/workflows/ci.yml/badge.svg)](https://github.com/3ZEROS12/anchor/actions/workflows/ci.yml)
9
- [![Tests: 10 Passed](https://img.shields.io/badge/Tests-10%20通过-22c55e.svg)](tests/store.test.ts)
9
+ [![Tests: 15 Passed](https://img.shields.io/badge/Tests-15%20通过-22c55e.svg)](tests/store.test.ts)
10
10
  [![开源协议: MIT](https://img.shields.io/badge/开源协议-MIT-f97316.svg)](LICENSE)
11
11
 
12
- [English](./README.md) | [日本語](./README_ja.md) | **简体中文**
12
+ [English](./README.md) | **简体中文**
13
13
 
14
14
  ```bash
15
15
  pi install npm:pi-anchor
@@ -22,9 +22,14 @@ pi install npm:pi-anchor
22
22
  ```text
23
23
  ┌─ [输入框上方 aboveEditor 完全留给 pi-lingual 等插件,上下零冲突] ─────────────┐
24
24
  ╭─┴─ Pi 输入框 ────────────────────────────────────────────────────────────────────╮
25
- │ ❯ 便签: 重构登录鉴权流: 1. 抽出接口 2. 替换Cookie 3. 补单测 4. 压测 │
25
+ │ ❯ 便签: 重构鉴权流: 1. 抽出接口 2. 替换HttpOnly Cookie 3. 补齐集成单测 │
26
26
  ╰─┬────────────────────────────────────────────────────────────────────────────────╯
27
- └─► ⌖ #1 [■■□□ 2/4] 重构登录鉴权流 ▸ 补单测 (app · auth.ts ↪)
27
+ ├─► ⌖ #1 [■□□□ 1/3] 重构鉴权流 (app · auth.ts ↪) [Alt+A 折叠]
28
+ │ ├─ ✓ 1. 抽出接口 (删除线,下一轮自动收起)
29
+ │ ├─ ◐ 2. 替换HttpOnly Cookie (editing auth.ts)
30
+ │ ├─ ○ 3. 补齐集成单测 ⛓ #2
31
+ │ └─ 📌 #2 检查网关超时降级重试 (3h ago)
32
+ └─► (按 Alt+A 一键折叠为 1 行): ⌖ #1 [■□□□ 1/3] 重构鉴权流 ▸ 替换Cookie (auth.ts ↪)
28
33
  ```
29
34
 
30
35
  ---
@@ -37,11 +42,11 @@ pi install npm:pi-anchor
37
42
  2. **`TODO.md` 弄脏 Git 且每轮白烧 Token**:在项目根目录维护待办文件,既制造杂乱的 Git 修改记录,又在每一轮对话里反复把旧清单塞进系统提示词。
38
43
  3. **开局闪现横幅一打字就消失**:普通插件只在打开终端时闪一下提示,你发完第一句话它就自我隐藏。接下来两个小时写代码,除非专门敲命令查询,否则根本看不见自己记了什么。
39
44
 
40
- **Anchor 的定位很单纯:贴在 Pi 输入框下边框的一张电子便签**:
41
- - **输入框正下方常驻 1 行 (`belowEditor`)**:便签条固定在输入框下沿,写代码时抬眼可见;输入框上方空间完全留给 `pi-lingual` 等插件;没有便签时自动收起为 0 行。
42
- - **自己随手敲,0ms 瞬贴 (`便签: ...`)**:直接在输入框敲 `便签: 检查网关超时重试`(或 `pin: ...`、`/pin ...`),输入钩子在 `0.00ms` 内直接拦截上屏,不调用大模型、不耗费 1 个 Token,并自动关联当前刚修改过的代码文件。
43
- - **长线任务迷你进度条 (`[■■□□ 2/4]`)**:在便签里写 `[2/4]` 或分步序号 `1. 抽出接口 2. 替换Cookie 3. 补单测`,便签条自动显示 4 格进度条与下一步提示。
44
- - **原对话一键穿越 (`↪ Jump to session`)**:每张便签自动记录创建或施工时的会话文件路径(`sessionFile`)。在 `/anchor` 面板中点击 `↪ Jump to session`,直接切回当时那场对话。
45
+ **Anchor 与单次对话内的 `todo` 形成了天然互补:它是贴在输入框下沿的「跨会话自动存档点 + 随手便签」**:
46
+ - **自动接管未完 `todo`(Auto-Todo Bridge)**:现有的 `todo` 工具(如 `@juicesharp/rpiv-todo` 与内置 `todo`)只存在于单次对话分支中、不写磁盘,一旦关掉终端或敲 `/new` 开启新会话,没跑完的 `todo` 清单就会全部清空。Anchor 会自动监听 `todo` 进度,把未走完的步骤(如 `[■■□□ 2/5]`)与当前修改的文件自动存为跨会话断点;当同一会话内 `todo` 全部完成(`5/5`)时又会自动清理,全程零手动操作。
47
+ - **输入框正下方常驻 1 行 (`belowEditor`)**:便签条固定在输入框下沿,写代码时抬眼可见;输入框上方空间完全留给 `pi-lingual` 与 `rpiv-todo`;没有便签时自动收起为 0 行。
48
+ - **自己随手敲,0ms 瞬贴 (`便签: ...`)**:直接在输入框敲 `便签: 检查网关超时重试`(或 `pin: ...`、`/pin ...`),输入钩子在 `0.00ms` 内直接拦截上屏,不调用大模型、不耗费 1 个 Token。
49
+ - **原对话一键穿越 (`/back` & `↪ Jump to session`)**:每张便签与自动断点都会记录当时的会话文件路径(`sessionFile`)。敲一句 `/back`(或在 `/anchor` 面板中点击 `↪ Jump to session`),直接切回当时那场对话。
45
50
 
46
51
  ---
47
52
 
@@ -49,9 +54,10 @@ pi install npm:pi-anchor
49
54
 
50
55
  | 操作场景 | 你的输入 | 后台执行逻辑 | 界面即时反馈 | 适用时刻 |
51
56
  | :--- | :--- | :--- | :--- | :--- |
57
+ | **未完 `todo` 自动存档** | AI 调用 `todo` 做到 `2/5` 时你关掉终端或敲 `/new` | 自动同步未完 `todo` 步骤、已改文件与 `sessionFile`;若做到 `5/5` 则自动销毁 | 下次打开终端直接显示:`⌖ #1 [■■□□ 2/5] 替换Cookie ▸ 补单测 (↪)` | 弥补单会话 `todo` 关窗即失忆的短板,实现零操作跨会话续传 |
52
58
  | **0ms 随手贴便签** | 输入框敲 `便签: 把 src/auth.ts 改用 Cookie` | `input` 钩子 0ms 拦截,提取文件路径并记录当前 `sessionFile` | 输入框下方立即浮现:`⌖ #1 把 src/auth.ts 改用 Cookie (app · auth.ts ↪)` | 改代码中途冒出支线念头,不想打断当前对话 |
53
59
  | **分步推进长任务** | 敲 `/pin 重构: 1. 接口 2. Cookie 3. 单测` 后敲 `/step 1` | 解析分步列表并在 `~/.anchor/state.json` 推进完成步数 | 下方便签条实时变为:`⌖ #1 [■■□□ 2/3] 重构 ▸ 单测` | 跨天重构、分步排障或刷课程章节 |
54
- | **切回原对话 (`↪`)** | 敲 `/anchor` 选中便签点 `↪ Jump to session`(或 `/anchor jump 1`) | 调用 Pi 原生 `ctx.switchSession(note.sessionFile)` | 终端直接切回贴这张便签时的完整历史对话上下文 | 隔了几天回来继续施工,需要找回当时的讨论细节 |
60
+ | **切回原对话 (`/back`)** | 敲 `/back`(或 `/anchor` 选中便签点 `↪ Jump to session`) | 调用 Pi 原生 `ctx.switchSession(note.sessionFile)` | 终端直接切回贴这张便签时的完整历史对话上下文 | 隔了几天回来继续施工,需要找回当时的讨论细节 |
55
61
  | **提交代码自动撕** | 执行 `git commit -m "feat: 登录改用 Cookie"` 或敲 `/done 1` | 过滤通用停用词后比对提交信息与便签关键词 | 便签自动归档至 `archive.jsonl`,下方便签条同步消失 | 写完代码顺手提交,免去手动打勾销账 |
56
62
 
57
63
  ---
@@ -90,7 +96,7 @@ Anchor 显式指定 `{ placement: "belowEditor" }` 挂载在输入框下方,
90
96
  | **Pi 斜杠命令** | `/pin <内容>` | 贴一张新便签(支持写 `[1/4]` 或 `1. A 2. B 3. C` 自动生成进度条) |
91
97
  | **Pi 斜杠命令** | `/anchor` | 打开交互面板(回车可撕便签、推进度 `+1`、`↪` 切回原对话 Session、看详情) |
92
98
  | **Pi 斜杠命令** | `/step 1` | 将 `#1` 便签的进度条往前推进 `+1` 步 |
93
- | **Pi 斜杠命令** | `/anchor jump 1` | 直接切换回 `#1` 便签绑定的那场历史对话 (`switchSession`) |
99
+ | **Pi 斜杠命令** | `/back`(或 `/anchor jump 1`) | 一键切换回最近一条未完成便签/`todo` 断点对应的历史对话 (`switchSession`) |
94
100
  | **Pi 斜杠命令** | `/done 1` / `/anchor 1` | 按编号 `#1` 直接撕下便签并归档 |
95
101
  | **Pi 斜杠命令** | `/anchor undo` | 把刚刚撕下的便签重新贴回原位 |
96
102
  | **系统命令行** | `anchor` / `anchor "<内容>"` | 不进 Pi 也能在外部终端查看或贴便签 |
@@ -111,7 +117,7 @@ Anchor 显式指定 `{ placement: "belowEditor" }` 挂载在输入框下方,
111
117
 
112
118
  ```bash
113
119
  npm run typecheck # TypeScript 严格类型检查 (0 错误)
114
- npm test # 原生 Node 测试运行器 (10/10 全绿通过)
120
+ npm test # 原生 Node 测试运行器 (15/15 全绿通过)
115
121
  npm run build # tsup 双格式打包与类型声明生成
116
122
  ```
117
123
 
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 840 410" width="840" height="410">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 840 420" width="840" height="420">
2
2
  <defs>
3
3
  <filter id="shadow" x="-5%" y="-5%" width="110%" height="115%" filterUnits="userSpaceOnUse">
4
4
  <feDropShadow dx="0" dy="12" stdDeviation="16" flood-color="#000000" flood-opacity="0.45" />
@@ -10,79 +10,82 @@
10
10
  </defs>
11
11
 
12
12
  <g filter="url(#shadow)">
13
- <rect x="20" y="15" width="800" height="370" rx="12" fill="#1e2326" stroke="#343f44" stroke-width="1.2" />
13
+ <rect x="20" y="15" width="800" height="385" rx="12" fill="#1e2326" stroke="#343f44" stroke-width="1.2" />
14
14
  <path d="M 20,27 A 12,12 0 0,1 32,15 L 808,15 A 12,12 0 0,1 820,27 L 820,52 L 20,52 Z" fill="url(#headerGrad)" stroke="#343f44" stroke-width="1" />
15
15
  <line x1="20" y1="52" x2="820" y2="52" stroke="#2d353b" stroke-width="1" />
16
16
  <circle cx="42" cy="33.5" r="5.5" fill="#e67e80" />
17
17
  <circle cx="60" cy="33.5" r="5.5" fill="#dbbc7f" />
18
18
  <circle cx="78" cy="33.5" r="5.5" fill="#a7c080" />
19
19
  <text x="420" y="38" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="12" font-weight="500" fill="#859289">
20
- ⌖ anchor (v0.5.0) · Below-Editor Sticky Strip · Progress Bar · Session Teleport
20
+ ⌖ anchor v1.0 · Cross-Session Todo Dock · Below-Editor Tree Overlay · Session Teleport
21
21
  </text>
22
22
  </g>
23
23
 
24
24
  <g font-family="'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace" font-size="13" xml:space="preserve">
25
- <text x="45" y="84">
26
- <tspan fill="#7fbbb3" font-weight="bold">⌖ Notes (3):</tspan>
25
+ <!-- Simulated Pi Input Box -->
26
+ <rect x="45" y="72" width="750" height="42" rx="6" fill="#232a2e" stroke="#4f5b58" stroke-width="1.2" />
27
+ <text x="62" y="98">
28
+ <tspan fill="#a7c080" font-weight="bold">❯ </tspan>
29
+ <tspan fill="#d3c6aa">pin: Refactor auth: 1. Extract interface 2. HttpOnly cookie 3. Add tests</tspan>
27
30
  </text>
28
31
 
29
- <text x="45" y="116">
30
- <tspan fill="#859289"> 01 </tspan>
31
- <tspan fill="#a7c080" font-weight="bold">[■■□□ 2/4] </tspan>
32
- <tspan fill="#d3c6aa">Refactor auth flow </tspan>
33
- <tspan fill="#7fbbb3">app · auth.ts ↪ </tspan>
34
- <tspan fill="#7a8478">25m ago</tspan>
32
+ <!-- Below-Editor Expanded Tree Dock -->
33
+ <rect x="45" y="124" width="750" height="142" rx="8" fill="#232a2e" stroke="#a7c080" stroke-width="1" />
34
+ <text x="62" y="149">
35
+ <tspan fill="#a7c080" font-weight="bold">⌖ </tspan>
36
+ <tspan fill="#859289">#1 </tspan>
37
+ <tspan fill="#dbbc7f" font-weight="bold">[■□□□ 1/3] </tspan>
38
+ <tspan fill="#d3c6aa" font-weight="bold">Refactor auth </tspan>
39
+ <tspan fill="#7fbbb3">(app · auth.ts ↪)</tspan>
40
+ <tspan fill="#56635f"> [Alt+A fold]</tspan>
35
41
  </text>
36
-
37
- <text x="45" y="144">
38
- <tspan fill="#859289"> 02 </tspan>
39
- <tspan fill="#d3c6aa">Double-check rate limit fallback on timeout </tspan>
40
- <tspan fill="#7fbbb3">app · gateway.ts ↪ </tspan>
41
- <tspan fill="#7a8478">3h ago</tspan>
42
+ <text x="62" y="175">
43
+ <tspan fill="#56635f">├─ </tspan>
44
+ <tspan fill="#a7c080">✓ </tspan>
45
+ <tspan fill="#7a8478">1. </tspan>
46
+ <tspan fill="#7a8478" text-decoration="line-through">Extract auth interface</tspan>
42
47
  </text>
43
-
44
- <text x="45" y="172">
45
- <tspan fill="#859289"> 03 </tspan>
46
- <tspan fill="#859289">Read external architecture notes first </tspan>
47
- <tspan fill="#7a8478">College/优化 · notes.md </tspan>
48
- <tspan fill="#56635f">8d ago · quiet</tspan>
48
+ <text x="62" y="201">
49
+ <tspan fill="#56635f">├─ </tspan>
50
+ <tspan fill="#dbbc7f">◐ </tspan>
51
+ <tspan fill="#7a8478">2. </tspan>
52
+ <tspan fill="#a7c080" font-weight="bold">Switch token to HttpOnly cookie </tspan>
53
+ <tspan fill="#859289">(editing auth.ts)</tspan>
49
54
  </text>
50
-
51
- <!-- Simulated Pi Input Box + Below-Editor Persistent Sticky Strip -->
52
- <rect x="45" y="204" width="750" height="44" rx="6" fill="#232a2e" stroke="#4f5b58" stroke-width="1.2" />
53
- <text x="62" y="231">
54
- <tspan fill="#a7c080" font-weight="bold">❯ </tspan>
55
- <tspan fill="#d3c6aa">pin: Refactor auth flow: 1. Extract interface 2. HttpOnly cookie 3. Unit tests</tspan>
55
+ <text x="62" y="227">
56
+ <tspan fill="#56635f">├─ </tspan>
57
+ <tspan fill="#7a8478">○ 3. </tspan>
58
+ <tspan fill="#d3c6aa">Add integration tests </tspan>
59
+ <tspan fill="#859289">⛓ #2</tspan>
60
+ </text>
61
+ <text x="62" y="251">
62
+ <tspan fill="#56635f">└─ </tspan>
63
+ <tspan fill="#7a8478">+1 done │ 📌 #2 Check gateway timeout fallback (3h ago)</tspan>
56
64
  </text>
57
65
 
58
- <!-- Below-Editor Sticky Strip -->
59
- <rect x="45" y="256" width="750" height="36" rx="6" fill="#292b28" stroke="#a7c080" stroke-width="1" stroke-dasharray="4,3" />
60
- <text x="62" y="279">
66
+ <!-- Collapsed 1-Line Mode Preview -->
67
+ <text x="45" y="294" fill="#859289" font-size="12">Press `Alt+A` (or `/anchor fold`) to collapse into a 1-line strip:</text>
68
+ <rect x="45" y="304" width="750" height="34" rx="6" fill="#292b28" stroke="#3a464c" stroke-width="1" />
69
+ <text x="62" y="326">
61
70
  <tspan fill="#a7c080" font-weight="bold">⌖ </tspan>
62
71
  <tspan fill="#859289">#1 </tspan>
63
- <tspan fill="#dbbc7f" font-weight="bold">[■■□□ 2/4] </tspan>
64
- <tspan fill="#d3c6aa">Refactor auth flow </tspan>
72
+ <tspan fill="#dbbc7f" font-weight="bold">[■□□□ 1/3] </tspan>
73
+ <tspan fill="#d3c6aa">Refactor auth </tspan>
65
74
  <tspan fill="#7fbbb3">▸ HttpOnly cookie </tspan>
66
- <tspan fill="#859289">(app · auth.ts ↪)</tspan>
75
+ <tspan fill="#859289">(editing auth.ts) (app · auth.ts ↪)</tspan>
67
76
  </text>
68
77
 
69
- <text x="45" y="324" fill="#859289">
70
- <tspan> • </tspan>
71
- <tspan fill="#d3c6aa" font-weight="bold">0ms Instant Stick</tspan>
72
- <tspan>: Type </tspan>
73
- <tspan fill="#7fbbb3">`pin: &lt;note&gt;`</tspan>
74
- <tspan> (or </tspan>
75
- <tspan fill="#7fbbb3">`/pin`</tspan>
76
- <tspan>) — docked below editor, never collides with aboveEditor HUDs.</tspan>
77
- </text>
78
- <text x="45" y="348" fill="#859289">
79
- <tspan> • </tspan>
80
- <tspan fill="#d3c6aa" font-weight="bold">Session Teleport (↪)</tspan>
81
- <tspan>: Select any note in </tspan>
82
- <tspan fill="#7fbbb3">`/anchor`</tspan>
83
- <tspan> or run </tspan>
84
- <tspan fill="#7fbbb3">`/anchor jump 1`</tspan>
85
- <tspan> to resume its conversation.</tspan>
78
+ <text x="45" y="370" fill="#7a8478">
79
+ <tspan> Commands: </tspan>
80
+ <tspan fill="#7fbbb3" font-weight="bold">`pin: &lt;note&gt;`</tspan>
81
+ <tspan> · </tspan>
82
+ <tspan fill="#7fbbb3" font-weight="bold">`/anchor`</tspan>
83
+ <tspan> · </tspan>
84
+ <tspan fill="#7fbbb3" font-weight="bold">`/step 1`</tspan>
85
+ <tspan> · </tspan>
86
+ <tspan fill="#7fbbb3" font-weight="bold">`/back`</tspan>
87
+ <tspan> (resume session ↪) · </tspan>
88
+ <tspan fill="#7fbbb3" font-weight="bold">`/done 1`</tspan>
86
89
  </text>
87
90
  </g>
88
91
  </svg>
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 840 410" width="840" height="410">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 840 420" width="840" height="420">
2
2
  <defs>
3
3
  <filter id="shadow" x="-5%" y="-5%" width="110%" height="115%" filterUnits="userSpaceOnUse">
4
4
  <feDropShadow dx="0" dy="12" stdDeviation="16" flood-color="#000000" flood-opacity="0.45" />
@@ -10,79 +10,82 @@
10
10
  </defs>
11
11
 
12
12
  <g filter="url(#shadow)">
13
- <rect x="20" y="15" width="800" height="370" rx="12" fill="#1e2326" stroke="#343f44" stroke-width="1.2" />
13
+ <rect x="20" y="15" width="800" height="385" rx="12" fill="#1e2326" stroke="#343f44" stroke-width="1.2" />
14
14
  <path d="M 20,27 A 12,12 0 0,1 32,15 L 808,15 A 12,12 0 0,1 820,27 L 820,52 L 20,52 Z" fill="url(#headerGrad)" stroke="#343f44" stroke-width="1" />
15
15
  <line x1="20" y1="52" x2="820" y2="52" stroke="#2d353b" stroke-width="1" />
16
16
  <circle cx="42" cy="33.5" r="5.5" fill="#e67e80" />
17
17
  <circle cx="60" cy="33.5" r="5.5" fill="#dbbc7f" />
18
18
  <circle cx="78" cy="33.5" r="5.5" fill="#a7c080" />
19
19
  <text x="420" y="38" text-anchor="middle" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" font-size="12" font-weight="500" fill="#859289">
20
- ⌖ anchor (v0.5.0) · 输入框下方常驻便签条 · 迷你进度条 · 原对话一键穿越
20
+ ⌖ anchor v1.0 · 跨会话 Todo 施工坞 · 输入框下方树状进度面板 · 原对话一键穿越
21
21
  </text>
22
22
  </g>
23
23
 
24
24
  <g font-family="'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace" font-size="13" xml:space="preserve">
25
- <text x="45" y="84">
26
- <tspan fill="#7fbbb3" font-weight="bold">⌖ Notes (3):</tspan>
25
+ <!-- Simulated Pi Input Box -->
26
+ <rect x="45" y="72" width="750" height="42" rx="6" fill="#232a2e" stroke="#4f5b58" stroke-width="1.2" />
27
+ <text x="62" y="98">
28
+ <tspan fill="#a7c080" font-weight="bold">❯ </tspan>
29
+ <tspan fill="#d3c6aa">便签: 重构鉴权流: 1. 抽出接口 2. 替换HttpOnly Cookie 3. 补齐集成单测</tspan>
27
30
  </text>
28
31
 
29
- <text x="45" y="116">
30
- <tspan fill="#859289"> 01 </tspan>
31
- <tspan fill="#a7c080" font-weight="bold">[■■□□ 2/4] </tspan>
32
- <tspan fill="#d3c6aa">重构登录鉴权流 </tspan>
33
- <tspan fill="#7fbbb3">app · auth.ts ↪ </tspan>
34
- <tspan fill="#7a8478">25m ago</tspan>
32
+ <!-- Below-Editor Expanded Tree Dock -->
33
+ <rect x="45" y="124" width="750" height="142" rx="8" fill="#232a2e" stroke="#a7c080" stroke-width="1" />
34
+ <text x="62" y="149">
35
+ <tspan fill="#a7c080" font-weight="bold">⌖ </tspan>
36
+ <tspan fill="#859289">#1 </tspan>
37
+ <tspan fill="#dbbc7f" font-weight="bold">[■□□□ 1/3] </tspan>
38
+ <tspan fill="#d3c6aa" font-weight="bold">重构鉴权流 </tspan>
39
+ <tspan fill="#7fbbb3">(app · auth.ts ↪)</tspan>
40
+ <tspan fill="#56635f"> [Alt+A 折叠]</tspan>
35
41
  </text>
36
-
37
- <text x="45" y="144">
38
- <tspan fill="#859289"> 02 </tspan>
39
- <tspan fill="#d3c6aa">检查网关超时后的降级重试边界 </tspan>
40
- <tspan fill="#7fbbb3">app · gateway.ts ↪ </tspan>
41
- <tspan fill="#7a8478">3h ago</tspan>
42
+ <text x="62" y="175">
43
+ <tspan fill="#56635f">├─ </tspan>
44
+ <tspan fill="#a7c080">✓ </tspan>
45
+ <tspan fill="#7a8478">1. </tspan>
46
+ <tspan fill="#7a8478" text-decoration="line-through">抽出接口</tspan>
42
47
  </text>
43
-
44
- <text x="45" y="172">
45
- <tspan fill="#859289"> 03 </tspan>
46
- <tspan fill="#859289">College 重构前置查阅外部架构参考库 </tspan>
47
- <tspan fill="#7a8478">College/优化 · notes.md </tspan>
48
- <tspan fill="#56635f">8d ago · quiet</tspan>
48
+ <text x="62" y="201">
49
+ <tspan fill="#56635f">├─ </tspan>
50
+ <tspan fill="#dbbc7f">◐ </tspan>
51
+ <tspan fill="#7a8478">2. </tspan>
52
+ <tspan fill="#a7c080" font-weight="bold">替换HttpOnly Cookie </tspan>
53
+ <tspan fill="#859289">(editing auth.ts)</tspan>
49
54
  </text>
50
-
51
- <!-- Simulated Pi Input Box + Below-Editor Persistent Sticky Strip -->
52
- <rect x="45" y="204" width="750" height="44" rx="6" fill="#232a2e" stroke="#4f5b58" stroke-width="1.2" />
53
- <text x="62" y="231">
54
- <tspan fill="#a7c080" font-weight="bold">❯ </tspan>
55
- <tspan fill="#d3c6aa">便签: 重构登录鉴权流: 1. 抽出接口 2. 替换Cookie 3. 补单测 4. 压测</tspan>
55
+ <text x="62" y="227">
56
+ <tspan fill="#56635f">├─ </tspan>
57
+ <tspan fill="#7a8478">○ 3. </tspan>
58
+ <tspan fill="#d3c6aa">补齐集成单测 </tspan>
59
+ <tspan fill="#859289">⛓ #2</tspan>
60
+ </text>
61
+ <text x="62" y="251">
62
+ <tspan fill="#56635f">└─ </tspan>
63
+ <tspan fill="#7a8478">+1 已完成 │ 📌 #2 检查网关超时降级重试 (3h ago)</tspan>
56
64
  </text>
57
65
 
58
- <!-- Below-Editor Sticky Strip -->
59
- <rect x="45" y="256" width="750" height="36" rx="6" fill="#292b28" stroke="#a7c080" stroke-width="1" stroke-dasharray="4,3" />
60
- <text x="62" y="279">
66
+ <!-- Collapsed 1-Line Mode Preview -->
67
+ <text x="45" y="294" fill="#859289" font-size="12">按 `Alt+A`(或 `/anchor fold`)随时一键折叠为 1 行极简便签条:</text>
68
+ <rect x="45" y="304" width="750" height="34" rx="6" fill="#292b28" stroke="#3a464c" stroke-width="1" />
69
+ <text x="62" y="326">
61
70
  <tspan fill="#a7c080" font-weight="bold">⌖ </tspan>
62
71
  <tspan fill="#859289">#1 </tspan>
63
- <tspan fill="#dbbc7f" font-weight="bold">[■■□□ 2/4] </tspan>
64
- <tspan fill="#d3c6aa">重构登录鉴权流 </tspan>
65
- <tspan fill="#7fbbb3">▸ 补单测 </tspan>
66
- <tspan fill="#859289">(app · auth.ts ↪)</tspan>
72
+ <tspan fill="#dbbc7f" font-weight="bold">[■□□□ 1/3] </tspan>
73
+ <tspan fill="#d3c6aa">重构鉴权流 </tspan>
74
+ <tspan fill="#7fbbb3">▸ 替换HttpOnly Cookie </tspan>
75
+ <tspan fill="#859289">(editing auth.ts) (app · auth.ts ↪)</tspan>
67
76
  </text>
68
77
 
69
- <text x="45" y="324" fill="#859289">
70
- <tspan> • </tspan>
71
- <tspan fill="#d3c6aa" font-weight="bold">输入框下方常驻 1 行便签条</tspan>
72
- <tspan>:采用 </tspan>
73
- <tspan fill="#7fbbb3">belowEditor</tspan>
74
- <tspan> 挂载,与上方 </tspan>
75
- <tspan fill="#7fbbb3">pi-lingual</tspan>
76
- <tspan> 零冲突;敲 </tspan>
77
- <tspan fill="#7fbbb3">便签: ...</tspan>
78
- <tspan> 0ms 瞬贴。</tspan>
79
- </text>
80
- <text x="45" y="348" fill="#859289">
81
- <tspan> • </tspan>
82
- <tspan fill="#d3c6aa" font-weight="bold">原对话一键穿越 (↪)</tspan>
83
- <tspan>:自动记录贴便签时的 Session,在 </tspan>
84
- <tspan fill="#7fbbb3">/anchor</tspan>
85
- <tspan> 中点击即可直接切回当时的对话上下文。</tspan>
78
+ <text x="45" y="370" fill="#7a8478">
79
+ <tspan> 常用命令: </tspan>
80
+ <tspan fill="#7fbbb3" font-weight="bold">`便签: &lt;内容&gt;`</tspan>
81
+ <tspan> · </tspan>
82
+ <tspan fill="#7fbbb3" font-weight="bold">`/anchor`</tspan>
83
+ <tspan> · </tspan>
84
+ <tspan fill="#7fbbb3" font-weight="bold">`/step 1`</tspan>
85
+ <tspan> · </tspan>
86
+ <tspan fill="#7fbbb3" font-weight="bold">`/back`</tspan>
87
+ <tspan> (切回原对话 ↪) · </tspan>
88
+ <tspan fill="#7fbbb3" font-weight="bold">`/done 1`</tspan>
86
89
  </text>
87
90
  </g>
88
91
  </svg>