@sigrun/tui 0.11.1 → 0.11.3
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 +9 -0
- package/dist/ui/notices.js +23 -1
- package/dist/ui/sidebar.d.ts +3 -2
- package/dist/ui/sidebar.js +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
## [0.11.3] - 2026-11-08
|
|
10
|
+
|
|
11
|
+
- Version-locked bump with the 0.11.3 core line (no changes).
|
|
12
|
+
|
|
13
|
+
## [0.11.2] - 2026-11-08
|
|
14
|
+
|
|
15
|
+
- Notices overlay: an extension action carrying a confirm asks before running (y/n); n/Esc/q cancels without posting.
|
|
16
|
+
|
|
17
|
+
|
|
9
18
|
## [0.11.1] - 2026-11-07
|
|
10
19
|
|
|
11
20
|
- Version-locked bump with the 0.11.1 core line (no changes).
|
package/dist/ui/notices.js
CHANGED
|
@@ -65,6 +65,8 @@ class NoticesOverlay {
|
|
|
65
65
|
#overlay;
|
|
66
66
|
/** The selected row index into {@link rows}. */
|
|
67
67
|
#index = 0;
|
|
68
|
+
/** An extension action waiting for an explicit yes/no confirmation. */
|
|
69
|
+
#confirming;
|
|
68
70
|
constructor(chrome, options) {
|
|
69
71
|
this.#chrome = chrome;
|
|
70
72
|
this.#options = options;
|
|
@@ -95,6 +97,10 @@ class NoticesOverlay {
|
|
|
95
97
|
const row = this.rows[this.#index];
|
|
96
98
|
if (row === undefined || row.action === undefined)
|
|
97
99
|
return;
|
|
100
|
+
if (row.action.kind === "extension" && row.action.confirm !== undefined && row.action.confirm !== "") {
|
|
101
|
+
this.#confirming = { notice: row.notice, action: row.action };
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
98
104
|
void this.#chrome.run(row.notice, row.action);
|
|
99
105
|
}
|
|
100
106
|
#dismissSelected() {
|
|
@@ -106,6 +112,19 @@ class NoticesOverlay {
|
|
|
106
112
|
this.#index -= 1;
|
|
107
113
|
}
|
|
108
114
|
handleInput(data) {
|
|
115
|
+
if (this.#confirming !== undefined) {
|
|
116
|
+
const confirming = this.#confirming;
|
|
117
|
+
if (data === "y" || data === "Y") {
|
|
118
|
+
this.#confirming = undefined;
|
|
119
|
+
void this.#chrome.run(confirming.notice, confirming.action);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (data === "n" || data === "N" || matchesKey(data, Key.escape) || data === "q" || data === "\x07") {
|
|
123
|
+
this.#confirming = undefined;
|
|
124
|
+
}
|
|
125
|
+
// Every other key is consumed while the confirm is pending.
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
109
128
|
if (matchesKey(data, Key.escape) || data === "q" || data === "\x07") {
|
|
110
129
|
this.#close();
|
|
111
130
|
return;
|
|
@@ -132,7 +151,10 @@ class NoticesOverlay {
|
|
|
132
151
|
const lines = [];
|
|
133
152
|
const rows = this.rows;
|
|
134
153
|
let rowIndex = 0;
|
|
135
|
-
|
|
154
|
+
const confirming = this.#confirming?.action;
|
|
155
|
+
lines.push(confirming === undefined
|
|
156
|
+
? `notices (${rows.length}) — enter run · d dismiss · esc close`
|
|
157
|
+
: `${confirming.kind === "extension" ? confirming.confirm : ""} (y/n)`);
|
|
136
158
|
for (const notice of this.#chrome.notices) {
|
|
137
159
|
const age = relativeAge(notice.at);
|
|
138
160
|
lines.push(`${toneMark(notice.tone)} ${notice.title}${age === "" ? "" : ` · ${age}`}`);
|
package/dist/ui/sidebar.d.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* `displayName` + pi-tui's `truncateToWidth`, ages right-align via B1's
|
|
6
6
|
* `formatAge`, and the active row highlights accent-fg + bold. Archived
|
|
7
7
|
* conversations stay hidden (the tree's `includeArchived: false`; the
|
|
8
|
-
* server has no delete, archive is the hide)
|
|
9
|
-
*
|
|
8
|
+
* server has no delete, archive is the hide), and quiet job runs stay
|
|
9
|
+
* hidden (`includeJobRuns: false`; failed runs remain visible with their
|
|
10
|
+
* `displayName` prefix). `+ New conversation` is always the last row.
|
|
10
11
|
*
|
|
11
12
|
* The listing itself carries every field the rows need (`name`,
|
|
12
13
|
* `archived`, `pinned`, `parent`, `lastActivityAt` ride
|
package/dist/ui/sidebar.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* `displayName` + pi-tui's `truncateToWidth`, ages right-align via B1's
|
|
6
6
|
* `formatAge`, and the active row highlights accent-fg + bold. Archived
|
|
7
7
|
* conversations stay hidden (the tree's `includeArchived: false`; the
|
|
8
|
-
* server has no delete, archive is the hide)
|
|
9
|
-
*
|
|
8
|
+
* server has no delete, archive is the hide), and quiet job runs stay
|
|
9
|
+
* hidden (`includeJobRuns: false`; failed runs remain visible with their
|
|
10
|
+
* `displayName` prefix). `+ New conversation` is always the last row.
|
|
10
11
|
*
|
|
11
12
|
* The listing itself carries every field the rows need (`name`,
|
|
12
13
|
* `archived`, `pinned`, `parent`, `lastActivityAt` ride
|
|
@@ -80,6 +81,7 @@ export class Sidebar {
|
|
|
80
81
|
const previousId = this.#display[this.#cursor]?.id;
|
|
81
82
|
const tree = buildConversationTree(list.conversations, {
|
|
82
83
|
includeArchived: false,
|
|
84
|
+
includeJobRuns: false,
|
|
83
85
|
});
|
|
84
86
|
const rows = [];
|
|
85
87
|
const walk = (nodes, depth) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigrun/tui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"description": "sigrun terminal client (pi-tui based) over the \u00a75 API \u2014 spawned by the sigrun CLI, or standalone against a server URL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@earendil-works/pi-tui": "^1.3.0",
|
|
24
|
-
"@sigrun/shared": "0.11.
|
|
24
|
+
"@sigrun/shared": "0.11.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^7.0.2",
|