kaizen-agent 1.81.0 → 1.81.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/cli/web.ts +2 -1
- package/package.json +1 -1
- package/web/board/update.ts +4 -2
- package/web/board.js +82 -82
- package/web/notebook.js +91 -91
- package/web/term.js +1 -1
- package/web/video.js +86 -86
package/cli/web.ts
CHANGED
|
@@ -1865,7 +1865,8 @@ export async function web(repoDir: string, opts: Opts = {}) {
|
|
|
1865
1865
|
// Update button there (DESKTOP_BUNDLED, above).
|
|
1866
1866
|
const update = !!v && newer(v, VERSION) && !DESKTOP_BUNDLED;
|
|
1867
1867
|
const notes = update ? await releaseNotes(VERSION, url.searchParams.has("fresh")) : [];
|
|
1868
|
-
|
|
1868
|
+
// behind: npm has a newer one but this board cannot update itself (the desktop app's copy), so a phone or browser can say so instead of "up to date".
|
|
1869
|
+
return json({ version: VERSION, latest: v, update, behind: DESKTOP_BUNDLED && !!v && newer(v, VERSION), notes, failed: upgradeFailed });
|
|
1869
1870
|
}
|
|
1870
1871
|
|
|
1871
1872
|
// `kaizen upgrade`, run here with no window, then a new board on this port: it
|
package/package.json
CHANGED
package/web/board/update.ts
CHANGED
|
@@ -14,6 +14,8 @@ let upd = null,
|
|
|
14
14
|
const desk = globalThis.kaizenDesktop;
|
|
15
15
|
const name = desk ? "Kaizen" : "kaizen";
|
|
16
16
|
const getVer = (fresh) => (desk ? desk.check() : fetch(fresh ? "/version?fresh=1" : "/version").then((r) => r.json()));
|
|
17
|
+
// A board that is the desktop app's own copy cannot update itself; say where to update it.
|
|
18
|
+
const behindMsg = (v) => `${name} ${v.latest} is available. You are running ${v.version}. Update it from the desktop app on your computer.`;
|
|
17
19
|
export function gotVer(v) {
|
|
18
20
|
ver = v;
|
|
19
21
|
upd = v.update ? v : null;
|
|
@@ -26,7 +28,7 @@ export function updBar() {
|
|
|
26
28
|
const d = document.createElement("div");
|
|
27
29
|
d.className = `updbar${upd ? "" : " quiet"}`;
|
|
28
30
|
if (!upd) {
|
|
29
|
-
d.innerHTML = html`<span id="upd-msg" aria-live="polite">${ver ? `${name} ${ver.version}` : name}</span
|
|
31
|
+
d.innerHTML = html`<span id="upd-msg" aria-live="polite">${ver ? (ver.behind ? behindMsg(ver) : `${name} ${ver.version}`) : name}</span
|
|
30
32
|
><button class="btn" id="upd-chk">Check for updates</button>`;
|
|
31
33
|
} else {
|
|
32
34
|
// What's new: each newer release's one-line title, shown on hover, focus or click.
|
|
@@ -77,7 +79,7 @@ export function updBar() {
|
|
|
77
79
|
updBar();
|
|
78
80
|
if (upd) $("upd-go").focus();
|
|
79
81
|
else {
|
|
80
|
-
$("upd-msg").textContent = `${name} ${v.version} is up to date.`;
|
|
82
|
+
$("upd-msg").textContent = v.behind ? behindMsg(v) : `${name} ${v.version} is up to date.`;
|
|
81
83
|
$("upd-chk").focus();
|
|
82
84
|
}
|
|
83
85
|
};
|