@timurproko/a1 0.1.8-dev.581 → 0.1.8-dev.583
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/dist/integrations/pi/components/models-dialog.js +35 -2
- package/dist/native/darwin-arm64/manifest.json +1 -1
- package/dist/native/linux-x64/manifest.json +1 -1
- package/dist/native/win32-x64/manifest.json +2 -2
- package/dist/native/win32-x64/process-guardian.exe +0 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { PiModalFrame } from "./modal-frame.js";
|
|
|
4
4
|
import { piTheme, renderPiModalShortcutHints } from "./theme.js";
|
|
5
5
|
const MAX_VISIBLE_ROWS = 10;
|
|
6
6
|
const MODELS_TITLE = "Models";
|
|
7
|
+
const REFRESHED_TITLE_DURATION_MS = 1_000;
|
|
7
8
|
class ModalTitleLine {
|
|
8
9
|
#text = "";
|
|
9
10
|
setText(text) { this.#text = text; }
|
|
@@ -50,6 +51,8 @@ export class ModelsDialogComponent {
|
|
|
50
51
|
#selectedIndex = 0;
|
|
51
52
|
#preferredId;
|
|
52
53
|
#refreshStatus;
|
|
54
|
+
#refreshed = false;
|
|
55
|
+
#refreshDismissalTimer;
|
|
53
56
|
#disposed = false;
|
|
54
57
|
#focused = false;
|
|
55
58
|
constructor(config, callbacks) {
|
|
@@ -96,10 +99,32 @@ export class ModelsDialogComponent {
|
|
|
96
99
|
this.#restoreSelection(selectedId);
|
|
97
100
|
}
|
|
98
101
|
setRefreshStatus(message, kind) {
|
|
99
|
-
this.#
|
|
102
|
+
if (this.#disposed)
|
|
103
|
+
return;
|
|
104
|
+
this.#clearRefreshDismissal();
|
|
105
|
+
if (kind !== "success") {
|
|
106
|
+
this.#refreshed = false;
|
|
107
|
+
this.#refreshStatus = { message, kind };
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
this.#refreshStatus = undefined;
|
|
111
|
+
this.#refreshed = true;
|
|
112
|
+
const timer = setTimeout(() => {
|
|
113
|
+
if (this.#refreshDismissalTimer !== timer)
|
|
114
|
+
return;
|
|
115
|
+
this.#refreshDismissalTimer = undefined;
|
|
116
|
+
if (this.#disposed)
|
|
117
|
+
return;
|
|
118
|
+
this.#refreshed = false;
|
|
119
|
+
this.#callbacks.requestRender();
|
|
120
|
+
}, REFRESHED_TITLE_DURATION_MS);
|
|
121
|
+
timer.unref?.();
|
|
122
|
+
this.#refreshDismissalTimer = timer;
|
|
100
123
|
}
|
|
101
124
|
dispose() {
|
|
102
125
|
this.#disposed = true;
|
|
126
|
+
this.#clearRefreshDismissal();
|
|
127
|
+
this.#refreshed = false;
|
|
103
128
|
}
|
|
104
129
|
invalidate() {
|
|
105
130
|
this.#input.invalidate();
|
|
@@ -197,9 +222,17 @@ export class ModelsDialogComponent {
|
|
|
197
222
|
}
|
|
198
223
|
render(width) {
|
|
199
224
|
const theme = piTheme();
|
|
200
|
-
this.#title.setText(theme.fg("accent", theme.bold(MODELS_TITLE))
|
|
225
|
+
this.#title.setText(theme.fg("accent", theme.bold(MODELS_TITLE))
|
|
226
|
+
+ (this.dirty ? theme.fg("warning", " (unsaved)") : "")
|
|
227
|
+
+ (this.#refreshed ? theme.fg("success", " (refreshed)") : ""));
|
|
201
228
|
return this.#frame.render(width);
|
|
202
229
|
}
|
|
230
|
+
#clearRefreshDismissal() {
|
|
231
|
+
if (this.#refreshDismissalTimer === undefined)
|
|
232
|
+
return;
|
|
233
|
+
clearTimeout(this.#refreshDismissalTimer);
|
|
234
|
+
this.#refreshDismissalTimer = undefined;
|
|
235
|
+
}
|
|
203
236
|
#renderBody(width) {
|
|
204
237
|
const theme = piTheme();
|
|
205
238
|
const lines = [];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"platform": "darwin",
|
|
6
6
|
"architecture": "arm64",
|
|
7
7
|
"capability": "supported",
|
|
8
|
-
"builtAt": "2026-09-
|
|
8
|
+
"builtAt": "2026-09-24T17:46:17.847Z",
|
|
9
9
|
"artifact": {
|
|
10
10
|
"filename": "process-guardian",
|
|
11
11
|
"sha256": "9db1726bbe3fc2e8292f2ead1e7e9d0fd4d7d0dc9217b372582bf354b0f565dc",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"platform": "linux",
|
|
6
6
|
"architecture": "x64",
|
|
7
7
|
"capability": "supported",
|
|
8
|
-
"builtAt": "2026-09-
|
|
8
|
+
"builtAt": "2026-09-24T17:46:08.913Z",
|
|
9
9
|
"artifact": {
|
|
10
10
|
"filename": "process-guardian",
|
|
11
11
|
"sha256": "d8cda6b0c7cb36c0cc41e90802aceebf6c02eaebbc08a83d7d963d2e918dbd7a",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"platform": "win32",
|
|
6
6
|
"architecture": "x64",
|
|
7
7
|
"capability": "supported",
|
|
8
|
-
"builtAt": "2026-09-
|
|
8
|
+
"builtAt": "2026-09-24T17:46:57.821Z",
|
|
9
9
|
"artifact": {
|
|
10
10
|
"filename": "process-guardian.exe",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "8337e1cdc9ea513c3e4567120db5b6e1275d6daec8535dc1be025fc41da1044a",
|
|
12
12
|
"size": 178176
|
|
13
13
|
},
|
|
14
14
|
"provenance": {
|
|
Binary file
|
package/package.json
CHANGED