pi-path-bar 0.3.0 → 0.4.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 +6 -0
- package/README.md +6 -8
- package/README.zh-CN.md +6 -8
- package/package.json +3 -2
- package/src/reading-mode.ts +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.4.0]
|
|
4
|
+
|
|
5
|
+
- Reading mode now loads automatically with pi-path-bar. Hide the editor and footer while keeping conversation and tool output visible.
|
|
6
|
+
- Toggle with `Alt+Esc` (Option+Esc on Mac) or `/reading-mode`; press `Esc` to restore the interface. Requires Pi 1.5 or later in fullscreen mode and a compatible terminal.
|
|
7
|
+
- When upgrading from the standalone version, remove `-e ./src/reading-mode.ts` from your launch command to avoid loading it twice.
|
|
8
|
+
|
|
3
9
|
## [0.3.0]
|
|
4
10
|
|
|
5
11
|
- 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.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
A Pi
|
|
5
|
+
A Pi extension for a compact footer and focused reading. Shows paths, folder aliases, Git status, and local time. Keeps usage statistics, model information, and other extension status lines.
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
@@ -70,19 +70,17 @@ For example, name `~/CloudDrive/Projects/demo-app` **demo**:
|
|
|
70
70
|
|
|
71
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.
|
|
72
72
|
|
|
73
|
-
##
|
|
73
|
+
## Reading mode
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```sh
|
|
78
|
-
pi -e ./src/reading-mode.ts
|
|
79
|
-
```
|
|
75
|
+
Loaded automatically with the extension. Enter with the shortcut or command.
|
|
80
76
|
|
|
81
77
|
- **`Alt+Esc`** (Mac: **`Option+Esc`**): hide the editor and footer. Conversation and tool output remain available for scrolling.
|
|
82
78
|
- **A single `Esc`** or **`Alt+Esc`** again: restore the interface and keep your draft.
|
|
83
79
|
- You can also enter with **`/reading-mode`**.
|
|
84
80
|
|
|
85
|
-
Requires
|
|
81
|
+
Requires Pi 1.5 or later in fullscreen mode. Use the command if the shortcut does not respond. Run `/reload` after switching TUI modes.
|
|
82
|
+
|
|
83
|
+
When upgrading from the standalone version, remove the `-e ./src/reading-mode.ts` launch argument to avoid loading it twice.
|
|
86
84
|
|
|
87
85
|
## Notes
|
|
88
86
|
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
Pi
|
|
5
|
+
Pi 底栏与阅读模式扩展。显示简短路径、目录别名、Git 状态和本机时间,保留用量统计、模型信息及其他扩展的状态行。
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
@@ -70,19 +70,17 @@ pi install git:github.com/johnbitcn/pi-path-bar
|
|
|
70
70
|
|
|
71
71
|
默认主题中,蓝色表示干净,黄色表示有变更,红色表示有冲突或正在进行 Git 操作。颜色随主题调整。不在 Git 仓库时隐藏 Git 信息。
|
|
72
72
|
|
|
73
|
-
##
|
|
73
|
+
## 阅读模式
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```sh
|
|
78
|
-
pi -e ./src/reading-mode.ts
|
|
79
|
-
```
|
|
75
|
+
随扩展自动加载,按快捷键或执行命令进入。
|
|
80
76
|
|
|
81
77
|
- **`Alt+Esc`**(Mac:**`Option+Esc`**):隐藏输入框和底栏,保留对话及工具输出,可继续滚动阅读。
|
|
82
78
|
- **单次 `Esc`** 或再次 **`Alt+Esc`**:恢复界面,输入草稿保留。
|
|
83
79
|
- 也可执行 **`/reading-mode`** 进入。
|
|
84
80
|
|
|
85
|
-
|
|
81
|
+
需要 Pi 1.5 或更新版本的 fullscreen 模式。快捷键无响应时使用命令。切换 TUI 模式后,请执行 `/reload`。
|
|
82
|
+
|
|
83
|
+
从独立版本升级时,请移除 `-e ./src/reading-mode.ts` 启动参数,避免重复加载。
|
|
86
84
|
|
|
87
85
|
## 注意事项
|
|
88
86
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-path-bar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
],
|
|
39
39
|
"pi": {
|
|
40
40
|
"extensions": [
|
|
41
|
-
"./src/index.ts"
|
|
41
|
+
"./src/index.ts",
|
|
42
|
+
"./src/reading-mode.ts"
|
|
42
43
|
]
|
|
43
44
|
},
|
|
44
45
|
"scripts": {
|
package/src/reading-mode.ts
CHANGED
|
@@ -22,7 +22,6 @@ export function readingLayout(tui: TUI, marker: Component): { original: Componen
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
/** Experimental opt-in extension: pi -e ./src/reading-mode.ts */
|
|
26
25
|
export default function (pi: ExtensionAPI) {
|
|
27
26
|
let tui: TUI | undefined;
|
|
28
27
|
let marker: Component | undefined;
|
|
@@ -54,7 +53,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
54
53
|
renderer.setFocus(guard);
|
|
55
54
|
renderer.requestRender();
|
|
56
55
|
};
|
|
57
|
-
pi.registerCommand("reading-mode", { description: "Toggle reading mode
|
|
56
|
+
pi.registerCommand("reading-mode", { description: "Toggle reading mode; Esc restores the editor", handler: async (_args, ctx) => toggle(ctx) });
|
|
58
57
|
pi.on("session_start", (_event, ctx) => {
|
|
59
58
|
cleanup();
|
|
60
59
|
if (ctx.mode !== "tui") return;
|