pisesh 0.1.4 → 0.1.6
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 +9 -48
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# pisesh
|
|
2
2
|
|
|
3
|
-
**English** | [한국어](https://github.com/Blue-B/pisesh/blob/main/docs/README.ko.md)
|
|
4
|
-
|
|
5
3
|
[](https://www.npmjs.com/package/pisesh)
|
|
6
4
|
[](https://github.com/Blue-B/pisesh/actions/workflows/ci.yml)
|
|
7
5
|
[](LICENSE)
|
|
@@ -15,7 +13,7 @@
|
|
|
15
13
|
## Preview
|
|
16
14
|
|
|
17
15
|
<p align="center">
|
|
18
|
-
<img src="assets/preview.png" alt="pisesh — Favorites tab in a real Windows Terminal session" width="100%">
|
|
16
|
+
<img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/preview.png" alt="pisesh — Favorites tab in a real Windows Terminal session" width="100%">
|
|
19
17
|
</p>
|
|
20
18
|
|
|
21
19
|
<p align="center"><sub>Real capture: ★ starred session at the top, the rest available behind the <b>Today</b>, <b>Here</b>, and <b>All</b> tabs. <code>Tab</code> cycles. <code>f</code> stars. <code>Enter</code> resumes.</sub></p>
|
|
@@ -26,15 +24,15 @@ What the TUI actually looks like, screen by screen. (Demo data — not real sess
|
|
|
26
24
|
|
|
27
25
|
**Main list** — the highlighted row is selected, tabs cycle with `Tab`. The green `[NOW]` badge marks the pi session you launched from; the cyan `✎` marks a session you renamed yourself. CJK titles stay column-aligned:
|
|
28
26
|
|
|
29
|
-
<p align="center"><img src="assets/screen-list.png" alt="pisesh main list — Favorites tab with Today / Here / All tabs, [NOW] badge, and a renamed session" width="100%"></p>
|
|
27
|
+
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-list.png" alt="pisesh main list — Favorites tab with Today / Here / All tabs, [NOW] badge, and a renamed session" width="100%"></p>
|
|
30
28
|
|
|
31
29
|
**`e` — rename a session.** First user prompt is a lousy title for a long-lived thread. Press `e` to set your own; it's stored as an override (the session jsonl is never touched) and the session gets a `✎` marker in the list:
|
|
32
30
|
|
|
33
|
-
<p align="center"><img src="assets/screen-rename.png" alt="pisesh edit-name panel — setting a custom display title" width="100%"></p>
|
|
31
|
+
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-rename.png" alt="pisesh edit-name panel — setting a custom display title" width="100%"></p>
|
|
34
32
|
|
|
35
33
|
**`p` — re-point the working directory** with an arrow-key directory browser. This is the cwd pi will actually `cd` into on resume, and it's what the `Here` tab filters on. `s` locks in the highlighted directory:
|
|
36
34
|
|
|
37
|
-
<p align="center"><img src="assets/screen-cwd.png" alt="pisesh cwd browser — arrow-key directory picker for the resume / Here directory" width="100%"></p>
|
|
35
|
+
<p align="center"><img src="https://raw.githubusercontent.com/Blue-B/pisesh/main/assets/screen-cwd.png" alt="pisesh cwd browser — arrow-key directory picker for the resume / Here directory" width="100%"></p>
|
|
38
36
|
|
|
39
37
|
The **`Here` tab** shows only sessions whose effective cwd matches the directory you launched pisesh from — so inside a project you see just that project's threads, no scrolling past your home-dir scratch sessions.
|
|
40
38
|
|
|
@@ -47,7 +45,7 @@ Pi accumulates sessions across many working directories — your home, several p
|
|
|
47
45
|
- You re-open the wrong session and pollute it with unrelated context
|
|
48
46
|
- You waste time searching by timestamp guessing
|
|
49
47
|
|
|
50
|
-
pisesh is a **single-file Node script** (no dependencies, ~
|
|
48
|
+
pisesh is a **single-file Node script** (no dependencies, ~900 LoC) that gives you everything `pi --resume` doesn't.
|
|
51
49
|
|
|
52
50
|
### Value at a glance
|
|
53
51
|
|
|
@@ -57,7 +55,7 @@ pisesh is a **single-file Node script** (no dependencies, ~600 LoC) that gives y
|
|
|
57
55
|
| Give a thread a real name | `e` sets a custom title (marked `✎`); overrides the first-prompt label |
|
|
58
56
|
| See only the current project's sessions | `Here` tab filters to sessions whose cwd matches where you launched pisesh |
|
|
59
57
|
| Fix where a session resumes | `p` opens an arrow-key directory browser; sets the cwd pi `cd`s into |
|
|
60
|
-
| Find a session by what you said | `/` searches id + project + first user prompt
|
|
58
|
+
| Find a session by what you said | `/` searches id + project + first user prompt + custom title |
|
|
61
59
|
| Know which session you're attached to | `[NOW]` badge on the live session (passed from pi via env var) |
|
|
62
60
|
| Keep your terminal clean | Alt-screen buffer — exit restores your terminal byte-for-byte (like vim) |
|
|
63
61
|
| Read Korean / Chinese / Japanese prompts | Display-width-aware truncation; columns never blow up on CJK |
|
|
@@ -103,11 +101,11 @@ Pi-extension side: drop `extensions/sesh.ts` into `~/.pi/agent/extensions/` and
|
|
|
103
101
|
| `↑` `↓` / `j` `k` | move cursor |
|
|
104
102
|
| `Tab` / `h` / `l` | switch tab (`★ Favorites` → `Today` → `Here` → `All`) |
|
|
105
103
|
| `f` / `Space` | star / unstar the selected session |
|
|
106
|
-
| `Enter` | resume — spawns `pi --session <id
|
|
104
|
+
| `Enter` | resume — spawns `pi --session <id>` in the session's (or overridden) cwd |
|
|
107
105
|
| `e` | edit name — set a custom display title (marked `✎` in list) |
|
|
108
106
|
| `p` | edit cwd — arrow-key directory browser; sets resume / `Here` dir |
|
|
109
107
|
| `d` | session details (full prompt, file, byte size, timestamps) |
|
|
110
|
-
| `/` | search by id / project / first user prompt
|
|
108
|
+
| `/` | search by id / project / first user prompt / custom title |
|
|
111
109
|
| `Esc` | clear search first, then quit |
|
|
112
110
|
| `q` / `Ctrl-C` | quit (terminal restored) |
|
|
113
111
|
| `r` | rescan session files (after pi starts a new session) |
|
|
@@ -138,7 +136,7 @@ pisesh --help
|
|
|
138
136
|
| Input | Node's `readline.emitKeypressEvents` in raw mode |
|
|
139
137
|
| Width calculation | UAX #11 East Asian Width ranges, compressed to ~10 inline range checks |
|
|
140
138
|
| Pi extension | TypeScript factory using `@earendil-works/pi-coding-agent` extension API (`ui.custom`, `tui.stop`) |
|
|
141
|
-
| Storage |
|
|
139
|
+
| Storage | Two JSON files: `~/.pi/agent/favorites.json` (starred ids) + `~/.pi/agent/pisesh-meta.json` (per-session title / cwd overrides) |
|
|
142
140
|
| Session discovery | Direct filesystem scan of `~/.pi/agent/sessions/<projectSlug>/*.jsonl`; first 96 KB parsed |
|
|
143
141
|
| Process model | Slash command pauses pi's TUI, spawns pisesh with inherited stdio, restarts pi on exit |
|
|
144
142
|
|
|
@@ -149,27 +147,6 @@ pisesh --help
|
|
|
149
147
|
- No network calls, no telemetry, no analytics
|
|
150
148
|
- No daemon / background process
|
|
151
149
|
|
|
152
|
-
## How resume works
|
|
153
|
-
|
|
154
|
-
```text
|
|
155
|
-
pi (session A) ── /sesh ──▶ ui.custom + tui.stop()
|
|
156
|
-
│
|
|
157
|
-
└─▶ spawn pisesh (PISESH_CURRENT_SESSION=A)
|
|
158
|
-
│ ↑↓ Tab f / Enter on session B
|
|
159
|
-
│
|
|
160
|
-
└─▶ spawn pi --session B --session-dir <dir>
|
|
161
|
-
│
|
|
162
|
-
│ user works in B …
|
|
163
|
-
│ user types q / ^D
|
|
164
|
-
│
|
|
165
|
-
◀─── inner pi exits, pisesh exits
|
|
166
|
-
│
|
|
167
|
-
◀─── tui.start() + requestRender(true)
|
|
168
|
-
pi (session A) continues exactly where it was
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
The current pi session is paused, not lost. When you finish with the resumed session, you pop back to A with full state intact.
|
|
172
|
-
|
|
173
150
|
## Storage
|
|
174
151
|
|
|
175
152
|
| What | Where |
|
|
@@ -213,22 +190,6 @@ Korean / Chinese / Japanese / fullwidth characters render **2 cells wide** in te
|
|
|
213
190
|
- Linux: **GNOME Terminal**, **Konsole**, **xterm**, **Alacritty**, **Kitty** ✅
|
|
214
191
|
- [`pi`](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) on `$PATH` for the `Enter`-to-resume action
|
|
215
192
|
|
|
216
|
-
## Roadmap
|
|
217
|
-
|
|
218
|
-
| Status | Item |
|
|
219
|
-
| ------ | ------------------------------------------------------------------------------- |
|
|
220
|
-
| ✅ | Tabs, star/unstar, search, alt-screen, CJK width, `[NOW]` badge, pi `/sesh` |
|
|
221
|
-
| ✅ | `Here` tab — filter to sessions matching the launch directory |
|
|
222
|
-
| ✅ | Inline rename (`e`) — custom display title that overrides the first prompt |
|
|
223
|
-
| ✅ | Edit cwd (`p`) — arrow-key directory browser sets the resume / `Here` dir |
|
|
224
|
-
| 🚧 | `n` / `N` jump to next / previous search match (less-style) |
|
|
225
|
-
| 🚧 | Highlight matched substring in yellow |
|
|
226
|
-
| 🚧 | Filter by `today/yesterday/this-week` |
|
|
227
|
-
| 🧠 | Optional summarize first-N user prompts via local model for richer titles |
|
|
228
|
-
| 🧠 | Export starred sessions as a single bundle (share / archive) |
|
|
229
|
-
|
|
230
|
-
PRs welcome for anything in the 🚧 lane.
|
|
231
|
-
|
|
232
193
|
## Contributing
|
|
233
194
|
|
|
234
195
|
```bash
|