pi-path-bar 0.1.0 → 0.3.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/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ ## [0.3.0]
4
+
5
+ - Add an experimental reading mode that hides the editor and footer while keeping conversation and tool output visible. Load it separately with `pi -e ./src/reading-mode.ts`. Use `Alt+Esc` (Option+Esc on Mac) to toggle, or `/reading-mode` to enter. Press `Esc` to restore the interface. Requires fullscreen mode and a compatible terminal.
6
+ - Simplify the English and Chinese READMEs and add SVG previews that display without installing a Nerd Font.
7
+ - Include this changelog so Pi 1.5 and later can show package update notes on startup.
package/README.md CHANGED
@@ -2,60 +2,29 @@
2
2
 
3
3
  English | [简体中文](README.zh-CN.md)
4
4
 
5
- A Pi extension for compact directory paths, folder aliases, and theme-aware Git status.
5
+ A Pi footer extension for compact paths, folder aliases, Git status, and local time. Keeps usage statistics, model information, and other extension status lines.
6
6
 
7
- ```text
8
-  ~/C/P/demo-app ( main)
9
-  Projects/demo-app ( main +2 !1 ?3)
10
-  demo ( main ⇡1)
11
- ```
12
-
13
- ## Features
14
-
15
- - Short, automatic, and full path display modes.
16
- - Display aliases for any folder, without changing actual paths or environment variables.
17
- - Theme-aware alias colors and Tide-style Git status indicators.
18
- - An interactive settings menu with persistent configuration.
19
- - Existing usage statistics, model information, and extension status lines.
20
- - Unicode folder names and aliases.
7
+ ![Path bar examples with compact paths, aliases and Git status](assets/footer-preview.svg)
21
8
 
22
9
  ## Installation
23
10
 
24
- After the first npm release, install from npm:
25
-
26
11
  ```sh
27
12
  pi install npm:pi-path-bar
28
- # Or try it for one run:
29
- pi -e npm:pi-path-bar
30
13
  ```
31
14
 
32
- Before that release, or to use the Git source, install from GitHub:
15
+ Or install from GitHub:
33
16
 
34
17
  ```sh
35
18
  pi install git:github.com/johnbitcn/pi-path-bar
36
19
  ```
37
20
 
38
- Run `/reload` in an existing Pi session, then open `/path-bar`.
39
-
40
- For a single Pi run:
41
-
42
- ```sh
43
- pi -e git:github.com/johnbitcn/pi-path-bar
44
- ```
45
-
46
- For local development, run from the project directory:
21
+ In an existing Pi session, run `/reload`, then `/path-bar` to open settings.
47
22
 
48
- ```sh
49
- pi install "$PWD"
50
- # Or load the extension for one run:
51
- pi -e ./src/index.ts
52
- ```
53
-
54
- Load only one copy of the extension. Remove an existing local or Git installation before switching sources. Folder icons require a Nerd Font; you can turn them off in settings.
23
+ Load only one copy of the extension. Folder icons require a Nerd Font, or you can turn them off in settings.
55
24
 
56
25
  ## Settings
57
26
 
58
- Run `/path-bar`. Use the arrow keys to select an item, Enter or Space to change a setting or open an action, and Esc to exit. Changes apply immediately and are saved automatically.
27
+ Run `/path-bar`. Use the arrow keys to select an item, Enter or Space to change it, and Esc to exit. Changes apply immediately and are saved automatically. The menu uses English.
59
28
 
60
29
  | Setting | Default | Choices |
61
30
  | --- | --- | --- |
@@ -63,126 +32,64 @@ Run `/path-bar`. Use the arrow keys to select an item, Enter or Space to change
63
32
  | Folder icon | On | On, Off |
64
33
  | Git status | On | On, Off |
65
34
  | Session name | On | On, Off |
35
+ | Time format | 24h | 24h, 12h (AM/PM) |
66
36
  | Add folder alias | — | Enter a folder path and a name |
67
37
  | Manage folder aliases | — | Edit or delete aliases |
68
38
 
69
- **Native footer** restores Pi's built-in footer. Other display settings are retained but do not apply in that mode.
70
-
71
- ### Path modes
72
-
73
- - **Short:** always abbreviate intermediate folders to their first grapheme, including Unicode names.
74
- - **Auto:** show the full path when it fits; otherwise abbreviate it.
75
- - **Full:** do not abbreviate; truncate the line if needed.
39
+ - **Short:** abbreviate intermediate folders and keep the final folder name.
40
+ - **Auto:** show the full path when space allows; otherwise abbreviate it.
41
+ - **Full:** do not abbreviate; truncate if needed.
42
+ - **Native footer:** restore Pi's built-in footer without losing your settings.
76
43
 
77
- Short and Auto collapse intermediate folders to `…` when necessary. At very small widths, the root and icon are dropped before the final folder name is truncated.
78
-
79
- The home directory is shown as `~`. Named roots such as `~` and folder aliases receive a folder icon. Absolute paths starting with `/` do not.
44
+ Local time appears at the right of the path line. The home directory is shown as `~`. Unicode folder names are supported.
80
45
 
81
46
  ## Folder aliases
82
47
 
83
- Choose **Add folder alias** to name any folder. Enter an absolute path or a path starting with `~/`. Leave the path blank and press Enter to use the current directory. The target must exist and be a directory.
84
-
85
- For example, name `~/CloudDrive` **Cloud**:
86
-
87
- ```text
88
-  Cloud
89
-  Cloud/P/demo-app
90
- ```
91
-
92
- You can also name `~/CloudDrive/Projects/demo-app` **demo**. Then that folder displays as ` demo`, and its child displays as ` demo/src`.
93
-
94
- ### Matching and editing
48
+ Choose **Add folder alias**, then enter a folder path and a display name. Use an absolute path or `~/`, or leave the path blank for the current directory.
95
49
 
96
- - An alias matches its folder and descendants, at directory boundaries.
97
- - If multiple aliases match, the longest path wins. Parent and child aliases are not combined.
98
- - The alias name remains intact when possible. Descendant folders follow the selected path mode.
99
- - Without a match, the extension uses `~` or an absolute path.
100
- - Paths are normalized and `~` is expanded on save. Symbolic links are not resolved.
101
- - Paths and names must be unique. Names cannot be empty, `~`, `.`, or `..`, or contain slashes, backslashes, newlines, or control characters.
102
- - When editing, leave a field blank to keep its existing value. Esc cancels.
103
- - Deleting an alias does not delete the folder. Stored aliases remain available when a drive is disconnected.
50
+ For example, name `~/CloudDrive/Projects/demo-app` **demo**:
104
51
 
105
- Only the matched alias name uses Pi's `mdLink` theme color: brighter blue in the built-in dark theme and darker blue in the light theme. Custom themes control their own link color. The icon, descendant path, and session name use gray; Git uses its status color. Colors follow theme changes.
52
+ ![Folder alias shown as demo and demo/src](assets/folder-alias-preview.svg)
106
53
 
107
- Aliases affect only the footer. They do not change the working directory, tool paths, or environment variables.
54
+ - An alias applies to its folder and descendants. If several aliases match, the longest path wins.
55
+ - Use **Manage folder aliases** to edit or delete them. Leave a field blank to keep its value; Esc cancels.
56
+ - Aliases change only the display name. Deleting an alias does not delete the folder.
108
57
 
109
58
  ## Git status
110
59
 
111
- Git indicators borrow Tide's notation, but use Pi theme text colors rather than background colors. The extension does not modify fish or Tide.
112
-
113
- | State | Theme token | Built-in appearance |
114
- | --- | --- | --- |
115
- | Initial loading or query failure | `text` | Default text color, with `?` |
116
- | Clean working tree | `mdLink` | Blue |
117
- | Staged, unstaged, or untracked changes | `warning` | Yellow |
118
- | Conflicts or an active Git operation | `error` | Red |
119
-
120
- Red takes priority over yellow, then blue. Outside a Git repository, Git information is hidden. Alias color is independent of Git status.
121
-
122
- ```text
123
-  demo ( main ⇣2 ⇡1 *1 ~2 +3 !4 ?5)
124
- ```
60
+ ![Git status: main, behind 2, ahead 1, stash 1, conflicts 2, staged 3, unstaged 4, untracked 5](assets/git-status-preview.svg)
125
61
 
126
62
  | Indicator | Meaning |
127
63
  | --- | --- |
128
- | `⇣N` | N commits behind upstream |
129
- | `⇡N` | N commits ahead of upstream |
64
+ | `⇣N` / `⇡N` | N commits behind / ahead of upstream |
130
65
  | `*N` | N stash entries |
131
- | `~N` | N conflicted files; covers `DD AU UD UA DU AA UU` |
66
+ | `~N` | N conflicted files |
132
67
  | `+N` | N staged entries |
133
68
  | `!N` | N unstaged entries |
134
69
  | `?N` | N untracked entries |
135
70
 
136
- Zero counts are omitted. Untracked directories are grouped using Git's default behavior. Conflicts are not counted again as staged or unstaged changes. Ahead, behind, and stash counts alone do not change the color. Ahead and behind are omitted if no upstream exists.
137
-
138
- Active operations include merge, rebase, cherry-pick, revert, and bisect. Rebase progress is shown when available. Detached HEAD displays `#tag` or `@short-commit`. Linked worktrees are supported.
139
-
140
- Queries run asynchronously with a timeout. Status refreshes every five seconds, after tool execution or an agent turn, and when the branch changes. Disabling Git status or selecting Native footer stops the extension's queries.
71
+ In the default themes, blue means clean, yellow means changes, and red means conflicts or an active Git operation. Colors follow your theme. Git information is hidden outside a repository.
141
72
 
142
- ## Configuration
73
+ ## Experimental reading mode
143
74
 
144
- Settings are shared across projects and stored in:
75
+ Load reading mode separately from the local repository:
145
76
 
146
- ```text
147
- ~/.pi/agent/pi-path-bar.json
148
- ```
149
-
150
- If `PI_CODING_AGENT_DIR` is set, its directory is used instead. The extension never sets or changes that variable.
151
-
152
- ```json
153
- {
154
- "mode": "short",
155
- "icon": true,
156
- "branch": true,
157
- "session": true,
158
- "aliases": [
159
- { "path": "/home/example/Projects", "name": "Projects" }
160
- ]
161
- }
77
+ ```sh
78
+ pi -e ./src/reading-mode.ts
162
79
  ```
163
80
 
164
- The `branch` field controls Git status. Settings survive restarts and `/reload`. Opening the menu reloads the file. Saves use a temporary file and atomic replacement. Other running Pi instances must reopen the menu or reload to pick up changes.
165
-
166
- If the new file is absent, the extension reads the legacy `pi-show-dir.json`. The next save writes the new file and leaves the old file intact. Invalid configuration is reported and is not overwritten.
167
-
168
- ## Limitations
81
+ - **`Alt+Esc`** (Mac: **`Option+Esc`**): hide the editor and footer. Conversation and tool output remain available for scrolling.
82
+ - **A single `Esc`** or **`Alt+Esc`** again: restore the interface and keep your draft.
83
+ - You can also enter with **`/reading-mode`**.
169
84
 
170
- - Pi's public API replaces the entire footer. If another extension also calls `setFooter()`, the last one wins.
171
- - The public API does not expose the auto-compaction setting, so the custom footer does not show the native `(auto)` marker.
172
- - This is an unofficial Pi extension. It is not affiliated with or endorsed by Pi or Tide.
85
+ Requires fullscreen mode. Shortcut support depends on your terminal; use the command if it does not respond. Run `/reload` after switching TUI modes. Reading mode is experimental and may need updates after a Pi upgrade.
173
86
 
174
- ## Development
175
-
176
- Requires Node.js 22.19 or newer and Git for Git status and integration tests.
177
-
178
- ```sh
179
- npm install --ignore-scripts
180
- npm test
181
- npm run check
182
- ```
87
+ ## Notes
183
88
 
184
- ## License and acknowledgments
89
+ - Settings are shared across projects and saved automatically. The default file is `~/.pi/agent/pi-path-bar.json`.
90
+ - Avoid enabling multiple footer-replacement extensions at once; they can override each other.
91
+ - The custom footer does not show the native `(auto)` marker.
185
92
 
186
- [MIT](LICENSE). See [Third-party notices](THIRD_PARTY_NOTICES.md) for Pi and Tide copyright and license texts. Host packages and font files are not bundled.
93
+ ## License
187
94
 
188
- Maintainers: see the [npm release guide](https://github.com/johnbitcn/pi-path-bar/blob/main/RELEASING.md) for authentication, packaging checks, publishing, and verification.
95
+ [MIT](LICENSE). See [Third-party notices](THIRD_PARTY_NOTICES.md) for related copyright and license texts. This unofficial extension is not affiliated with or endorsed by Pi or Tide.
package/README.zh-CN.md CHANGED
@@ -2,60 +2,29 @@
2
2
 
3
3
  [English](README.md) | 简体中文
4
4
 
5
- Pi 底栏扩展。支持简短路径、目录别名和随主题调整的 Git 状态颜色。
5
+ Pi 底栏扩展。显示简短路径、目录别名、Git 状态和本机时间,保留用量统计、模型信息及其他扩展的状态行。
6
6
 
7
- ```text
8
-  ~/C/P/demo-app ( main)
9
-  Projects/demo-app ( main +2 !1 ?3)
10
-  demo ( main ⇡1)
11
- ```
12
-
13
- ## 功能
14
-
15
- - 简短、自动和完整路径显示模式。
16
- - 为任意文件夹设置显示别名,不改变实际路径或环境变量。
17
- - 随主题调整的别名颜色,以及 Tide 风格的 Git 状态标记。
18
- - 交互式设置菜单,自动保存配置。
19
- - 保留用量统计、模型信息和其他扩展的状态行。
20
- - 支持中文等 Unicode 目录名和别名。
7
+ ![底栏示例:简短路径、目录别名和 Git 状态](assets/footer-preview.svg)
21
8
 
22
9
  ## 安装
23
10
 
24
- 首次发布到 npm 后,可以从 npm 安装:
25
-
26
11
  ```sh
27
12
  pi install npm:pi-path-bar
28
- # 或仅在本次启动中使用:
29
- pi -e npm:pi-path-bar
30
13
  ```
31
14
 
32
- 首次发布前,或需要使用 Git 来源时,从 GitHub 安装:
15
+ 也可从 GitHub 安装:
33
16
 
34
17
  ```sh
35
18
  pi install git:github.com/johnbitcn/pi-path-bar
36
19
  ```
37
20
 
38
- 在已运行的 Pi 中执行 `/reload`,再输入 `/path-bar`。
39
-
40
- 仅在本次启动中使用:
41
-
42
- ```sh
43
- pi -e git:github.com/johnbitcn/pi-path-bar
44
- ```
45
-
46
- 本地开发时,在项目目录执行:
21
+ 在已运行的 Pi 中执行 `/reload`,再输入 `/path-bar` 打开设置。
47
22
 
48
- ```sh
49
- pi install "$PWD"
50
- # 或仅在本次启动中加载扩展:
51
- pi -e ./src/index.ts
52
- ```
53
-
54
- 只加载一份扩展。切换安装来源前,先移除已有的本地或 Git 安装。目录图标需要 Nerd Font;也可在设置中关闭图标。
23
+ 只加载一份扩展。目录图标需要 Nerd Font,也可在设置中关闭。
55
24
 
56
25
  ## 设置
57
26
 
58
- 执行 `/path-bar`。上下键选择,Enter 或空格切换设置或打开操作,Esc 退出。修改立即生效,并自动保存。扩展界面使用英文。
27
+ 执行 `/path-bar`。上下键选择,Enter 或空格修改,Esc 退出。修改立即生效并自动保存。设置菜单使用英文。
59
28
 
60
29
  | 设置项 | 默认值 | 可选值 |
61
30
  | --- | --- | --- |
@@ -63,126 +32,64 @@ pi -e ./src/index.ts
63
32
  | Folder icon(目录图标) | On | On、Off |
64
33
  | Git status(Git 状态) | On | On、Off |
65
34
  | Session name(会话名称) | On | On、Off |
35
+ | Time format(时间格式) | 24h | 24h、12h(带 AM/PM) |
66
36
  | Add folder alias(添加目录别名) | — | 输入文件夹路径和名称 |
67
37
  | Manage folder aliases(管理目录别名) | — | 修改或删除别名 |
68
38
 
69
- **Native footer** 恢复 Pi 原生底栏。其他显示设置会保留,但在该模式下不生效。
70
-
71
- ### 路径显示模式
72
-
73
- - **Short:**始终将中间目录缩写为首个字素,支持中文等 Unicode 名称。
74
- - **Auto:**宽度足够时显示完整路径,否则缩写。
39
+ - **Short:**缩写中间目录,保留最后一级目录名。
40
+ - **Auto:**空间足够时显示完整路径,否则缩写。
75
41
  - **Full:**不缩写,超出宽度时截断。
42
+ - **Native footer:**恢复 Pi 原生底栏,保留已有设置。
76
43
 
77
- Short 和 Auto 在宽度不足时将中间目录折叠为 `…`。极窄时,先省略起点与图标,再截断最后一级目录名。
78
-
79
- 主目录显示为 `~`。`~` 和目录别名等命名起点前显示目录图标。以 `/` 开头的绝对路径不显示图标。
44
+ 时间显示在路径行右侧,使用本机时区。主目录显示为 `~`,支持中文目录名。
80
45
 
81
46
  ## 目录别名
82
47
 
83
- 选择 **Add folder alias**,可以给任意文件夹命名。输入绝对路径或 `~/` 开头的路径。路径留空直接按 Enter,则使用当前目录。目标必须存在且为文件夹。
84
-
85
- 例如,将 `~/CloudDrive` 命名为 **Cloud**:
86
-
87
- ```text
88
-  Cloud
89
-  Cloud/P/demo-app
90
- ```
91
-
92
- 也可以将 `~/CloudDrive/Projects/demo-app` 命名为 **demo**。该目录显示为 ` demo`,其子目录显示为 ` demo/src`。
93
-
94
- ### 匹配和编辑规则
48
+ 选择 **Add folder alias**,输入文件夹路径和显示名称。支持绝对路径和 `~/`;路径留空则使用当前目录。
95
49
 
96
- - 别名匹配该目录及其子目录,按目录边界匹配。
97
- - 多个别名同时匹配时,使用最长路径。父级和子级别名不会叠加。
98
- - 宽度允许时保留完整别名。其后的目录按所选模式处理。
99
- - 没有匹配时,使用 `~` 或绝对路径。
100
- - 保存时规范化路径并展开 `~`,但不解析符号链接。
101
- - 路径和名称不能重复。名称不能为空、`~`、`.` 或 `..`,不能包含斜杠、反斜杠、换行或控制字符。
102
- - 修改时,字段留空表示保留原值。Esc 取消。
103
- - 删除别名不会删除实际文件夹。磁盘暂时离线时,已有别名仍会保留。
50
+ 例如,将 `~/CloudDrive/Projects/demo-app` 命名为 **demo**:
104
51
 
105
- 仅命中的别名名称使用 Pi 主题的 `mdLink` 色。内置暗色主题使用较亮的蓝色,亮色主题使用较深的蓝色。自定义主题以其链接色为准。图标、子目录和会话名使用灰色;Git 信息使用状态色。切换主题后颜色同步更新。
52
+ ![目录别名示例:demo 和 demo/src](assets/folder-alias-preview.svg)
106
53
 
107
- 别名只影响底栏,不改变工作目录、工具访问路径或环境变量。
54
+ - 别名适用于该目录及其子目录。多个别名匹配时,使用路径最长的别名。
55
+ - 在 **Manage folder aliases** 中修改或删除。修改时留空表示保留原值,Esc 取消。
56
+ - 别名只改变显示名称。删除别名不会删除文件夹。
108
57
 
109
58
  ## Git 状态
110
59
 
111
- 借用 Tide 的标记形式,但使用 Pi 主题文字色,不使用背景色。扩展不会修改 fish 或 Tide。
112
-
113
- | 状态 | 主题色 | 内置主题效果 |
114
- | --- | --- | --- |
115
- | 初次读取或查询失败 | `text` | 默认文字色,显示 `?` |
116
- | 工作区干净 | `mdLink` | 蓝色 |
117
- | 有已暂存、未暂存或未跟踪变更 | `warning` | 黄色 |
118
- | 有冲突或正在进行 Git 操作 | `error` | 红色 |
119
-
120
- 优先级:红色 > 黄色 > 蓝色。不在 Git 仓库时隐藏 Git 信息。目录别名颜色不受 Git 状态影响。
121
-
122
- ```text
123
-  demo ( main ⇣2 ⇡1 *1 ~2 +3 !4 ?5)
124
- ```
60
+ ![Git 状态示例:main,落后 2、领先 1、stash 1、冲突 2、已暂存 3、未暂存 4、未跟踪 5](assets/git-status-preview.svg)
125
61
 
126
62
  | 标记 | 含义 |
127
63
  | --- | --- |
128
- | `⇣N` | 落后上游 N 个提交 |
129
- | `⇡N` | 领先上游 N 个提交 |
64
+ | `⇣N` / `⇡N` | 落后 / 领先上游 N 个提交 |
130
65
  | `*N` | N 条 stash |
131
- | `~N` | N 个冲突文件,覆盖 `DD AU UD UA DU AA UU` |
66
+ | `~N` | N 个冲突文件 |
132
67
  | `+N` | N 个已暂存条目 |
133
68
  | `!N` | N 个未暂存条目 |
134
69
  | `?N` | N 个未跟踪条目 |
135
70
 
136
- 数量为零时不显示。未跟踪目录按 Git 默认行为合并为一个条目。冲突文件不重复计入已暂存或未暂存数量。领先、落后和 stash 本身不改变颜色。没有上游时,不显示领先和落后。
137
-
138
- 显示 merge、rebase、cherry-pick、revert、bisect 等操作。可用时显示 rebase 进度。分离 HEAD 时显示 `#标签` 或 `@提交短哈希`。支持 linked worktree。
139
-
140
- 查询异步执行,并设有超时。每 5 秒刷新一次,也在工具执行完成、agent 回复完成或分支变化时刷新。关闭 Git 状态或选择 Native footer 后,停止扩展查询。
71
+ 默认主题中,蓝色表示干净,黄色表示有变更,红色表示有冲突或正在进行 Git 操作。颜色随主题调整。不在 Git 仓库时隐藏 Git 信息。
141
72
 
142
- ## 配置
73
+ ## 实验性阅读模式
143
74
 
144
- 配置在各项目间共用,保存到:
75
+ 阅读模式需要单独加载。在本地仓库目录启动:
145
76
 
146
- ```text
147
- ~/.pi/agent/pi-path-bar.json
148
- ```
149
-
150
- 若设置了 `PI_CODING_AGENT_DIR`,则使用该目录。扩展不会设置或修改此变量。
151
-
152
- ```json
153
- {
154
- "mode": "short",
155
- "icon": true,
156
- "branch": true,
157
- "session": true,
158
- "aliases": [
159
- { "path": "/home/example/Projects", "name": "Projects" }
160
- ]
161
- }
77
+ ```sh
78
+ pi -e ./src/reading-mode.ts
162
79
  ```
163
80
 
164
- `branch` 字段控制 Git 状态显示。配置在重启或 `/reload` 后保留。打开菜单时重新读取文件。保存使用临时文件和原子替换。其他已运行的 Pi 实例需要重新打开菜单或重新加载,才能同步修改。
165
-
166
- 新文件不存在时,会读取旧的 `pi-show-dir.json`。下次保存时写入新文件,并保留旧文件。配置损坏时会提示错误,不会覆盖原文件。
167
-
168
- ## 限制
81
+ - **`Alt+Esc`**(Mac:**`Option+Esc`**):隐藏输入框和底栏,保留对话及工具输出,可继续滚动阅读。
82
+ - **单次 `Esc`** 或再次 **`Alt+Esc`**:恢复界面,输入草稿保留。
83
+ - 也可执行 **`/reading-mode`** 进入。
169
84
 
170
- - Pi 的公开 API 会替换整个底栏。其他扩展也调用 `setFooter()` 时,最后设置的底栏生效。
171
- - 公开 API 不提供自动压缩开关,因此自定义底栏不显示原生 `(auto)` 标记。
172
- - 这是非官方 Pi 扩展,与 Pi 或 Tide 项目无隶属或背书关系。
85
+ 仅支持 fullscreen 模式。快捷键是否可用取决于终端;无响应时使用命令。切换 TUI 模式后,请执行 `/reload`。阅读模式仍属实验功能,Pi 升级后可能需要适配。
173
86
 
174
- ## 开发
175
-
176
- 需要 Node.js 22.19 或更新版本。Git 状态和集成测试需要 Git。
177
-
178
- ```sh
179
- npm install --ignore-scripts
180
- npm test
181
- npm run check
182
- ```
87
+ ## 注意事项
183
88
 
184
- ## 许可证与致谢
89
+ - 设置跨项目共用,自动保存;默认文件为 `~/.pi/agent/pi-path-bar.json`。
90
+ - 不要同时启用多个修改底栏的扩展,以免相互覆盖。
91
+ - 自定义底栏不显示原生 `(auto)` 标记。
185
92
 
186
- 本项目采用 [MIT 许可证](LICENSE)。Pi 和 Tide 的版权及许可文本见[第三方声明](THIRD_PARTY_NOTICES.md)。发布包不包含宿主依赖或字体文件。
93
+ ## 许可证
187
94
 
188
- 维护者可参阅 [npm 发布指南](https://github.com/johnbitcn/pi-path-bar/blob/main/RELEASING.md),了解登录、打包检查、发布和验证流程。
95
+ [MIT](LICENSE)。相关项目的版权及许可见[第三方声明](THIRD_PARTY_NOTICES.md)。本项目是非官方扩展,与 Pi 或 Tide 无隶属或背书关系。
@@ -64,4 +64,11 @@ SOFTWARE.
64
64
 
65
65
  ## Fonts and icons
66
66
 
67
- The extension uses Unicode characters, including Nerd Font icon code points. No font files, icon images, or other font assets are bundled. Users supply their terminal font separately.
67
+ The extension uses Unicode characters, including Nerd Font icon code points. Users supply their terminal font separately; no font files are bundled.
68
+
69
+ The README previews in `assets/*.svg` contain outlined lettering and icons from Maple Mono NF CN. The outlines are positioned and colored for these examples; the two dashed arrows are drawn separately.
70
+
71
+ - Maple Mono: Copyright 2022 The Maple Mono Project Authors. [Project](https://github.com/subframe7536/maple-font); [SIL Open Font License 1.1](https://openfontlicense.org).
72
+ - Nerd Fonts provides the patched icon glyphs. [Project and glyph-source license audit](https://github.com/ryanoasis/nerd-fonts/blob/master/license-audit.md).
73
+ - Folder-open icon: Font Awesome by Fonticons, Inc., used under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). [Font Awesome](https://fontawesome.com). Converted to a colored SVG outline from the patched font.
74
+ - Git branch symbol: [Powerline Symbols](https://github.com/powerline/fonts), via the patched font. See the Nerd Fonts license audit above.
@@ -0,0 +1,41 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="160" height="104" viewBox="0 0 160 104" role="img" aria-labelledby="title desc">
2
+ <title id="title">Folder alias examples</title>
3
+ <desc id="desc">The folder is displayed as demo, and its child as demo/src.</desc>
4
+ <metadata>Maple Mono NF CN outlines. Icon attribution: see THIRD_PARTY_NOTICES.md. No font files required.</metadata>
5
+ <defs>
6
+ <path id="g0" d="M419 800Q424 815 435.5 822.5Q447 830 467 830Q487 830 498.0 822.5Q509 815 509 799Q509 793 507.5 786.0Q506 779 503 771L181 -100Q176 -115 164.5 -122.5Q153 -130 133 -130Q113 -130 102.0 -122.5Q91 -115 91 -99Q91 -93 92.5 -86.0Q94 -79 97 -71Z"/>
7
+ <path id="g1" d="M80 274Q80 351 100.0 405.0Q120 459 153.5 493.5Q187 528 232.0 544.0Q277 560 327 560Q365 560 395.0 553.5Q425 547 447.5 536.0Q470 525 486.0 511.0Q502 497 511 482Q525 459 521.5 442.0Q518 425 501 415Q483 404 467.0 407.0Q451 410 442 425Q431 442 404.0 456.0Q377 470 333 470Q297 470 267.0 458.0Q237 446 215.5 422.0Q194 398 182.0 362.5Q170 327 170 279Q170 230 182.5 192.5Q195 155 216.5 130.0Q238 105 268.0 92.5Q298 80 332 80Q358 80 386.0 86.5Q414 93 429 108Q441 120 458.5 122.0Q476 124 493 110Q499 104 502.5 96.5Q506 89 506.0 80.0Q506 71 501.0 60.5Q496 50 486 38Q473 22 455.0 12.5Q437 3 416.5 -2.0Q396 -7 374.0 -8.5Q352 -10 330 -10Q275 -10 229.0 7.0Q183 24 150.0 58.5Q117 93 98.5 147.0Q80 201 80 274Z"/>
8
+ <path id="g2" d="M465 -10Q442 -10 431.0 1.5Q420 13 420 36V100Q411 75 397.5 55.0Q384 35 366.0 20.5Q348 6 325.0 -2.0Q302 -10 273 -10Q212 -10 174.0 14.0Q136 38 115.0 76.5Q94 115 87.0 162.5Q80 210 80 256Q80 310 88.0 364.5Q96 419 118.0 462.5Q140 506 180.0 533.0Q220 560 283 560Q338 560 374.5 530.5Q411 501 420 456V695Q420 718 431.0 729.0Q442 740 465 740Q488 740 499.0 729.0Q510 718 510 695V36Q510 13 499.0 1.5Q488 -10 465 -10ZM282 80Q309 80 334.0 91.0Q359 102 378.0 119.5Q397 137 408.5 159.5Q420 182 420 206V316Q420 340 411.0 367.0Q402 394 386.0 417.0Q370 440 347.5 455.0Q325 470 298 470Q255 470 230.0 452.0Q205 434 191.5 404.5Q178 375 174.0 337.5Q170 300 170 262Q170 223 175.0 189.5Q180 156 192.5 131.5Q205 107 227.0 93.5Q249 80 282 80Z"/>
9
+ <path id="g3" d="M459 132Q478 132 490.5 118.5Q503 105 503 88Q503 79 498.5 70.5Q494 62 482 50Q466 35 448.0 24.0Q430 13 409.5 5.0Q389 -3 366.5 -6.5Q344 -10 319 -10Q261 -10 215.5 9.5Q170 29 138.5 65.5Q107 102 90.0 154.5Q73 207 73 272Q73 329 85.5 381.5Q98 434 125.5 473.5Q153 513 197.0 536.5Q241 560 305 560Q365 560 405.0 539.5Q445 519 469.5 482.0Q494 445 504.5 395.5Q515 346 515 287Q515 269 502.0 254.5Q489 240 468 240H165Q169 200 182.0 169.5Q195 139 215.0 119.5Q235 100 261.5 90.0Q288 80 320 80Q365 80 391.5 94.0Q418 108 433 120Q441 127 446.0 129.5Q451 132 459 132ZM409 320Q414 320 419.5 326.0Q425 332 425 353Q425 374 417.0 395.0Q409 416 393.5 432.5Q378 449 355.5 459.5Q333 470 305 470Q274 470 249.5 459.0Q225 448 207.5 428.0Q190 408 179.5 380.5Q169 353 165 320Z"/>
10
+ <path id="g4" d="M103 -10Q83 -10 69.0 2.5Q55 15 55 37V520Q55 539 68.0 549.5Q81 560 100 560Q120 560 132.5 549.5Q145 539 145 520V485Q156 520 175.0 540.0Q194 560 235 560Q278 560 302.5 537.5Q327 515 332 485Q340 517 365.0 538.5Q390 560 435 560Q466 560 487.0 549.0Q508 538 521.0 518.5Q534 499 539.5 473.5Q545 448 545 418V37Q545 15 531.5 2.5Q518 -10 498 -10Q478 -10 464.5 2.5Q451 15 451 37V409Q451 436 439.5 458.5Q428 481 396 481Q365 481 353.5 459.0Q342 437 342 410V32Q342 12 330.0 1.0Q318 -10 300 -10Q282 -10 270.0 1.0Q258 12 258 32V409Q258 435 247.0 458.0Q236 481 204 481Q173 481 161.0 459.5Q149 438 149 410V37Q149 15 136.0 2.5Q123 -10 103 -10Z"/>
11
+ <path id="g5" d="M300 -10Q242 -10 200.0 11.5Q158 33 130.0 71.0Q102 109 88.5 161.5Q75 214 75 276Q75 338 88.0 390.0Q101 442 129.0 479.5Q157 517 199.5 538.5Q242 560 300 560Q359 560 401.5 538.5Q444 517 471.5 479.5Q499 442 512.0 390.0Q525 338 525 276Q525 214 511.5 161.5Q498 109 470.5 71.0Q443 33 400.5 11.5Q358 -10 300 -10ZM300 80Q335 80 360.5 94.5Q386 109 402.5 134.5Q419 160 427.0 196.5Q435 233 435 276Q435 319 427.5 354.5Q420 390 403.5 415.5Q387 441 361.5 455.5Q336 470 300 470Q264 470 238.5 455.5Q213 441 196.5 415.5Q180 390 172.5 354.0Q165 318 165 275Q165 232 173.0 196.0Q181 160 197.5 134.5Q214 109 239.5 94.5Q265 80 300 80Z"/>
12
+ <path id="g6" d="M155 -10Q132 -10 121.0 1.0Q110 12 110 35V515Q110 538 121.0 549.0Q132 560 155 560Q178 560 189.0 549.0Q200 538 200 515V456Q208 480 227.0 499.0Q246 518 271.0 531.5Q296 545 325.5 552.5Q355 560 384 560Q429 560 457.5 544.0Q486 528 502.0 501.0Q518 474 524.0 438.0Q530 402 530 362V350Q530 327 519.0 316.0Q508 305 485 305Q462 305 451.0 316.0Q440 327 440 350V362Q440 385 436.5 404.5Q433 424 423.5 438.5Q414 453 397.0 461.5Q380 470 353 470Q327 470 300.0 463.0Q273 456 250.5 441.0Q228 426 214.0 403.5Q200 381 200 350V35Q200 12 189.0 1.0Q178 -10 155 -10Z"/>
13
+ <path id="g7" d="M301 -10Q271 -10 243.0 -6.0Q215 -2 190.5 7.5Q166 17 143.5 32.5Q121 48 101 71Q91 82 86.0 96.0Q81 110 81 124Q81 146 93.0 154.0Q105 162 119 162Q130 162 139.0 158.0Q148 154 159 144Q191 116 221.5 98.0Q252 80 300 80Q317 80 339.5 82.0Q362 84 382.0 91.5Q402 99 416.0 113.0Q430 127 430 150Q430 172 416.0 187.5Q402 203 382.0 213.5Q362 224 339.5 230.5Q317 237 300 240Q266 247 231.0 257.0Q196 267 167.5 285.0Q139 303 120.5 332.0Q102 361 102 406Q102 448 118.0 477.0Q134 506 161.0 524.5Q188 543 224.0 551.5Q260 560 300 560Q365 560 418.0 538.5Q471 517 497 475Q504 464 506.5 455.0Q509 446 509 439Q509 423 499.0 411.0Q489 399 469 399Q460 399 448.0 402.5Q436 406 425 417Q401 441 373.5 455.5Q346 470 300 470Q278 470 258.5 466.5Q239 463 224.0 455.0Q209 447 200.5 435.5Q192 424 192 407Q192 387 202.5 373.5Q213 360 229.5 352.0Q246 344 265.0 339.0Q284 334 300 331Q338 323 377.0 311.5Q416 300 448.0 280.0Q480 260 500.0 228.5Q520 197 520 149Q520 105 502.0 74.5Q484 44 454.0 25.5Q424 7 384.5 -1.5Q345 -10 301 -10Z"/>
14
+ <path id="g8" d="M160 418 0 144V648Q0 696 34.0 730.0Q68 764 115 764H327Q375 764 409 730L457 682Q491 648 538 648H750Q798 648 832.0 614.0Q866 580 865 533V475H260Q193 475 160 418ZM210 389Q226 417 260 417H981Q1015 417 1031.0 388.0Q1047 359 1031 330L829 -16Q813 -44 779 -44H58Q24 -44 8.0 -15.0Q-8 14 8 43Z"/>
15
+ </defs>
16
+ <rect width="160" height="104" rx="8" fill="#161b22"/>
17
+ <g fill="#b1bac4">
18
+ <use href="#g8" transform="translate(20 40) scale(0.02 -0.02)"/>
19
+ </g>
20
+ <g fill="#79c0ff">
21
+ <use href="#g2" transform="translate(44 40) scale(0.02 -0.02)"/>
22
+ <use href="#g3" transform="translate(56 40) scale(0.02 -0.02)"/>
23
+ <use href="#g4" transform="translate(68 40) scale(0.02 -0.02)"/>
24
+ <use href="#g5" transform="translate(80 40) scale(0.02 -0.02)"/>
25
+ </g>
26
+ <g fill="#b1bac4">
27
+ <use href="#g8" transform="translate(20 72) scale(0.02 -0.02)"/>
28
+ </g>
29
+ <g fill="#79c0ff">
30
+ <use href="#g2" transform="translate(44 72) scale(0.02 -0.02)"/>
31
+ <use href="#g3" transform="translate(56 72) scale(0.02 -0.02)"/>
32
+ <use href="#g4" transform="translate(68 72) scale(0.02 -0.02)"/>
33
+ <use href="#g5" transform="translate(80 72) scale(0.02 -0.02)"/>
34
+ </g>
35
+ <g fill="#b1bac4">
36
+ <use href="#g0" transform="translate(92 72) scale(0.02 -0.02)"/>
37
+ <use href="#g7" transform="translate(104 72) scale(0.02 -0.02)"/>
38
+ <use href="#g6" transform="translate(116 72) scale(0.02 -0.02)"/>
39
+ <use href="#g1" transform="translate(128 72) scale(0.02 -0.02)"/>
40
+ </g>
41
+ </svg>
@@ -0,0 +1,124 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="484" height="136" viewBox="0 0 484 136" role="img" aria-labelledby="title desc">
2
+ <title id="title">Path bar examples</title>
3
+ <desc id="desc">Compact path, Projects folder alias with changes, and demo alias ahead of upstream.</desc>
4
+ <metadata>Maple Mono NF CN outlines. Icon attribution: see THIRD_PARTY_NOTICES.md. No font files required.</metadata>
5
+ <defs>
6
+ <path id="g0" d="M237 675Q235 708 251.0 724.0Q267 740 300 740Q333 740 349.0 724.0Q365 708 363 675L347 285Q346 262 334.5 251.0Q323 240 300 240Q277 240 265.5 251.0Q254 262 253 285ZM224 67Q224 99 246.0 121.0Q268 143 300 143Q316 143 330.0 137.0Q344 131 354.5 120.5Q365 110 371.0 96.5Q377 83 377 67Q377 51 371.0 37.0Q365 23 354.5 12.5Q344 2 330.0 -4.0Q316 -10 300 -10Q284 -10 270.5 -4.0Q257 2 246.5 12.5Q236 23 230.0 37.0Q224 51 224 67Z"/>
7
+ <path id="g1" d="M442 -90Q459 -106 459.5 -121.5Q460 -137 445 -154Q429 -171 411.5 -172.0Q394 -173 377 -159Q320 -111 275.5 -56.5Q231 -2 201.0 61.0Q171 124 155.5 196.0Q140 268 140 350Q140 433 154.5 502.0Q169 571 198.0 631.0Q227 691 270.0 742.5Q313 794 370 841Q388 856 405.5 855.0Q423 854 440 837Q456 820 455.0 805.5Q454 791 436 775Q393 737 355.5 691.0Q318 645 290.0 592.0Q262 539 246.0 478.5Q230 418 230 350Q230 283 247.0 221.0Q264 159 292.5 103.5Q321 48 360.0 -1.0Q399 -50 442 -90Z"/>
8
+ <path id="g2" d="M148 -90Q192 -50 230.5 -1.0Q269 48 297.5 103.5Q326 159 343.0 221.0Q360 283 360 350Q360 418 344.0 478.5Q328 539 300.0 592.0Q272 645 234.5 691.0Q197 737 154 775Q136 791 135.0 805.5Q134 820 150 837Q167 854 184.5 855.0Q202 856 220 841Q277 794 320.0 742.5Q363 691 392.0 631.0Q421 571 435.5 502.0Q450 433 450 350Q450 268 434.5 196.0Q419 124 389.0 61.0Q359 -2 314.5 -56.5Q270 -111 213 -159Q196 -173 178.5 -172.0Q161 -171 145 -154Q130 -137 130.5 -121.5Q131 -106 148 -90Z"/>
9
+ <path id="g3" d="M300 95Q277 95 266.0 106.0Q255 117 255 140V285H110Q87 285 76.0 296.0Q65 307 65 330Q65 353 76.0 364.0Q87 375 110 375H255V520Q255 543 266.0 554.0Q277 565 300 565Q323 565 334.0 554.0Q345 543 345 520V375H490Q513 375 524.0 364.0Q535 353 535 330Q535 307 524.0 296.0Q513 285 490 285H345V140Q345 117 334.0 106.0Q323 95 300 95Z"/>
10
+ <path id="g4" d="M120 285Q97 285 86.0 296.0Q75 307 75 330Q75 353 86.0 364.0Q97 375 120 375H480Q503 375 514.0 364.0Q525 353 525 330Q525 307 514.0 296.0Q503 285 480 285Z"/>
11
+ <path id="g5" d="M419 800Q424 815 435.5 822.5Q447 830 467 830Q487 830 498.0 822.5Q509 815 509 799Q509 793 507.5 786.0Q506 779 503 771L181 -100Q176 -115 164.5 -122.5Q153 -130 133 -130Q113 -130 102.0 -122.5Q91 -115 91 -99Q91 -93 92.5 -86.0Q94 -79 97 -71Z"/>
12
+ <path id="g6" d="M125 0Q102 0 91.0 11.0Q80 22 80.0 45.0Q80 68 91.0 79.0Q102 90 125 90H288V612Q288 625 285.0 631.0Q282 637 276 637Q272 637 267.5 634.5Q263 632 257 627L159 549Q145 538 134.0 532.5Q123 527 115 527Q102 527 96.0 538.5Q90 550 90 573Q90 595 96.0 607.5Q102 620 113 629L223 715Q240 729 258.0 734.5Q276 740 298 740Q339 740 358.5 720.5Q378 701 378 660V90H505Q528 90 539.0 79.0Q550 68 550.0 45.0Q550 22 539.0 11.0Q528 0 505 0Z"/>
13
+ <path id="g7" d="M136 0Q107 0 91.5 14.5Q76 29 76 58Q76 74 81.0 87.5Q86 101 97 112L319 342Q335 359 354.0 380.5Q373 402 389.5 426.0Q406 450 417.0 475.5Q428 501 428 526Q428 561 417.0 584.5Q406 608 387.0 622.5Q368 637 342.0 643.5Q316 650 286 650Q246 650 218.5 640.5Q191 631 166 616Q148 605 130.5 612.5Q113 620 103 637Q94 653 99.5 670.0Q105 687 120 698Q152 721 192.0 730.5Q232 740 289 740Q336 740 377.5 730.5Q419 721 450.0 698.0Q481 675 499.5 636.0Q518 597 518 537Q518 506 508.0 474.5Q498 443 481.5 412.0Q465 381 442.5 352.0Q420 323 395 296L218 108Q213 103 215.5 96.5Q218 90 235 90H492Q515 90 526.0 79.0Q537 68 537 45Q537 22 526.0 11.0Q515 0 492 0Z"/>
14
+ <path id="g8" d="M101 21Q81 29 73.5 46.5Q66 64 75 84Q83 102 100.5 109.5Q118 117 144 106Q171 95 205.5 87.5Q240 80 272 80Q344 80 387.0 116.5Q430 153 430 226Q430 265 406.5 288.0Q383 311 349.0 322.5Q315 334 276.0 336.5Q237 339 205 337Q196 336 188.0 338.5Q180 341 173.5 346.5Q167 352 163.5 361.0Q160 370 160 383Q160 406 173.5 416.5Q187 427 217 427Q243 427 274.0 432.5Q305 438 332.5 452.0Q360 466 378.5 489.5Q397 513 397 549Q397 579 383.5 598.5Q370 618 349.0 629.5Q328 641 303.0 645.5Q278 650 254 650Q226 650 202.0 644.5Q178 639 155 626Q140 618 123.0 624.0Q106 630 97 648Q89 663 93.5 680.5Q98 698 117 711Q137 725 175.0 732.5Q213 740 255 740Q299 740 340.5 731.0Q382 722 414.5 700.5Q447 679 467.0 644.0Q487 609 487 558Q487 529 480.5 501.5Q474 474 460.5 452.0Q447 430 426.0 414.5Q405 399 376 394Q414 391 441.5 375.5Q469 360 486.5 334.5Q504 309 512.0 275.5Q520 242 520 204Q520 156 503.5 117.0Q487 78 455.5 49.5Q424 21 378.0 5.5Q332 -10 272 -10Q229 -10 182.0 -2.0Q135 6 101 21Z"/>
15
+ <path id="g9" d="M118 618Q136 683 189.0 711.5Q242 740 318 740Q410 740 463.5 696.5Q517 653 517 552Q517 517 507.5 490.5Q498 464 483.0 443.5Q468 423 449.5 407.5Q431 392 413 378Q387 359 370.5 337.5Q354 316 349 285Q344 262 332.0 251.0Q320 240 297 240Q271 240 259.5 253.5Q248 267 251 298Q255 336 276.0 369.0Q297 402 331 425Q352 439 369.5 451.5Q387 464 400.0 477.5Q413 491 420.0 508.5Q427 526 427 551Q427 601 398.0 625.5Q369 650 318 650Q296 650 278.5 645.5Q261 641 247.5 633.0Q234 625 225.5 612.5Q217 600 212 585Q206 565 193.5 555.0Q181 545 159 545Q133 545 120.0 561.0Q107 577 118 618ZM224 67Q224 99 246.0 121.0Q268 143 300 143Q316 143 330.0 137.0Q344 131 354.5 120.5Q365 110 371.0 96.5Q377 83 377 67Q377 51 371.0 37.0Q365 23 354.5 12.5Q344 2 330.0 -4.0Q316 -10 300 -10Q284 -10 270.5 -4.0Q257 2 246.5 12.5Q236 23 230.0 37.0Q224 51 224 67Z"/>
16
+ <path id="g10" d="M60 367Q60 443 76.5 510.5Q93 578 128.5 629.0Q164 680 220.0 710.0Q276 740 356 740Q398 740 429.0 732.0Q460 724 482.0 711.0Q504 698 518.0 681.0Q532 664 539 646Q548 622 543.5 606.5Q539 591 525 583Q511 575 494.5 577.5Q478 580 464 600Q451 619 423.0 634.5Q395 650 351 650Q300 650 262.5 626.5Q225 603 200.0 564.0Q175 525 162.5 474.0Q150 423 150 367Q150 319 160.5 268.0Q171 217 195.0 175.0Q219 133 259.0 106.5Q299 80 358 80Q372 80 387.5 81.5Q403 83 417.5 86.5Q432 90 445.0 95.5Q458 101 467 108Q484 122 502.0 120.5Q520 119 533 106Q546 93 546.0 75.0Q546 57 526 37Q511 22 491.0 13.0Q471 4 448.0 -1.5Q425 -7 401.0 -8.5Q377 -10 354 -10Q274 -10 218.0 21.0Q162 52 127.0 104.0Q92 156 76.0 224.0Q60 292 60 367Z"/>
17
+ <path id="g11" d="M182 320V35Q182 12 171.0 1.0Q160 -10 137 -10Q114 -10 103.0 1.0Q92 12 92 35V650Q92 691 111.5 710.5Q131 730 172 730H327Q374 730 415.0 716.5Q456 703 486.0 676.5Q516 650 533.0 612.0Q550 574 550 525Q550 476 532.5 438.0Q515 400 485.0 373.5Q455 347 414.5 333.5Q374 320 327 320ZM182 410H327Q354 410 377.5 417.5Q401 425 418.5 439.0Q436 453 446.5 475.0Q457 497 457 525Q457 583 419.0 611.5Q381 640 327 640H222Q202 640 192.0 630.0Q182 620 182 600Z"/>
18
+ <path id="g12" d="M242 -10Q206 -10 174.5 2.0Q143 14 120.0 41.5Q97 69 83.5 113.5Q70 158 70 224Q70 293 84.0 354.5Q98 416 126.5 461.5Q155 507 198.5 533.5Q242 560 300 560Q348 560 375 536Q397 516 410 487Q412 502 414 516Q418 541 431.0 550.5Q444 560 465 560Q489 560 498.5 549.5Q508 539 504 516Q494 457 489.0 399.5Q484 342 485.5 283.5Q487 225 495.5 163.5Q504 102 520 34Q525 12 517.0 1.0Q509 -10 486.0 -10.0Q463 -10 449.0 1.0Q435 12 430 34Q418 83 410 129Q404 111 396 94Q374 48 336.5 19.0Q299 -10 242 -10ZM251 80Q282 80 308.5 96.5Q335 113 354.0 143.0Q373 173 384.0 215.0Q395 257 395 308Q395 332 393.5 360.5Q392 389 384.0 413.0Q376 437 358.5 453.5Q341 470 308 470Q277 470 250.0 450.5Q223 431 203.0 397.0Q183 363 171.5 316.0Q160 269 160 215Q160 151 182.5 115.5Q205 80 251 80Z"/>
19
+ <path id="g13" d="M80 274Q80 351 100.0 405.0Q120 459 153.5 493.5Q187 528 232.0 544.0Q277 560 327 560Q365 560 395.0 553.5Q425 547 447.5 536.0Q470 525 486.0 511.0Q502 497 511 482Q525 459 521.5 442.0Q518 425 501 415Q483 404 467.0 407.0Q451 410 442 425Q431 442 404.0 456.0Q377 470 333 470Q297 470 267.0 458.0Q237 446 215.5 422.0Q194 398 182.0 362.5Q170 327 170 279Q170 230 182.5 192.5Q195 155 216.5 130.0Q238 105 268.0 92.5Q298 80 332 80Q358 80 386.0 86.5Q414 93 429 108Q441 120 458.5 122.0Q476 124 493 110Q499 104 502.5 96.5Q506 89 506.0 80.0Q506 71 501.0 60.5Q496 50 486 38Q473 22 455.0 12.5Q437 3 416.5 -2.0Q396 -7 374.0 -8.5Q352 -10 330 -10Q275 -10 229.0 7.0Q183 24 150.0 58.5Q117 93 98.5 147.0Q80 201 80 274Z"/>
20
+ <path id="g14" d="M465 -10Q442 -10 431.0 1.5Q420 13 420 36V100Q411 75 397.5 55.0Q384 35 366.0 20.5Q348 6 325.0 -2.0Q302 -10 273 -10Q212 -10 174.0 14.0Q136 38 115.0 76.5Q94 115 87.0 162.5Q80 210 80 256Q80 310 88.0 364.5Q96 419 118.0 462.5Q140 506 180.0 533.0Q220 560 283 560Q338 560 374.5 530.5Q411 501 420 456V695Q420 718 431.0 729.0Q442 740 465 740Q488 740 499.0 729.0Q510 718 510 695V36Q510 13 499.0 1.5Q488 -10 465 -10ZM282 80Q309 80 334.0 91.0Q359 102 378.0 119.5Q397 137 408.5 159.5Q420 182 420 206V316Q420 340 411.0 367.0Q402 394 386.0 417.0Q370 440 347.5 455.0Q325 470 298 470Q255 470 230.0 452.0Q205 434 191.5 404.5Q178 375 174.0 337.5Q170 300 170 262Q170 223 175.0 189.5Q180 156 192.5 131.5Q205 107 227.0 93.5Q249 80 282 80Z"/>
21
+ <path id="g15" d="M459 132Q478 132 490.5 118.5Q503 105 503 88Q503 79 498.5 70.5Q494 62 482 50Q466 35 448.0 24.0Q430 13 409.5 5.0Q389 -3 366.5 -6.5Q344 -10 319 -10Q261 -10 215.5 9.5Q170 29 138.5 65.5Q107 102 90.0 154.5Q73 207 73 272Q73 329 85.5 381.5Q98 434 125.5 473.5Q153 513 197.0 536.5Q241 560 305 560Q365 560 405.0 539.5Q445 519 469.5 482.0Q494 445 504.5 395.5Q515 346 515 287Q515 269 502.0 254.5Q489 240 468 240H165Q169 200 182.0 169.5Q195 139 215.0 119.5Q235 100 261.5 90.0Q288 80 320 80Q365 80 391.5 94.0Q418 108 433 120Q441 127 446.0 129.5Q451 132 459 132ZM409 320Q414 320 419.5 326.0Q425 332 425 353Q425 374 417.0 395.0Q409 416 393.5 432.5Q378 449 355.5 459.5Q333 470 305 470Q274 470 249.5 459.0Q225 448 207.5 428.0Q190 408 179.5 380.5Q169 353 165 320Z"/>
22
+ <path id="g16" d="M512 90Q532 90 543.5 77.5Q555 65 555.0 45.0Q555 25 543.5 12.5Q532 0 512 0H128Q108 0 96.5 12.5Q85 25 85.0 45.0Q85 65 96.5 77.5Q108 90 128 90H280V400Q280 420 270.0 430.0Q260 440 240 440H149Q129 440 117.0 452.5Q105 465 105.0 485.0Q105 505 117.0 517.5Q129 530 149 530H290Q331 530 350.5 510.5Q370 491 370 450V90ZM320 629Q287 629 268.0 646.0Q249 663 249 692Q249 722 268.0 739.5Q287 757 320 757Q353 757 372.0 739.5Q391 722 391 692Q391 663 372.0 646.0Q353 629 320 629Z"/>
23
+ <path id="g17" d="M350 400Q350 420 340.0 430.0Q330 440 310 440H175Q155 440 142.5 452.5Q130 465 130 485Q130 504 142.5 517.0Q155 530 175 530H360Q401 530 420.5 510.5Q440 491 440 450V-33Q440 -80 424.5 -118.0Q409 -156 382.0 -183.0Q355 -210 318.5 -225.0Q282 -240 240 -240Q211 -240 185.5 -233.0Q160 -226 138.0 -213.5Q116 -201 97.0 -184.0Q78 -167 61 -148Q55 -142 52.5 -134.5Q50 -127 50 -120Q50 -104 61.5 -86.0Q73 -68 96 -68Q110 -68 120.5 -76.5Q131 -85 142 -97Q159 -117 182.0 -133.5Q205 -150 240 -150Q261 -150 281.0 -143.0Q301 -136 316.0 -123.0Q331 -110 340.5 -91.0Q350 -72 350 -47ZM380 629Q347 629 328.0 646.0Q309 663 309 692Q309 722 328.0 739.5Q347 757 380 757Q413 757 432.0 739.5Q451 722 451 692Q451 663 432.0 646.0Q413 629 380 629Z"/>
24
+ <path id="g18" d="M103 -10Q83 -10 69.0 2.5Q55 15 55 37V520Q55 539 68.0 549.5Q81 560 100 560Q120 560 132.5 549.5Q145 539 145 520V485Q156 520 175.0 540.0Q194 560 235 560Q278 560 302.5 537.5Q327 515 332 485Q340 517 365.0 538.5Q390 560 435 560Q466 560 487.0 549.0Q508 538 521.0 518.5Q534 499 539.5 473.5Q545 448 545 418V37Q545 15 531.5 2.5Q518 -10 498 -10Q478 -10 464.5 2.5Q451 15 451 37V409Q451 436 439.5 458.5Q428 481 396 481Q365 481 353.5 459.0Q342 437 342 410V32Q342 12 330.0 1.0Q318 -10 300 -10Q282 -10 270.0 1.0Q258 12 258 32V409Q258 435 247.0 458.0Q236 481 204 481Q173 481 161.0 459.5Q149 438 149 410V37Q149 15 136.0 2.5Q123 -10 103 -10Z"/>
25
+ <path id="g19" d="M185 35Q185 12 174.0 1.0Q163 -10 140 -10Q117 -10 106.0 1.0Q95 12 95 35V515Q95 538 106.0 549.0Q117 560 140 560Q163 560 174.0 549.0Q185 538 185 515V456Q199 504 233.0 532.0Q267 560 322 560Q362 560 395.5 546.5Q429 533 453.5 508.0Q478 483 491.5 448.0Q505 413 505 370V35Q505 12 494.0 1.0Q483 -10 460 -10Q437 -10 426.0 1.0Q415 12 415 35V344Q415 370 408.0 393.5Q401 417 387.5 435.0Q374 453 354.0 464.0Q334 475 307 475Q280 475 257.5 459.0Q235 443 219.0 419.5Q203 396 194.0 368.0Q185 340 185 316Z"/>
26
+ <path id="g20" d="M300 -10Q242 -10 200.0 11.5Q158 33 130.0 71.0Q102 109 88.5 161.5Q75 214 75 276Q75 338 88.0 390.0Q101 442 129.0 479.5Q157 517 199.5 538.5Q242 560 300 560Q359 560 401.5 538.5Q444 517 471.5 479.5Q499 442 512.0 390.0Q525 338 525 276Q525 214 511.5 161.5Q498 109 470.5 71.0Q443 33 400.5 11.5Q358 -10 300 -10ZM300 80Q335 80 360.5 94.5Q386 109 402.5 134.5Q419 160 427.0 196.5Q435 233 435 276Q435 319 427.5 354.5Q420 390 403.5 415.5Q387 441 361.5 455.5Q336 470 300 470Q264 470 238.5 455.5Q213 441 196.5 415.5Q180 390 172.5 354.0Q165 318 165 275Q165 232 173.0 196.0Q181 160 197.5 134.5Q214 109 239.5 94.5Q265 80 300 80Z"/>
27
+ <path id="g21" d="M135 560Q158 560 169.0 548.5Q180 537 180 514V450Q189 475 202.5 495.0Q216 515 234.0 529.5Q252 544 275.0 552.0Q298 560 327 560Q388 560 426.0 536.0Q464 512 485.0 473.5Q506 435 513.0 388.0Q520 341 520 294Q520 240 512.0 186.0Q504 132 482.0 88.5Q460 45 420.0 17.5Q380 -10 317 -10Q262 -10 225.5 19.5Q189 49 180 94V-145Q180 -168 169.0 -179.0Q158 -190 135 -190Q112 -190 101.0 -179.0Q90 -168 90 -145V514Q90 537 101.0 548.5Q112 560 135 560ZM318 470Q291 470 266.0 459.0Q241 448 222.0 430.5Q203 413 191.5 390.5Q180 368 180 344V234Q180 210 189.0 183.0Q198 156 214.0 133.0Q230 110 252.5 95.0Q275 80 302 80Q345 80 370.0 98.0Q395 116 408.5 145.5Q422 175 426.0 212.5Q430 250 430 288Q430 327 425.0 360.5Q420 394 407.5 418.5Q395 443 373.0 456.5Q351 470 318 470Z"/>
28
+ <path id="g22" d="M155 -10Q132 -10 121.0 1.0Q110 12 110 35V515Q110 538 121.0 549.0Q132 560 155 560Q178 560 189.0 549.0Q200 538 200 515V456Q208 480 227.0 499.0Q246 518 271.0 531.5Q296 545 325.5 552.5Q355 560 384 560Q429 560 457.5 544.0Q486 528 502.0 501.0Q518 474 524.0 438.0Q530 402 530 362V350Q530 327 519.0 316.0Q508 305 485 305Q462 305 451.0 316.0Q440 327 440 350V362Q440 385 436.5 404.5Q433 424 423.5 438.5Q414 453 397.0 461.5Q380 470 353 470Q327 470 300.0 463.0Q273 456 250.5 441.0Q228 426 214.0 403.5Q200 381 200 350V35Q200 12 189.0 1.0Q178 -10 155 -10Z"/>
29
+ <path id="g23" d="M301 -10Q271 -10 243.0 -6.0Q215 -2 190.5 7.5Q166 17 143.5 32.5Q121 48 101 71Q91 82 86.0 96.0Q81 110 81 124Q81 146 93.0 154.0Q105 162 119 162Q130 162 139.0 158.0Q148 154 159 144Q191 116 221.5 98.0Q252 80 300 80Q317 80 339.5 82.0Q362 84 382.0 91.5Q402 99 416.0 113.0Q430 127 430 150Q430 172 416.0 187.5Q402 203 382.0 213.5Q362 224 339.5 230.5Q317 237 300 240Q266 247 231.0 257.0Q196 267 167.5 285.0Q139 303 120.5 332.0Q102 361 102 406Q102 448 118.0 477.0Q134 506 161.0 524.5Q188 543 224.0 551.5Q260 560 300 560Q365 560 418.0 538.5Q471 517 497 475Q504 464 506.5 455.0Q509 446 509 439Q509 423 499.0 411.0Q489 399 469 399Q460 399 448.0 402.5Q436 406 425 417Q401 441 373.5 455.5Q346 470 300 470Q278 470 258.5 466.5Q239 463 224.0 455.0Q209 447 200.5 435.5Q192 424 192 407Q192 387 202.5 373.5Q213 360 229.5 352.0Q246 344 265.0 339.0Q284 334 300 331Q338 323 377.0 311.5Q416 300 448.0 280.0Q480 260 500.0 228.5Q520 197 520 149Q520 105 502.0 74.5Q484 44 454.0 25.5Q424 7 384.5 -1.5Q345 -10 301 -10Z"/>
30
+ <path id="g24" d="M479 530Q499 530 509.5 517.5Q520 505 520.0 485.0Q520 465 509.5 452.5Q499 440 479 440H295V224Q295 152 316.5 116.0Q338 80 380 80Q400 80 419.0 83.0Q438 86 461 97Q481 108 496.5 102.5Q512 97 523 78Q535 58 530.5 41.5Q526 25 507 15Q477 -1 442.0 -5.5Q407 -10 365 -10Q329 -10 299.5 3.0Q270 16 249.0 42.5Q228 69 216.5 110.0Q205 151 205 207V440H88Q68 440 57.5 452.5Q47 465 47.0 485.0Q47 505 57.5 517.5Q68 530 88 530H205V660Q205 683 216.0 694.0Q227 705 250.0 705.0Q273 705 284.0 694.0Q295 683 295 660V530Z"/>
31
+ <path id="g25" d="M440 405Q440 428 451.0 439.0Q462 450 485 450Q508 450 519.0 439.0Q530 428 530 405V360Q530 335 523.0 312.0Q516 289 500.5 272.0Q485 255 460.5 245.0Q436 235 400 235Q353 235 324.5 254.5Q296 274 275.5 297.5Q255 321 238.5 340.5Q222 360 200 360Q180 360 170.0 348.0Q160 336 160 317V280Q160 257 149.0 246.0Q138 235 115 235Q92 235 81.0 246.0Q70 257 70 280V327Q70 353 77.0 375.5Q84 398 99.5 414.5Q115 431 139.5 440.5Q164 450 200 450Q245 450 273.5 430.5Q302 411 322.5 387.5Q343 364 360.0 344.5Q377 325 400 325Q421 325 430.5 336.5Q440 348 440 370Z"/>
32
+ <path id="g26" d="M270 0h60v100h-60z M270 200h60v100h-60z M270 400h60v140l100 -100 42 42 -172 172 -172 -172 42 -42 100 100z"/>
33
+ <path id="g27" d="M210 -210Q210 -240 195.0 -255.0Q180 -270 150 -270Q120 -270 105.0 -255.0Q90 -240 90 -210V111Q90 156 112.0 200.0Q134 244 171 271L316 379Q341 397 355.5 419.5Q370 442 370 461V616Q370 624 366.5 627.5Q363 631 355 631H320Q290 631 285.5 641.5Q281 652 302 673L409 780Q420 791 430.0 791.0Q440 791 451 780L558 673Q579 652 574.5 641.5Q570 631 540 631H505Q497 631 493.5 627.5Q490 624 490 616V451Q490 414 470.0 376.5Q450 339 418 315L263 200Q237 181 223.5 155.0Q210 129 210 100ZM90 910Q90 940 105.0 955.0Q120 970 150 970Q180 970 195.0 955.0Q210 940 210 910V453L90 364Z"/>
34
+ <path id="g28" d="M160 418 0 144V648Q0 696 34.0 730.0Q68 764 115 764H327Q375 764 409 730L457 682Q491 648 538 648H750Q798 648 832.0 614.0Q866 580 865 533V475H260Q193 475 160 418ZM210 389Q226 417 260 417H981Q1015 417 1031.0 388.0Q1047 359 1031 330L829 -16Q813 -44 779 -44H58Q24 -44 8.0 -15.0Q-8 14 8 43Z"/>
35
+ </defs>
36
+ <rect width="484" height="136" rx="8" fill="#161b22"/>
37
+ <g fill="#b1bac4">
38
+ <use href="#g28" transform="translate(20 40) scale(0.02 -0.02)"/>
39
+ <use href="#g25" transform="translate(44 40) scale(0.02 -0.02)"/>
40
+ <use href="#g5" transform="translate(56 40) scale(0.02 -0.02)"/>
41
+ <use href="#g10" transform="translate(68 40) scale(0.02 -0.02)"/>
42
+ <use href="#g5" transform="translate(80 40) scale(0.02 -0.02)"/>
43
+ <use href="#g11" transform="translate(92 40) scale(0.02 -0.02)"/>
44
+ <use href="#g5" transform="translate(104 40) scale(0.02 -0.02)"/>
45
+ <use href="#g14" transform="translate(116 40) scale(0.02 -0.02)"/>
46
+ <use href="#g15" transform="translate(128 40) scale(0.02 -0.02)"/>
47
+ <use href="#g18" transform="translate(140 40) scale(0.02 -0.02)"/>
48
+ <use href="#g20" transform="translate(152 40) scale(0.02 -0.02)"/>
49
+ <use href="#g4" transform="translate(164 40) scale(0.02 -0.02)"/>
50
+ <use href="#g12" transform="translate(176 40) scale(0.02 -0.02)"/>
51
+ <use href="#g21" transform="translate(188 40) scale(0.02 -0.02)"/>
52
+ <use href="#g21" transform="translate(200 40) scale(0.02 -0.02)"/>
53
+ </g>
54
+ <g fill="#79c0ff">
55
+ <use href="#g1" transform="translate(224 40) scale(0.02 -0.02)"/>
56
+ <use href="#g27" transform="translate(236 40) scale(0.02 -0.02)"/>
57
+ <use href="#g18" transform="translate(260 40) scale(0.02 -0.02)"/>
58
+ <use href="#g12" transform="translate(272 40) scale(0.02 -0.02)"/>
59
+ <use href="#g16" transform="translate(284 40) scale(0.02 -0.02)"/>
60
+ <use href="#g19" transform="translate(296 40) scale(0.02 -0.02)"/>
61
+ <use href="#g2" transform="translate(308 40) scale(0.02 -0.02)"/>
62
+ </g>
63
+ <g fill="#b1bac4">
64
+ <use href="#g28" transform="translate(20 72) scale(0.02 -0.02)"/>
65
+ </g>
66
+ <g fill="#79c0ff">
67
+ <use href="#g11" transform="translate(44 72) scale(0.02 -0.02)"/>
68
+ <use href="#g22" transform="translate(56 72) scale(0.02 -0.02)"/>
69
+ <use href="#g20" transform="translate(68 72) scale(0.02 -0.02)"/>
70
+ <use href="#g17" transform="translate(80 72) scale(0.02 -0.02)"/>
71
+ <use href="#g15" transform="translate(92 72) scale(0.02 -0.02)"/>
72
+ <use href="#g13" transform="translate(104 72) scale(0.02 -0.02)"/>
73
+ <use href="#g24" transform="translate(116 72) scale(0.02 -0.02)"/>
74
+ <use href="#g23" transform="translate(128 72) scale(0.02 -0.02)"/>
75
+ </g>
76
+ <g fill="#b1bac4">
77
+ <use href="#g5" transform="translate(140 72) scale(0.02 -0.02)"/>
78
+ <use href="#g14" transform="translate(152 72) scale(0.02 -0.02)"/>
79
+ <use href="#g15" transform="translate(164 72) scale(0.02 -0.02)"/>
80
+ <use href="#g18" transform="translate(176 72) scale(0.02 -0.02)"/>
81
+ <use href="#g20" transform="translate(188 72) scale(0.02 -0.02)"/>
82
+ <use href="#g4" transform="translate(200 72) scale(0.02 -0.02)"/>
83
+ <use href="#g12" transform="translate(212 72) scale(0.02 -0.02)"/>
84
+ <use href="#g21" transform="translate(224 72) scale(0.02 -0.02)"/>
85
+ <use href="#g21" transform="translate(236 72) scale(0.02 -0.02)"/>
86
+ </g>
87
+ <g fill="#e3b341">
88
+ <use href="#g1" transform="translate(260 72) scale(0.02 -0.02)"/>
89
+ <use href="#g27" transform="translate(272 72) scale(0.02 -0.02)"/>
90
+ <use href="#g18" transform="translate(296 72) scale(0.02 -0.02)"/>
91
+ <use href="#g12" transform="translate(308 72) scale(0.02 -0.02)"/>
92
+ <use href="#g16" transform="translate(320 72) scale(0.02 -0.02)"/>
93
+ <use href="#g19" transform="translate(332 72) scale(0.02 -0.02)"/>
94
+ <use href="#g3" transform="translate(356 72) scale(0.02 -0.02)"/>
95
+ <use href="#g7" transform="translate(368 72) scale(0.02 -0.02)"/>
96
+ <use href="#g0" transform="translate(392 72) scale(0.02 -0.02)"/>
97
+ <use href="#g6" transform="translate(404 72) scale(0.02 -0.02)"/>
98
+ <use href="#g9" transform="translate(428 72) scale(0.02 -0.02)"/>
99
+ <use href="#g8" transform="translate(440 72) scale(0.02 -0.02)"/>
100
+ <use href="#g2" transform="translate(452 72) scale(0.02 -0.02)"/>
101
+ </g>
102
+ <g fill="#b1bac4">
103
+ <use href="#g28" transform="translate(20 104) scale(0.02 -0.02)"/>
104
+ </g>
105
+ <g fill="#79c0ff">
106
+ <use href="#g14" transform="translate(44 104) scale(0.02 -0.02)"/>
107
+ <use href="#g15" transform="translate(56 104) scale(0.02 -0.02)"/>
108
+ <use href="#g18" transform="translate(68 104) scale(0.02 -0.02)"/>
109
+ <use href="#g20" transform="translate(80 104) scale(0.02 -0.02)"/>
110
+ </g>
111
+ <g fill="#b1bac4">
112
+ </g>
113
+ <g fill="#79c0ff">
114
+ <use href="#g1" transform="translate(104 104) scale(0.02 -0.02)"/>
115
+ <use href="#g27" transform="translate(116 104) scale(0.02 -0.02)"/>
116
+ <use href="#g18" transform="translate(140 104) scale(0.02 -0.02)"/>
117
+ <use href="#g12" transform="translate(152 104) scale(0.02 -0.02)"/>
118
+ <use href="#g16" transform="translate(164 104) scale(0.02 -0.02)"/>
119
+ <use href="#g19" transform="translate(176 104) scale(0.02 -0.02)"/>
120
+ <use href="#g26" transform="translate(200 104) scale(0.02 -0.02)"/>
121
+ <use href="#g6" transform="translate(212 104) scale(0.02 -0.02)"/>
122
+ <use href="#g2" transform="translate(224 104) scale(0.02 -0.02)"/>
123
+ </g>
124
+ </svg>
@@ -0,0 +1,65 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="472" height="72" viewBox="0 0 472 72" role="img" aria-labelledby="title desc">
2
+ <title id="title">Git status example</title>
3
+ <desc id="desc">demo on main: behind 2, ahead 1, stash 1, conflicts 2, staged 3, unstaged 4, untracked 5.</desc>
4
+ <metadata>Maple Mono NF CN outlines. Icon attribution: see THIRD_PARTY_NOTICES.md. No font files required.</metadata>
5
+ <defs>
6
+ <path id="g0" d="M237 675Q235 708 251.0 724.0Q267 740 300 740Q333 740 349.0 724.0Q365 708 363 675L347 285Q346 262 334.5 251.0Q323 240 300 240Q277 240 265.5 251.0Q254 262 253 285ZM224 67Q224 99 246.0 121.0Q268 143 300 143Q316 143 330.0 137.0Q344 131 354.5 120.5Q365 110 371.0 96.5Q377 83 377 67Q377 51 371.0 37.0Q365 23 354.5 12.5Q344 2 330.0 -4.0Q316 -10 300 -10Q284 -10 270.5 -4.0Q257 2 246.5 12.5Q236 23 230.0 37.0Q224 51 224 67Z"/>
7
+ <path id="g1" d="M442 -90Q459 -106 459.5 -121.5Q460 -137 445 -154Q429 -171 411.5 -172.0Q394 -173 377 -159Q320 -111 275.5 -56.5Q231 -2 201.0 61.0Q171 124 155.5 196.0Q140 268 140 350Q140 433 154.5 502.0Q169 571 198.0 631.0Q227 691 270.0 742.5Q313 794 370 841Q388 856 405.5 855.0Q423 854 440 837Q456 820 455.0 805.5Q454 791 436 775Q393 737 355.5 691.0Q318 645 290.0 592.0Q262 539 246.0 478.5Q230 418 230 350Q230 283 247.0 221.0Q264 159 292.5 103.5Q321 48 360.0 -1.0Q399 -50 442 -90Z"/>
8
+ <path id="g2" d="M148 -90Q192 -50 230.5 -1.0Q269 48 297.5 103.5Q326 159 343.0 221.0Q360 283 360 350Q360 418 344.0 478.5Q328 539 300.0 592.0Q272 645 234.5 691.0Q197 737 154 775Q136 791 135.0 805.5Q134 820 150 837Q167 854 184.5 855.0Q202 856 220 841Q277 794 320.0 742.5Q363 691 392.0 631.0Q421 571 435.5 502.0Q450 433 450 350Q450 268 434.5 196.0Q419 124 389.0 61.0Q359 -2 314.5 -56.5Q270 -111 213 -159Q196 -173 178.5 -172.0Q161 -171 145 -154Q130 -137 130.5 -121.5Q131 -106 148 -90Z"/>
9
+ <path id="g3" d="M300 70Q277 70 266.0 81.0Q255 92 255 115V252L136 183Q129 179 122.5 177.0Q116 175 110 175Q101 175 93.5 180.0Q86 185 80.0 192.5Q74 200 70.5 209.5Q67 219 67 227Q67 238 73.0 246.0Q79 254 91 261L210 330L91 399Q79 406 73.0 414.0Q67 422 67 433Q67 441 70.5 450.5Q74 460 80.0 467.5Q86 475 93.5 480.0Q101 485 110 485Q116 485 122.5 483.0Q129 481 136 477L255 408V545Q255 568 266.0 579.0Q277 590 300 590Q323 590 334.0 579.0Q345 568 345 545V408L464 477Q471 481 477.5 483.0Q484 485 490 485Q499 485 506.5 480.0Q514 475 520.0 467.5Q526 460 529.5 450.5Q533 441 533 433Q533 422 527.0 414.0Q521 406 509 399L390 330L509 261Q521 254 527.0 246.0Q533 238 533 227Q533 219 529.5 209.5Q526 200 520.0 192.5Q514 185 506.5 180.0Q499 175 490 175Q484 175 477.5 177.0Q471 179 464 183L345 252V115Q345 92 334.0 81.0Q323 70 300 70Z"/>
10
+ <path id="g4" d="M300 95Q277 95 266.0 106.0Q255 117 255 140V285H110Q87 285 76.0 296.0Q65 307 65 330Q65 353 76.0 364.0Q87 375 110 375H255V520Q255 543 266.0 554.0Q277 565 300 565Q323 565 334.0 554.0Q345 543 345 520V375H490Q513 375 524.0 364.0Q535 353 535 330Q535 307 524.0 296.0Q513 285 490 285H345V140Q345 117 334.0 106.0Q323 95 300 95Z"/>
11
+ <path id="g5" d="M125 0Q102 0 91.0 11.0Q80 22 80.0 45.0Q80 68 91.0 79.0Q102 90 125 90H288V612Q288 625 285.0 631.0Q282 637 276 637Q272 637 267.5 634.5Q263 632 257 627L159 549Q145 538 134.0 532.5Q123 527 115 527Q102 527 96.0 538.5Q90 550 90 573Q90 595 96.0 607.5Q102 620 113 629L223 715Q240 729 258.0 734.5Q276 740 298 740Q339 740 358.5 720.5Q378 701 378 660V90H505Q528 90 539.0 79.0Q550 68 550.0 45.0Q550 22 539.0 11.0Q528 0 505 0Z"/>
12
+ <path id="g6" d="M136 0Q107 0 91.5 14.5Q76 29 76 58Q76 74 81.0 87.5Q86 101 97 112L319 342Q335 359 354.0 380.5Q373 402 389.5 426.0Q406 450 417.0 475.5Q428 501 428 526Q428 561 417.0 584.5Q406 608 387.0 622.5Q368 637 342.0 643.5Q316 650 286 650Q246 650 218.5 640.5Q191 631 166 616Q148 605 130.5 612.5Q113 620 103 637Q94 653 99.5 670.0Q105 687 120 698Q152 721 192.0 730.5Q232 740 289 740Q336 740 377.5 730.5Q419 721 450.0 698.0Q481 675 499.5 636.0Q518 597 518 537Q518 506 508.0 474.5Q498 443 481.5 412.0Q465 381 442.5 352.0Q420 323 395 296L218 108Q213 103 215.5 96.5Q218 90 235 90H492Q515 90 526.0 79.0Q537 68 537 45Q537 22 526.0 11.0Q515 0 492 0Z"/>
13
+ <path id="g7" d="M101 21Q81 29 73.5 46.5Q66 64 75 84Q83 102 100.5 109.5Q118 117 144 106Q171 95 205.5 87.5Q240 80 272 80Q344 80 387.0 116.5Q430 153 430 226Q430 265 406.5 288.0Q383 311 349.0 322.5Q315 334 276.0 336.5Q237 339 205 337Q196 336 188.0 338.5Q180 341 173.5 346.5Q167 352 163.5 361.0Q160 370 160 383Q160 406 173.5 416.5Q187 427 217 427Q243 427 274.0 432.5Q305 438 332.5 452.0Q360 466 378.5 489.5Q397 513 397 549Q397 579 383.5 598.5Q370 618 349.0 629.5Q328 641 303.0 645.5Q278 650 254 650Q226 650 202.0 644.5Q178 639 155 626Q140 618 123.0 624.0Q106 630 97 648Q89 663 93.5 680.5Q98 698 117 711Q137 725 175.0 732.5Q213 740 255 740Q299 740 340.5 731.0Q382 722 414.5 700.5Q447 679 467.0 644.0Q487 609 487 558Q487 529 480.5 501.5Q474 474 460.5 452.0Q447 430 426.0 414.5Q405 399 376 394Q414 391 441.5 375.5Q469 360 486.5 334.5Q504 309 512.0 275.5Q520 242 520 204Q520 156 503.5 117.0Q487 78 455.5 49.5Q424 21 378.0 5.5Q332 -10 272 -10Q229 -10 182.0 -2.0Q135 6 101 21Z"/>
14
+ <path id="g8" d="M360 255V538Q360 549 358.5 553.0Q357 557 354 557Q352 557 348.0 554.5Q344 552 339 544L186 289Q182 283 180.5 278.0Q179 273 179 269Q179 261 185.5 258.0Q192 255 205 255ZM360 165H128Q94 165 77.0 181.5Q60 198 60 230Q60 244 63.0 254.0Q66 264 72 274L344 714Q352 727 364.0 733.5Q376 740 394 740Q421 740 435.5 725.0Q450 710 450 680V255H510Q533 255 544.0 244.0Q555 233 555 210Q555 187 544.0 176.0Q533 165 510 165H450V35Q450 12 439.0 1.0Q428 -10 405 -10Q382 -10 371.0 1.0Q360 12 360 35Z"/>
15
+ <path id="g9" d="M520 204Q520 156 503.5 117.0Q487 78 455.5 49.5Q424 21 378.0 5.5Q332 -10 272 -10Q229 -10 182.0 -2.0Q135 6 101 21Q81 29 73.5 46.5Q66 64 75 84Q83 102 100.5 109.5Q118 117 144 106Q171 95 205.5 87.5Q240 80 272 80Q344 80 387.0 116.5Q430 153 430 226Q430 263 413.0 287.0Q396 311 366.5 325.5Q337 340 297.0 345.5Q257 351 210 351H190Q149 351 129.5 370.5Q110 390 110 432V650Q110 691 129.5 710.5Q149 730 190 730H461Q484 730 495.0 719.0Q506 708 506 685Q506 662 495.0 651.0Q484 640 461 640H240Q220 640 210.0 630.0Q200 620 200 600V481Q200 461 210.0 451.0Q220 441 240 441Q290 441 339.5 434.5Q389 428 429.5 403.5Q470 379 495.0 332.0Q520 285 520 204Z"/>
16
+ <path id="g10" d="M118 618Q136 683 189.0 711.5Q242 740 318 740Q410 740 463.5 696.5Q517 653 517 552Q517 517 507.5 490.5Q498 464 483.0 443.5Q468 423 449.5 407.5Q431 392 413 378Q387 359 370.5 337.5Q354 316 349 285Q344 262 332.0 251.0Q320 240 297 240Q271 240 259.5 253.5Q248 267 251 298Q255 336 276.0 369.0Q297 402 331 425Q352 439 369.5 451.5Q387 464 400.0 477.5Q413 491 420.0 508.5Q427 526 427 551Q427 601 398.0 625.5Q369 650 318 650Q296 650 278.5 645.5Q261 641 247.5 633.0Q234 625 225.5 612.5Q217 600 212 585Q206 565 193.5 555.0Q181 545 159 545Q133 545 120.0 561.0Q107 577 118 618ZM224 67Q224 99 246.0 121.0Q268 143 300 143Q316 143 330.0 137.0Q344 131 354.5 120.5Q365 110 371.0 96.5Q377 83 377 67Q377 51 371.0 37.0Q365 23 354.5 12.5Q344 2 330.0 -4.0Q316 -10 300 -10Q284 -10 270.5 -4.0Q257 2 246.5 12.5Q236 23 230.0 37.0Q224 51 224 67Z"/>
17
+ <path id="g11" d="M242 -10Q206 -10 174.5 2.0Q143 14 120.0 41.5Q97 69 83.5 113.5Q70 158 70 224Q70 293 84.0 354.5Q98 416 126.5 461.5Q155 507 198.5 533.5Q242 560 300 560Q348 560 375 536Q397 516 410 487Q412 502 414 516Q418 541 431.0 550.5Q444 560 465 560Q489 560 498.5 549.5Q508 539 504 516Q494 457 489.0 399.5Q484 342 485.5 283.5Q487 225 495.5 163.5Q504 102 520 34Q525 12 517.0 1.0Q509 -10 486.0 -10.0Q463 -10 449.0 1.0Q435 12 430 34Q418 83 410 129Q404 111 396 94Q374 48 336.5 19.0Q299 -10 242 -10ZM251 80Q282 80 308.5 96.5Q335 113 354.0 143.0Q373 173 384.0 215.0Q395 257 395 308Q395 332 393.5 360.5Q392 389 384.0 413.0Q376 437 358.5 453.5Q341 470 308 470Q277 470 250.0 450.5Q223 431 203.0 397.0Q183 363 171.5 316.0Q160 269 160 215Q160 151 182.5 115.5Q205 80 251 80Z"/>
18
+ <path id="g12" d="M465 -10Q442 -10 431.0 1.5Q420 13 420 36V100Q411 75 397.5 55.0Q384 35 366.0 20.5Q348 6 325.0 -2.0Q302 -10 273 -10Q212 -10 174.0 14.0Q136 38 115.0 76.5Q94 115 87.0 162.5Q80 210 80 256Q80 310 88.0 364.5Q96 419 118.0 462.5Q140 506 180.0 533.0Q220 560 283 560Q338 560 374.5 530.5Q411 501 420 456V695Q420 718 431.0 729.0Q442 740 465 740Q488 740 499.0 729.0Q510 718 510 695V36Q510 13 499.0 1.5Q488 -10 465 -10ZM282 80Q309 80 334.0 91.0Q359 102 378.0 119.5Q397 137 408.5 159.5Q420 182 420 206V316Q420 340 411.0 367.0Q402 394 386.0 417.0Q370 440 347.5 455.0Q325 470 298 470Q255 470 230.0 452.0Q205 434 191.5 404.5Q178 375 174.0 337.5Q170 300 170 262Q170 223 175.0 189.5Q180 156 192.5 131.5Q205 107 227.0 93.5Q249 80 282 80Z"/>
19
+ <path id="g13" d="M459 132Q478 132 490.5 118.5Q503 105 503 88Q503 79 498.5 70.5Q494 62 482 50Q466 35 448.0 24.0Q430 13 409.5 5.0Q389 -3 366.5 -6.5Q344 -10 319 -10Q261 -10 215.5 9.5Q170 29 138.5 65.5Q107 102 90.0 154.5Q73 207 73 272Q73 329 85.5 381.5Q98 434 125.5 473.5Q153 513 197.0 536.5Q241 560 305 560Q365 560 405.0 539.5Q445 519 469.5 482.0Q494 445 504.5 395.5Q515 346 515 287Q515 269 502.0 254.5Q489 240 468 240H165Q169 200 182.0 169.5Q195 139 215.0 119.5Q235 100 261.5 90.0Q288 80 320 80Q365 80 391.5 94.0Q418 108 433 120Q441 127 446.0 129.5Q451 132 459 132ZM409 320Q414 320 419.5 326.0Q425 332 425 353Q425 374 417.0 395.0Q409 416 393.5 432.5Q378 449 355.5 459.5Q333 470 305 470Q274 470 249.5 459.0Q225 448 207.5 428.0Q190 408 179.5 380.5Q169 353 165 320Z"/>
20
+ <path id="g14" d="M512 90Q532 90 543.5 77.5Q555 65 555.0 45.0Q555 25 543.5 12.5Q532 0 512 0H128Q108 0 96.5 12.5Q85 25 85.0 45.0Q85 65 96.5 77.5Q108 90 128 90H280V400Q280 420 270.0 430.0Q260 440 240 440H149Q129 440 117.0 452.5Q105 465 105.0 485.0Q105 505 117.0 517.5Q129 530 149 530H290Q331 530 350.5 510.5Q370 491 370 450V90ZM320 629Q287 629 268.0 646.0Q249 663 249 692Q249 722 268.0 739.5Q287 757 320 757Q353 757 372.0 739.5Q391 722 391 692Q391 663 372.0 646.0Q353 629 320 629Z"/>
21
+ <path id="g15" d="M103 -10Q83 -10 69.0 2.5Q55 15 55 37V520Q55 539 68.0 549.5Q81 560 100 560Q120 560 132.5 549.5Q145 539 145 520V485Q156 520 175.0 540.0Q194 560 235 560Q278 560 302.5 537.5Q327 515 332 485Q340 517 365.0 538.5Q390 560 435 560Q466 560 487.0 549.0Q508 538 521.0 518.5Q534 499 539.5 473.5Q545 448 545 418V37Q545 15 531.5 2.5Q518 -10 498 -10Q478 -10 464.5 2.5Q451 15 451 37V409Q451 436 439.5 458.5Q428 481 396 481Q365 481 353.5 459.0Q342 437 342 410V32Q342 12 330.0 1.0Q318 -10 300 -10Q282 -10 270.0 1.0Q258 12 258 32V409Q258 435 247.0 458.0Q236 481 204 481Q173 481 161.0 459.5Q149 438 149 410V37Q149 15 136.0 2.5Q123 -10 103 -10Z"/>
22
+ <path id="g16" d="M185 35Q185 12 174.0 1.0Q163 -10 140 -10Q117 -10 106.0 1.0Q95 12 95 35V515Q95 538 106.0 549.0Q117 560 140 560Q163 560 174.0 549.0Q185 538 185 515V456Q199 504 233.0 532.0Q267 560 322 560Q362 560 395.5 546.5Q429 533 453.5 508.0Q478 483 491.5 448.0Q505 413 505 370V35Q505 12 494.0 1.0Q483 -10 460 -10Q437 -10 426.0 1.0Q415 12 415 35V344Q415 370 408.0 393.5Q401 417 387.5 435.0Q374 453 354.0 464.0Q334 475 307 475Q280 475 257.5 459.0Q235 443 219.0 419.5Q203 396 194.0 368.0Q185 340 185 316Z"/>
23
+ <path id="g17" d="M300 -10Q242 -10 200.0 11.5Q158 33 130.0 71.0Q102 109 88.5 161.5Q75 214 75 276Q75 338 88.0 390.0Q101 442 129.0 479.5Q157 517 199.5 538.5Q242 560 300 560Q359 560 401.5 538.5Q444 517 471.5 479.5Q499 442 512.0 390.0Q525 338 525 276Q525 214 511.5 161.5Q498 109 470.5 71.0Q443 33 400.5 11.5Q358 -10 300 -10ZM300 80Q335 80 360.5 94.5Q386 109 402.5 134.5Q419 160 427.0 196.5Q435 233 435 276Q435 319 427.5 354.5Q420 390 403.5 415.5Q387 441 361.5 455.5Q336 470 300 470Q264 470 238.5 455.5Q213 441 196.5 415.5Q180 390 172.5 354.0Q165 318 165 275Q165 232 173.0 196.0Q181 160 197.5 134.5Q214 109 239.5 94.5Q265 80 300 80Z"/>
24
+ <path id="g18" d="M440 405Q440 428 451.0 439.0Q462 450 485 450Q508 450 519.0 439.0Q530 428 530 405V360Q530 335 523.0 312.0Q516 289 500.5 272.0Q485 255 460.5 245.0Q436 235 400 235Q353 235 324.5 254.5Q296 274 275.5 297.5Q255 321 238.5 340.5Q222 360 200 360Q180 360 170.0 348.0Q160 336 160 317V280Q160 257 149.0 246.0Q138 235 115 235Q92 235 81.0 246.0Q70 257 70 280V327Q70 353 77.0 375.5Q84 398 99.5 414.5Q115 431 139.5 440.5Q164 450 200 450Q245 450 273.5 430.5Q302 411 322.5 387.5Q343 364 360.0 344.5Q377 325 400 325Q421 325 430.5 336.5Q440 348 440 370Z"/>
25
+ <path id="g19" d="M270 0h60v100h-60z M270 200h60v100h-60z M270 400h60v140l100 -100 42 42 -172 172 -172 -172 42 -42 100 100z"/>
26
+ <path id="g20" d="M270 650h60v-100h-60z M270 450h60v-100h-60z M270 250h60v-140l100 100 42 -42 -172 -172 -172 172 42 42 100 -100z"/>
27
+ <path id="g21" d="M210 -210Q210 -240 195.0 -255.0Q180 -270 150 -270Q120 -270 105.0 -255.0Q90 -240 90 -210V111Q90 156 112.0 200.0Q134 244 171 271L316 379Q341 397 355.5 419.5Q370 442 370 461V616Q370 624 366.5 627.5Q363 631 355 631H320Q290 631 285.5 641.5Q281 652 302 673L409 780Q420 791 430.0 791.0Q440 791 451 780L558 673Q579 652 574.5 641.5Q570 631 540 631H505Q497 631 493.5 627.5Q490 624 490 616V451Q490 414 470.0 376.5Q450 339 418 315L263 200Q237 181 223.5 155.0Q210 129 210 100ZM90 910Q90 940 105.0 955.0Q120 970 150 970Q180 970 195.0 955.0Q210 940 210 910V453L90 364Z"/>
28
+ <path id="g22" d="M160 418 0 144V648Q0 696 34.0 730.0Q68 764 115 764H327Q375 764 409 730L457 682Q491 648 538 648H750Q798 648 832.0 614.0Q866 580 865 533V475H260Q193 475 160 418ZM210 389Q226 417 260 417H981Q1015 417 1031.0 388.0Q1047 359 1031 330L829 -16Q813 -44 779 -44H58Q24 -44 8.0 -15.0Q-8 14 8 43Z"/>
29
+ </defs>
30
+ <rect width="472" height="72" rx="8" fill="#161b22"/>
31
+ <g fill="#b1bac4">
32
+ <use href="#g22" transform="translate(20 40) scale(0.02 -0.02)"/>
33
+ </g>
34
+ <g fill="#79c0ff">
35
+ <use href="#g12" transform="translate(44 40) scale(0.02 -0.02)"/>
36
+ <use href="#g13" transform="translate(56 40) scale(0.02 -0.02)"/>
37
+ <use href="#g15" transform="translate(68 40) scale(0.02 -0.02)"/>
38
+ <use href="#g17" transform="translate(80 40) scale(0.02 -0.02)"/>
39
+ </g>
40
+ <g fill="#b1bac4">
41
+ </g>
42
+ <g fill="#e3b341">
43
+ <use href="#g1" transform="translate(104 40) scale(0.02 -0.02)"/>
44
+ <use href="#g21" transform="translate(116 40) scale(0.02 -0.02)"/>
45
+ <use href="#g15" transform="translate(140 40) scale(0.02 -0.02)"/>
46
+ <use href="#g11" transform="translate(152 40) scale(0.02 -0.02)"/>
47
+ <use href="#g14" transform="translate(164 40) scale(0.02 -0.02)"/>
48
+ <use href="#g16" transform="translate(176 40) scale(0.02 -0.02)"/>
49
+ <use href="#g20" transform="translate(200 40) scale(0.02 -0.02)"/>
50
+ <use href="#g6" transform="translate(212 40) scale(0.02 -0.02)"/>
51
+ <use href="#g19" transform="translate(236 40) scale(0.02 -0.02)"/>
52
+ <use href="#g5" transform="translate(248 40) scale(0.02 -0.02)"/>
53
+ <use href="#g3" transform="translate(272 40) scale(0.02 -0.02)"/>
54
+ <use href="#g5" transform="translate(284 40) scale(0.02 -0.02)"/>
55
+ <use href="#g18" transform="translate(308 40) scale(0.02 -0.02)"/>
56
+ <use href="#g6" transform="translate(320 40) scale(0.02 -0.02)"/>
57
+ <use href="#g4" transform="translate(344 40) scale(0.02 -0.02)"/>
58
+ <use href="#g7" transform="translate(356 40) scale(0.02 -0.02)"/>
59
+ <use href="#g0" transform="translate(380 40) scale(0.02 -0.02)"/>
60
+ <use href="#g8" transform="translate(392 40) scale(0.02 -0.02)"/>
61
+ <use href="#g10" transform="translate(416 40) scale(0.02 -0.02)"/>
62
+ <use href="#g9" transform="translate(428 40) scale(0.02 -0.02)"/>
63
+ <use href="#g2" transform="translate(440 40) scale(0.02 -0.02)"/>
64
+ </g>
65
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-path-bar",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "A Pi extension for compact paths, folder aliases, and theme-aware Git status",
6
6
  "license": "MIT",
@@ -21,6 +21,8 @@
21
21
  },
22
22
  "files": [
23
23
  "src/",
24
+ "assets/",
25
+ "CHANGELOG.md",
24
26
  "README.md",
25
27
  "README.zh-CN.md",
26
28
  "LICENSE",
@@ -49,9 +51,9 @@
49
51
  "@earendil-works/pi-tui": "*"
50
52
  },
51
53
  "devDependencies": {
52
- "@earendil-works/pi-coding-agent": "^1.1.0",
53
- "@earendil-works/pi-tui": "^1.1.0",
54
- "@types/node": "^26.6.4",
54
+ "@earendil-works/pi-coding-agent": "^1.5.0",
55
+ "@earendil-works/pi-tui": "^1.5.0",
56
+ "@types/node": "^26.6.6",
55
57
  "typescript": "^7.0.2"
56
58
  }
57
59
  }
package/src/config.ts CHANGED
@@ -10,9 +10,10 @@ export interface Config {
10
10
  icon: boolean;
11
11
  branch: boolean;
12
12
  session: boolean;
13
+ timeFormat: "24h" | "12h";
13
14
  aliases: FolderAlias[];
14
15
  }
15
- export const defaults = (): Config => ({ mode: "short", icon: true, branch: true, session: true, aliases: [] });
16
+ export const defaults = (): Config => ({ mode: "short", icon: true, branch: true, session: true, timeFormat: "24h", aliases: [] });
16
17
 
17
18
  export function aliasName(value: string): string {
18
19
  const name = value.trim();
@@ -42,6 +43,10 @@ export function validateConfig(value: unknown): Config {
42
43
  if (!["short", "auto", "full", "native"].includes(data.mode as string)) throw new Error("Invalid path display mode.");
43
44
  config.mode = data.mode as PathMode;
44
45
  }
46
+ if (data.timeFormat !== undefined) {
47
+ if (data.timeFormat !== "24h" && data.timeFormat !== "12h") throw new Error("Invalid time format. Use 24h or 12h.");
48
+ config.timeFormat = data.timeFormat;
49
+ }
45
50
  for (const key of ["icon", "branch", "session"] as const) {
46
51
  if (data[key] === undefined) continue;
47
52
  if (typeof data[key] !== "boolean") throw new Error(`${key} must be a boolean.`);
package/src/index.ts CHANGED
@@ -18,17 +18,35 @@ export default function (pi: ExtensionAPI, configFile = join(getAgentDir(), "pi-
18
18
  catch (error) { ctx.ui.notify(`Cannot read ${store.file}: ${error instanceof Error ? error.message : String(error)}. The file will not be overwritten.`, "error"); }
19
19
  };
20
20
  let activeGit: ReturnType<typeof watchGit> | undefined;
21
+ let disposeFooter: (() => void) | undefined;
21
22
  const install = (ctx: ExtensionContext) => {
22
- activeGit?.dispose();
23
- activeGit = undefined;
23
+ disposeFooter?.();
24
+ disposeFooter = undefined;
24
25
  if (ctx.mode !== "tui") return;
25
26
  if (config.mode === "native") { ctx.ui.setFooter(undefined); return; }
26
27
  ctx.ui.setFooter((tui, theme, data) => {
27
28
  const monitor = config.branch ? watchGit(ctx.sessionManager.getCwd(), () => tui.requestRender()) : undefined;
28
29
  activeGit = monitor;
29
30
  const unsubscribe = data.onBranchChange(() => { monitor?.refresh(); tui.requestRender(); });
31
+ const clock = new Intl.DateTimeFormat("en-US", { hour: "2-digit", minute: "2-digit", hourCycle: config.timeFormat === "12h" ? "h12" : "h23" });
32
+ let minute = Math.floor(Date.now() / 60_000);
33
+ const timer = setInterval(() => {
34
+ const next = Math.floor(Date.now() / 60_000);
35
+ if (next !== minute) { minute = next; tui.requestRender(); }
36
+ }, 1000);
37
+ timer.unref();
38
+ let disposed = false;
39
+ const dispose = () => {
40
+ if (disposed) return;
41
+ disposed = true;
42
+ clearInterval(timer);
43
+ unsubscribe();
44
+ monitor?.dispose();
45
+ if (activeGit === monitor) activeGit = undefined;
46
+ };
47
+ disposeFooter = dispose;
30
48
  return {
31
- dispose() { unsubscribe(); monitor?.dispose(); if (activeGit === monitor) activeGit = undefined; },
49
+ dispose,
32
50
  invalidate() {},
33
51
  render(width: number): string[] {
34
52
  const state = monitor?.value ?? { kind: "none" as const };
@@ -37,7 +55,10 @@ export default function (pi: ExtensionAPI, configFile = join(getAgentDir(), "pi-
37
55
  const name = config.session ? ctx.sessionManager.getSessionName() : undefined;
38
56
  const suffix = `${gitSuffix}${name ? ` • ${name}` : ""}`;
39
57
  const display = resolveDisplayPath(ctx.sessionManager.getCwd(), homedir(), config.aliases);
40
- const lines = [directoryLine(display.path, suffix, width, {
58
+ const time = clock.format(new Date());
59
+ const timeWidth = visibleWidth(time);
60
+ const showClock = width >= timeWidth + 3;
61
+ const path = directoryLine(display.path, suffix, showClock ? width - timeWidth - 2 : width, {
41
62
  mode: config.mode === "native" ? "short" : config.mode,
42
63
  icon: config.icon,
43
64
  aliasName: display.aliasName,
@@ -46,7 +67,8 @@ export default function (pi: ExtensionAPI, configFile = join(getAgentDir(), "pi-
46
67
  alias: (text) => theme.fg("mdLink", text),
47
68
  suffix: (text) => theme.fg(gitColor(state), text.slice(0, gitSuffix.length)) + theme.fg("dim", text.slice(gitSuffix.length)),
48
69
  },
49
- })];
70
+ });
71
+ const lines = [showClock ? path + theme.fg("dim", " ".repeat(width - visibleWidth(path) - timeWidth) + time) : path];
50
72
 
51
73
  const totals = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, cost: 0 };
52
74
  let hitRate: number | undefined;
@@ -102,7 +124,7 @@ export default function (pi: ExtensionAPI, configFile = join(getAgentDir(), "pi-
102
124
  pi.on("session_start", async (_event, ctx) => { load(ctx); install(ctx); });
103
125
  pi.on("tool_result", () => { activeGit?.refresh(); });
104
126
  pi.on("agent_end", () => { activeGit?.refresh(); });
105
- pi.on("session_shutdown", () => { activeGit?.dispose(); activeGit = undefined; });
127
+ pi.on("session_shutdown", () => { disposeFooter?.(); disposeFooter = undefined; });
106
128
  pi.registerCommand("path-bar", {
107
129
  description: "Configure the path bar and manage folder aliases",
108
130
  handler: async (_args, ctx) => {
@@ -0,0 +1,75 @@
1
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
2
+ import { Container, isKeyRelease, isKeyRepeat, matchesKey, parseKey, ScrollView, TuiAltScreen, VStack, type Component, type TUI } from "@earendil-works/pi-tui";
3
+
4
+ // shortcut: depends on Pi 1.5.x's private layoutRoot and dock order; replace when Pi exposes a layout API.
5
+ export function readingLayout(tui: TUI, marker: Component): { original: Component; reading: Component } | undefined {
6
+ if (!(tui instanceof TuiAltScreen) || tui.hasOverlay()) return;
7
+ const root = (tui as unknown as { layoutRoot?: unknown }).layoutRoot;
8
+ if (!(root instanceof VStack) || root.children.length !== 2) return;
9
+ const [transcript, dock] = root.children;
10
+ if (!(transcript instanceof ScrollView) || !(dock instanceof VStack) || dock.children.length !== 6) return;
11
+ const [pending, status, above, editor, below, footer] = dock.children;
12
+ if (!(above instanceof Container) || !above.children.includes(marker) ||
13
+ !(editor instanceof Container) || !editor.children.includes(tui.getFocusedComponent()!) ||
14
+ !(footer instanceof Container)) return;
15
+ return {
16
+ original: root,
17
+ reading: new VStack([
18
+ { component: transcript, basis: 0, grow: 1, shrink: 1, minSize: 1 },
19
+ { component: new VStack([pending, status, above, below].map((component) => ({ component, shrink: 1, minSize: 0 }))),
20
+ basis: "auto", grow: 0, shrink: 1, minSize: 1 },
21
+ ]),
22
+ };
23
+ }
24
+
25
+ /** Experimental opt-in extension: pi -e ./src/reading-mode.ts */
26
+ export default function (pi: ExtensionAPI) {
27
+ let tui: TUI | undefined;
28
+ let marker: Component | undefined;
29
+ let restore: (() => void) | undefined;
30
+ let unsubscribeInput: (() => void) | undefined;
31
+ const cleanup = () => { exit(); unsubscribeInput?.(); unsubscribeInput = undefined; };
32
+ const exit = () => { restore?.(); restore = undefined; };
33
+ const toggle = (ctx: ExtensionContext) => {
34
+ if (restore) { exit(); return; }
35
+ if (ctx.mode !== "tui") { ctx.ui.notify("Reading mode requires TUI mode.", "warning"); return; }
36
+ if (!tui || !marker) { ctx.ui.notify("Reading mode is not initialized. Run /reload and try again.", "warning"); return; }
37
+ const layout = readingLayout(tui, marker);
38
+ if (!layout || !(tui instanceof TuiAltScreen)) {
39
+ ctx.ui.notify("Reading mode requires the supported fullscreen layout and an active editor.", "warning");
40
+ return;
41
+ }
42
+ const renderer = tui;
43
+ const focus = renderer.getFocusedComponent();
44
+ const guard: Component = { render: () => [], invalidate() {}, handleInput(data) {
45
+ if (matchesKey(data, "escape")) exit();
46
+ else if (matchesKey(data, "ctrl+c")) { exit(); focus?.handleInput?.(data); }
47
+ } };
48
+ restore = () => {
49
+ renderer.setLayoutRoot(layout.original);
50
+ if (renderer.getFocusedComponent() === guard) renderer.setFocus(focus);
51
+ renderer.requestRender();
52
+ };
53
+ renderer.setLayoutRoot(layout.reading);
54
+ renderer.setFocus(guard);
55
+ renderer.requestRender();
56
+ };
57
+ pi.registerCommand("reading-mode", { description: "Toggle reading mode (experimental); Esc restores the editor", handler: async (_args, ctx) => toggle(ctx) });
58
+ pi.on("session_start", (_event, ctx) => {
59
+ cleanup();
60
+ if (ctx.mode !== "tui") return;
61
+ ctx.ui.setWidget("pi-path-bar:reading-mode", (renderer) => {
62
+ tui = renderer;
63
+ const component = { render: () => [], invalidate() {}, dispose() { cleanup(); tui = undefined; marker = undefined; } };
64
+ marker = component;
65
+ return component;
66
+ });
67
+ // Pi 1.5.x matchesKey rejects modified Escape; leave ambiguous double-Esc input untouched.
68
+ unsubscribeInput = ctx.ui.onTerminalInput((data) => {
69
+ if (parseKey(data) !== "alt+escape") return undefined;
70
+ if (!isKeyRelease(data) && !isKeyRepeat(data)) toggle(ctx);
71
+ return { consume: true };
72
+ });
73
+ });
74
+ pi.on("session_shutdown", cleanup);
75
+ }
package/src/settings.ts CHANGED
@@ -25,15 +25,17 @@ export async function openSettings(ctx: ExtensionContext, get: () => Config, sav
25
25
  const items: SettingItem[] = [
26
26
  { id: "mode", label: "Path display", currentValue: modes[config.mode], values: Object.values(modes), description: "Short: always abbreviate. Auto: abbreviate when needed. Full: never abbreviate." },
27
27
  ...([ ["icon", "Folder icon"], ["branch", "Git status"], ["session", "Session name"] ] as const).map(([id, label]) => ({ id, label, currentValue: config[id] ? "On" : "Off", values: switches })),
28
+ { id: "timeFormat", label: "Time format", currentValue: config.timeFormat, values: ["24h", "12h"], description: "Local time at the right of the path line. 12h includes AM/PM. Not shown in Native footer mode." },
28
29
  { id: "add", label: "Add folder alias", currentValue: "Open", values: ["Open"], description: "Name any folder. A blank path uses the current directory. Only the display changes." },
29
30
  { id: "manage", label: "Manage folder aliases", currentValue: `${config.aliases.length} aliases`, values: ["Open"], description: "Edit a path or name, or delete an alias." },
30
31
  ];
31
32
  const list = new SettingsList(items, 10, getSettingsListTheme(), (id, value) => {
32
33
  selected = id;
33
34
  if (id === "add" || id === "manage") { done(id); return; }
34
- const previous = id === "mode" ? modes[get().mode] : get()[id as "icon" | "branch" | "session"] ? "On" : "Off";
35
+ const previous = id === "mode" ? modes[get().mode] : id === "timeFormat" ? get().timeFormat : get()[id as "icon" | "branch" | "session"] ? "On" : "Off";
35
36
  const success = save((next) => {
36
37
  if (id === "mode") next.mode = (Object.keys(modes) as PathMode[]).find((mode) => modes[mode] === value)!;
38
+ else if (id === "timeFormat") next.timeFormat = value as Config["timeFormat"];
37
39
  else next[id as "icon" | "branch" | "session"] = value === "On";
38
40
  });
39
41
  if (!success) list.updateValue(id, previous);