pi-note 0.13.0 → 0.13.1
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 +12 -10
- package/index.ts +5 -7
- package/kitty/open-actions.conf +1 -1
- package/package.json +1 -1
- package/icons/eye.txt +0 -1
package/README.md
CHANGED
|
@@ -68,9 +68,9 @@ task, so existing values can be configured without creating another task.
|
|
|
68
68
|
Type in the task picker to filter by text, ID, tag, or state (all words must match).
|
|
69
69
|
Use ↑/↓ and Enter to select, or Esc to cancel. Rows show **●** for in progress or
|
|
70
70
|
**○** for active, followed by the tag (`[Untagged]` when absent).
|
|
71
|
-
The normal Pi status area shows
|
|
72
|
-
The footer omits the task ID and state and shows only the first line, truncated to the configured width (default 60 terminal columns including the
|
|
73
|
-
The
|
|
71
|
+
The normal Pi status area shows `📌 [tag] Task title` without replacing other footers.
|
|
72
|
+
The footer omits the task ID and state and shows only the first line, truncated to the configured width (default 60 terminal columns including the pin and tag). Overflow ends with `...`.
|
|
73
|
+
The pin glyph is bundled in `icons/note.txt`; it uses terminal fonts, not a Nerd Font or icon theme.
|
|
74
74
|
|
|
75
75
|
### Display-only preview
|
|
76
76
|
|
|
@@ -82,12 +82,13 @@ modify the note, editor draft or task selection, and never starts a model call.
|
|
|
82
82
|
The agent can still read the task separately with `pinote_get_current`.
|
|
83
83
|
Previewing requires Pi to be idle with no other Pinote operation open.
|
|
84
84
|
|
|
85
|
-
On Linux, the
|
|
85
|
+
On Linux, the task text (pin, tag and title) is a clickable OSC 8 link to a
|
|
86
|
+
private per-session Unix socket. Overflow at the configured title width stays linked.
|
|
86
87
|
The package ships [a Kitty configuration example](kitty/open-actions.conf).
|
|
87
88
|
Append its block to `~/.config/kitty/open-actions.conf`, preserving existing
|
|
88
89
|
actions. Replace `/absolute/path/to/pi-note` with the installed package directory
|
|
89
90
|
containing `preview-click.cjs`; for this checkout, that directory is `pi/`.
|
|
90
|
-
Keep `${URL}` literal: Kitty substitutes the clicked
|
|
91
|
+
Keep `${URL}` literal: Kitty substitutes the clicked task's link.
|
|
91
92
|
|
|
92
93
|
```conf
|
|
93
94
|
protocol pi-note-preview
|
|
@@ -97,12 +98,12 @@ action launch --type=background node /absolute/path/to/pi-note/preview-click.cjs
|
|
|
97
98
|
Do not replace or symlink your entire Kitty configuration to the example: it
|
|
98
99
|
contains only Pinote's handler. Package installation does not edit Kitty files.
|
|
99
100
|
|
|
100
|
-
Reload Kitty with **Ctrl+Shift+F5**. In Pi's regular mode, click the
|
|
101
|
+
Reload Kitty with **Ctrl+Shift+F5**. In Pi's regular mode, click the task text; in
|
|
101
102
|
fullscreen mode, use **Ctrl+Shift+click** so Kitty handles the link instead of
|
|
102
103
|
Pi's system URL opener. The helper sends only an authenticated selection
|
|
103
104
|
identifier, never note content or a model prompt. Stale links after task switching, tree navigation, reload or session exit
|
|
104
105
|
are rejected. Other terminals can use `/pi-note-preview`; if the socket cannot
|
|
105
|
-
start, the
|
|
106
|
+
start, the task remains visible without a link and that command remains available.
|
|
106
107
|
|
|
107
108
|
Each Pi session remembers its own task, including several sessions in one folder.
|
|
108
109
|
Resume restores that session's task; a new session starts unselected and does not import
|
|
@@ -251,7 +252,7 @@ Add `footer` to `~/.pi/agent/pi-note.json` (or `pi-note.json` under
|
|
|
251
252
|
}
|
|
252
253
|
```
|
|
253
254
|
|
|
254
|
-
Widths are terminal columns, including the
|
|
255
|
+
Widths are terminal columns, including the pin, tags or field labels, and must be
|
|
255
256
|
integers from 3 to 1000. Defaults: `titleWidth: 60`, `fieldWidth: 60`,
|
|
256
257
|
`maxFields: 4` (allowed 0–64). Each field can override `fieldWidth` with `width`.
|
|
257
258
|
`fields` selects task field names in order, regardless of a task's `Bar`.
|
|
@@ -303,8 +304,9 @@ By default, at most four extra fields are shown, each truncated to 60 columns.
|
|
|
303
304
|
Overflow ends with `...`, including cuts between Markdown/link segments. Removing
|
|
304
305
|
a listed field hides it even if configuration or `Bar` still names it. Terminal
|
|
305
306
|
OSC 8 support is required for clicking links. Pi joins footer statuses on one
|
|
306
|
-
line and truncates the combined line with `...` when the terminal is narrow
|
|
307
|
-
|
|
307
|
+
line and truncates the combined line with `...` when the terminal is narrow.
|
|
308
|
+
Pi's final ellipsis is plain text; click the remaining task text to preview it.
|
|
309
|
+
This extension does not replace other footers. Other fields, such as `Jira` and
|
|
308
310
|
`CWD` in the example, stay off the footer unless selected.
|
|
309
311
|
|
|
310
312
|
### PR merge watcher
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getAgentDir, getMarkdownTheme, type ExtensionAPI, type ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import { Container, Editor, Markdown, Text, truncateToWidth,
|
|
2
|
+
import { Container, Editor, Markdown, Text, truncateToWidth, type Keybinding } from "@earendil-works/pi-tui";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { stripVTControlCharacters } from "node:util";
|
|
@@ -33,7 +33,6 @@ type Task = {
|
|
|
33
33
|
type Summary = Pick<Task, "id" | "text" | "state" | "tag">;
|
|
34
34
|
// The standard Pi footer accepts text, so ship a portable terminal glyph, not a theme icon.
|
|
35
35
|
const noteIcon = readFileSync(new URL("./icons/note.txt", import.meta.url), "utf8").trim();
|
|
36
|
-
const eyeIcon = readFileSync(new URL("./icons/eye.txt", import.meta.url), "utf8").trim();
|
|
37
36
|
const previewType = "pinote-preview";
|
|
38
37
|
const compatible = "Incompatible note CLI response. Install pinote 0.3.0+ and check note on PATH.";
|
|
39
38
|
const validId = (value: unknown): value is number => Number.isSafeInteger(value) && Number(value) > 0;
|
|
@@ -265,10 +264,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
265
264
|
previewBridge?.setTask(previewId, (signal) => alive && generation === epoch && previewBranch === branchEpoch &&
|
|
266
265
|
selectedId === previewId ? preview(ctx, signal) : Promise.resolve(false));
|
|
267
266
|
const url = previewBridge?.url();
|
|
268
|
-
//
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
ctx.ui.setStatus("pinote", current ? eye + truncateToWidth(`${noteIcon} ${taskTag(current)} ${firstLine(current)}`, width, "...") : undefined);
|
|
267
|
+
// Truncate before linking so the task label, including configured overflow, is clickable.
|
|
268
|
+
const label = current ? truncateToWidth(`${noteIcon} ${taskTag(current)} ${firstLine(current)}`, footerConfig.titleWidth, "...") : undefined;
|
|
269
|
+
ctx.ui.setStatus("pinote", label && url ? `\x1b]8;;${url}\x07${label}\x1b]8;;\x07` : label);
|
|
272
270
|
watcher.update(ctx, current);
|
|
273
271
|
}
|
|
274
272
|
} catch {
|
|
@@ -365,7 +363,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
365
363
|
} catch {
|
|
366
364
|
await bridge.stop();
|
|
367
365
|
if (previewBridge === bridge) previewBridge = undefined;
|
|
368
|
-
ctx.ui.notify("Pinote
|
|
366
|
+
ctx.ui.notify("Pinote task link unavailable; use /pi-note-preview.", "warning");
|
|
369
367
|
}
|
|
370
368
|
}
|
|
371
369
|
if (!alive || generation !== epoch) return;
|
package/kitty/open-actions.conf
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Append this block to ~/.config/kitty/open-actions.conf; preserve existing actions.
|
|
2
2
|
# Replace /absolute/path/to/pi-note with the directory containing preview-click.cjs.
|
|
3
|
-
# Keep ${URL} literal: Kitty substitutes the clicked
|
|
3
|
+
# Keep ${URL} literal: Kitty substitutes the clicked task's link.
|
|
4
4
|
protocol pi-note-preview
|
|
5
5
|
action launch --type=background node /absolute/path/to/pi-note/preview-click.cjs ${URL}
|
package/package.json
CHANGED
package/icons/eye.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
👁
|