kaizen-agent 1.87.3 → 1.87.4
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/activity.ts +86 -0
- package/cli/add-project.ts +64 -1
- package/cli/auto-update.ts +33 -0
- package/cli/chat.ts +88 -13
- package/cli/install.ts +65 -36
- package/cli/look.ts +1 -0
- package/cli/onboarding.ts +9 -4
- package/cli/pty.ts +27 -12
- package/cli/release.ts +13 -1
- package/cli/settings.ts +39 -7
- package/cli/state.ts +54 -1
- package/cli/task-service.ts +8 -3
- package/cli/usage.ts +15 -2
- package/cli/web.ts +88 -41
- package/cli/whats-new.json +38 -0
- package/cli/whats-new.ts +43 -0
- package/cli/workers.ts +2 -2
- package/package.json +1 -1
- package/skills/kaizen/config.default.yml +3 -0
- package/skills/kaizen/spec.md +6 -0
- package/skills/kaizen-explore/SKILL.md +7 -0
- package/web/components/home/index.ts +1 -0
- package/web/components/home/onboarding-dialog.tsx +44 -7
- package/web/components/home/works-flow.tsx +119 -0
- package/web/components/project/add-project-dialog.tsx +1 -1
- package/web/components/rail/rail-list.tsx +8 -6
- package/web/components/run/doc-body.tsx +43 -0
- package/web/components/settings/agent-rows.tsx +15 -11
- package/web/components/settings/browser-row.tsx +1 -1
- package/web/components/settings/setting-row.tsx +2 -1
- package/web/components/settings/skill-card.tsx +32 -2
- package/web/components/settings/update-bar.tsx +53 -35
- package/web/components/settings/whats-new-card.tsx +70 -0
- package/web/components/shell/rail.tsx +8 -4
- package/web/dist/annotate.js +1 -1
- package/web/dist/board.css +3 -3
- package/web/dist/board.js +83 -58
- package/web/dist/boot.js +1 -1
- package/web/dist/notebook.css +2 -2
- package/web/dist/notebook.js +27 -27
- package/web/dist/popup.css +1 -1
- package/web/dist/popup.js +1 -1
- package/web/dist/term.js +1 -1
- package/web/dist/ui.css +2 -2
- package/web/dist/video.js +1 -1
- package/web/lib/footer/footer-rules.ts +8 -2
- package/web/lib/footer/footer-store.ts +2 -2
- package/web/lib/home/onboarding.ts +63 -17
- package/web/lib/project/add-project.ts +6 -0
- package/web/lib/run/panel-derive.ts +1 -1
- package/web/lib/run/panel-store.ts +1 -0
- package/web/lib/settings/index.ts +1 -0
- package/web/lib/settings/settings.ts +6 -1
- package/web/lib/settings/whats-new.ts +36 -0
- package/web/pages/board/App.tsx +2 -1
- package/web/pages/task-page.tsx +17 -4
- package/web/ui/legacy/board.css +1 -1
|
@@ -94,7 +94,9 @@ function TaskLink({ t }: { t: RailTask }) {
|
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
// Home is your own space outside any project, so its one row says that instead of the folder's name.
|
|
98
|
+
export const HOME_TIP = "Your own space: chats and agent terminals that are not in a project. Add a project with +.";
|
|
99
|
+
function WsRow({ dir, r, now, current, home }: { dir: string; r: RailRow; now: number; current: boolean; home?: boolean }) {
|
|
98
100
|
return (
|
|
99
101
|
<>
|
|
100
102
|
<div className="wsr wsc">
|
|
@@ -103,7 +105,7 @@ function WsRow({ dir, r, now, current }: { dir: string; r: RailRow; now: number;
|
|
|
103
105
|
href={host.wsHref(dir, r.path)}
|
|
104
106
|
data-dir={dir}
|
|
105
107
|
data-ws={r.path}
|
|
106
|
-
title={r.path}
|
|
108
|
+
title={home ? HOME_TIP : r.path}
|
|
107
109
|
aria-current={current ? "true" : undefined}
|
|
108
110
|
onClick={(e) => inPlace(e, () => openWs(dir, r.path))}
|
|
109
111
|
onContextMenu={(e) => {
|
|
@@ -120,11 +122,11 @@ function WsRow({ dir, r, now, current }: { dir: string; r: RailRow; now: number;
|
|
|
120
122
|
<span className={`si ${r.st || "none"}`} />
|
|
121
123
|
<div className="wl">
|
|
122
124
|
<span className="l1">
|
|
123
|
-
<b>{r.label}</b>
|
|
125
|
+
<b>{home ? "No project" : r.label}</b>
|
|
124
126
|
{r.pinned && <Pin />}
|
|
125
127
|
</span>
|
|
126
128
|
<span className="l2">
|
|
127
|
-
<span>{r.folder}</span>
|
|
129
|
+
<span>{home ? "chats and terminals" : r.folder}</span>
|
|
128
130
|
{!r.w.main && <Worktree />}
|
|
129
131
|
</span>
|
|
130
132
|
</div>
|
|
@@ -202,7 +204,7 @@ function Group({
|
|
|
202
204
|
data-proj={g.dir}
|
|
203
205
|
data-ws={g.mainWs}
|
|
204
206
|
data-empty={g.empty ? "" : undefined}
|
|
205
|
-
title={g.dir}
|
|
207
|
+
title={g.home ? HOME_TIP : g.dir}
|
|
206
208
|
aria-expanded={!g.shut}
|
|
207
209
|
onClick={fold}
|
|
208
210
|
>
|
|
@@ -243,7 +245,7 @@ function Group({
|
|
|
243
245
|
{!g.shut && (
|
|
244
246
|
<div className="pws">
|
|
245
247
|
{g.rows.map((r) => (
|
|
246
|
-
<WsRow key={r.path} dir={g.dir} r={r} now={now} current={cur.dir === g.dir && cur.ws === r.path} />
|
|
248
|
+
<WsRow key={r.path} dir={g.dir} r={r} now={now} current={cur.dir === g.dir && cur.ws === r.path} home={g.home && r.w.main} />
|
|
247
249
|
))}
|
|
248
250
|
</div>
|
|
249
251
|
)}
|
|
@@ -29,6 +29,48 @@ const MARK: Record<Step["st"], string> = { done: "text-success", doing: "text-ru
|
|
|
29
29
|
|
|
30
30
|
// A building run's Work list: how many are done, a bar, and one row per item (✓ done, a pulse for the one being worked
|
|
31
31
|
// on). A redraw marks the rows whose status moved and slides the bar from where it was.
|
|
32
|
+
// What the agent is doing, from its own hooks: the newest line (a pulse while it is fresh), then the few before it. The checklist
|
|
33
|
+
// above is the agent's own words; this is what it really did.
|
|
34
|
+
function Activity({ list }: { list: { t: number; text: string }[] }) {
|
|
35
|
+
const [now, setNow] = useState(Date.now());
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const i = setInterval(() => setNow(Date.now()), 5000);
|
|
38
|
+
return () => clearInterval(i);
|
|
39
|
+
}, []);
|
|
40
|
+
if (!list.length) return null;
|
|
41
|
+
const last = list[list.length - 1]!,
|
|
42
|
+
live = now - last.t < 45_000,
|
|
43
|
+
ago = Math.max(0, Math.round((now - last.t) / 1000));
|
|
44
|
+
return (
|
|
45
|
+
<div data-activity className="mb-[18px] rounded-md border border-border px-3 py-2.5 text-base">
|
|
46
|
+
<div className="flex items-center gap-2">
|
|
47
|
+
<span
|
|
48
|
+
className={cn(
|
|
49
|
+
"size-[7px] flex-none rounded-full",
|
|
50
|
+
live ? "bg-running motion-safe:animate-pulse" : "bg-muted-foreground",
|
|
51
|
+
)}
|
|
52
|
+
/>
|
|
53
|
+
<b className="min-w-0 flex-1 truncate font-medium text-foreground">{last.text}</b>
|
|
54
|
+
<span className="flex-none text-sm text-muted-foreground">
|
|
55
|
+
{live ? "now" : ago < 90 ? `${ago}s ago` : `${Math.round(ago / 60)} min ago`}
|
|
56
|
+
</span>
|
|
57
|
+
</div>
|
|
58
|
+
{list.length > 1 && (
|
|
59
|
+
<ul className="mt-1.5 flex flex-col gap-0.5 border-t border-border pt-1.5 text-sm text-muted-foreground">
|
|
60
|
+
{list
|
|
61
|
+
.slice(-6, -1)
|
|
62
|
+
.reverse()
|
|
63
|
+
.map((a, i) => (
|
|
64
|
+
<li key={i} className="truncate">
|
|
65
|
+
{a.text}
|
|
66
|
+
</li>
|
|
67
|
+
))}
|
|
68
|
+
</ul>
|
|
69
|
+
)}
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
32
74
|
function Progress({ id, src }: { id: string; src: string }) {
|
|
33
75
|
const p = useMemo(() => parseProgress(src), [src]),
|
|
34
76
|
prev = drawn?.id === id ? drawn : null,
|
|
@@ -112,6 +154,7 @@ export function DocBody() {
|
|
|
112
154
|
return (
|
|
113
155
|
<div ref={root}>
|
|
114
156
|
{backlog && doc.progress && <Progress id={doc.id} src={doc.progress} />}
|
|
157
|
+
{backlog && <Activity list={doc.activity} />}
|
|
115
158
|
{doc.text ? (
|
|
116
159
|
<Markdown text={backlog && doc.progress ? "### Backlog\n\n" + doc.text : doc.text} ticks={backlog} />
|
|
117
160
|
) : (
|
|
@@ -102,21 +102,25 @@ export function AgentCard({ cmd }: { cmd: string }) {
|
|
|
102
102
|
<b className="block font-medium">{a.name}</b>
|
|
103
103
|
<code className="break-words text-xs text-muted-foreground">{a.command || a.cmd}</code>
|
|
104
104
|
</span>
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
105
|
+
{a.installed ? (
|
|
106
|
+
<Segmented
|
|
107
|
+
label={`${a.name} enabled`}
|
|
108
|
+
idPrefix={`${id}-on`}
|
|
109
|
+
options={[
|
|
110
|
+
{ id: "true", label: "Enabled" },
|
|
111
|
+
{ id: "false", label: "Disabled" },
|
|
112
|
+
]}
|
|
113
|
+
value={String(a.enabled)}
|
|
114
|
+
onChange={(v) => void saveAgentPrefs({ agent: cmd, enabled: v === "true" })}
|
|
115
|
+
/>
|
|
116
|
+
) : (
|
|
117
|
+
<span className="text-xs text-muted-foreground">Not installed. Install it to use it.</span>
|
|
118
|
+
)}
|
|
116
119
|
<Button
|
|
117
120
|
id={`${id}-def`}
|
|
118
121
|
aria-pressed={def === cmd}
|
|
119
122
|
disabled={!a.enabled || !a.installed}
|
|
123
|
+
className="min-w-[92px]"
|
|
120
124
|
onClick={() => void setDefaultAgent(cmd)}
|
|
121
125
|
>
|
|
122
126
|
{def === cmd ? "✓ Default" : "Default"}
|
|
@@ -45,7 +45,7 @@ export function BrowserRow({
|
|
|
45
45
|
label={c.label}
|
|
46
46
|
labelledBy={labelId}
|
|
47
47
|
idPrefix={c.id}
|
|
48
|
-
options={c.values.map((v) => ({ id: v, label: v }))}
|
|
48
|
+
options={c.values.map((v) => ({ id: v, label: v[0]!.toUpperCase() + v.slice(1) }))}
|
|
49
49
|
value={prefs[kind]}
|
|
50
50
|
onChange={(v) => setBrowserPref(kind, v)}
|
|
51
51
|
/>
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
useModelChoices,
|
|
10
10
|
modelName,
|
|
11
11
|
modelTool,
|
|
12
|
+
optionText,
|
|
12
13
|
rowHint,
|
|
13
14
|
settingId,
|
|
14
15
|
type Row,
|
|
@@ -83,7 +84,7 @@ export function SettingRow({ row, off }: { row: Row; off?: boolean }) {
|
|
|
83
84
|
label={row.label}
|
|
84
85
|
labelledBy={labelId}
|
|
85
86
|
idPrefix={id}
|
|
86
|
-
options={vals.map((v) => ({ id: v, label: kind === "preset" ? caps(v) : v }))}
|
|
87
|
+
options={vals.map((v) => ({ id: v, label: kind === "preset" ? caps(v) : optionText(row, v) }))}
|
|
87
88
|
value={shown}
|
|
88
89
|
onChange={(v) => v !== "custom" && save(v)}
|
|
89
90
|
/>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
1
|
+
import { createElement, useState } from "react";
|
|
2
2
|
import { AGENT_FAVICONS, reaNode, reaSwitch, repairSkill, setSkill, useSettings, skillShapes } from "@lib/settings";
|
|
3
3
|
import { cn } from "@lib/core";
|
|
4
|
-
import {
|
|
4
|
+
import { COPY, STEP } from "@lib/home";
|
|
5
|
+
import { Button, Dialog, DialogContent, DialogDescription, DialogTitle, Switch } from "@web/ui";
|
|
6
|
+
import { WorksFlow } from "@components/home";
|
|
5
7
|
|
|
6
8
|
const WORD: Record<string, string> = { installed: "installed", missing: "missing", other: "your own copy" };
|
|
7
9
|
const AGENT_CMD: Record<string, string> = {
|
|
@@ -38,6 +40,33 @@ function NodeButton({ n }: { n: Need }) {
|
|
|
38
40
|
);
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
// The "?" beside Kaizen workflow: the welcome's picture of how a run goes (ask, plan, approve, build, review), to look at again.
|
|
44
|
+
function HowItWorks() {
|
|
45
|
+
const [open, setOpen] = useState(false);
|
|
46
|
+
const c = COPY[STEP.works]!;
|
|
47
|
+
return (
|
|
48
|
+
<>
|
|
49
|
+
<button
|
|
50
|
+
type="button"
|
|
51
|
+
aria-label="How kaizen works"
|
|
52
|
+
title="How kaizen works"
|
|
53
|
+
data-how-it-works
|
|
54
|
+
onClick={() => setOpen(true)}
|
|
55
|
+
className="ml-1.5 inline-grid size-4 place-items-center rounded-full border border-border align-middle text-[10px] leading-none text-muted-foreground hover:text-foreground"
|
|
56
|
+
>
|
|
57
|
+
?
|
|
58
|
+
</button>
|
|
59
|
+
<Dialog open={open} onOpenChange={setOpen}>
|
|
60
|
+
<DialogContent className="w-[min(720px,calc(100vw-32px))] gap-3 p-6">
|
|
61
|
+
<DialogTitle className="text-xl font-bold text-strong">{c.title}</DialogTitle>
|
|
62
|
+
<DialogDescription className="text-base">{c.sub}</DialogDescription>
|
|
63
|
+
<WorksFlow />
|
|
64
|
+
</DialogContent>
|
|
65
|
+
</Dialog>
|
|
66
|
+
</>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
41
70
|
// One skill: its mark, name and what it does, a switch (or Repair / Always on for a core one), and which agents have it.
|
|
42
71
|
export function SkillCard({ id }: { id: string }) {
|
|
43
72
|
const s = useSettings((st) => st.data?.skills?.skills.find((x: any) => x.id === id));
|
|
@@ -56,6 +85,7 @@ export function SkillCard({ id }: { id: string }) {
|
|
|
56
85
|
<span className="min-w-0 flex-[1_1_200px]">
|
|
57
86
|
<b className="block font-medium">
|
|
58
87
|
{s.title}
|
|
88
|
+
{s.id === "kaizen" && <HowItWorks />}
|
|
59
89
|
{s.status && s.status !== "stable" && (
|
|
60
90
|
<em className="ml-1.5 rounded-xs border border-border px-1.5 text-[10.5px] font-normal not-italic text-muted-foreground">
|
|
61
91
|
{s.status === "beta" ? "Beta" : "Experimental"}
|
|
@@ -8,10 +8,14 @@ import {
|
|
|
8
8
|
later,
|
|
9
9
|
upToDate,
|
|
10
10
|
upgrade,
|
|
11
|
+
cardOpen,
|
|
12
|
+
toggleWhatsNew,
|
|
11
13
|
useUpdate,
|
|
14
|
+
useWhatsNew,
|
|
12
15
|
type Version,
|
|
13
16
|
} from "@lib/settings";
|
|
14
17
|
import { Button, Popover, PopoverContent, PopoverTrigger } from "@web/ui";
|
|
18
|
+
import { WhatsNewCard } from "./whats-new-card.tsx";
|
|
15
19
|
|
|
16
20
|
// The Update button, shared by the About bar and the card: asks first, then shows what is happening.
|
|
17
21
|
function UpdateButton({ v, label }: { v: Version; label: string }) {
|
|
@@ -35,13 +39,13 @@ function UpdateButton({ v, label }: { v: Version; label: string }) {
|
|
|
35
39
|
);
|
|
36
40
|
}
|
|
37
41
|
|
|
38
|
-
// What's
|
|
42
|
+
// What's in the update: each newer release's one-line title, in a popover, while an update is waiting.
|
|
39
43
|
function News({ v }: { v: Version }) {
|
|
40
44
|
if (!v.notes?.length) return null;
|
|
41
45
|
return (
|
|
42
46
|
<Popover>
|
|
43
47
|
<PopoverTrigger asChild>
|
|
44
|
-
<Button>What's
|
|
48
|
+
<Button>What's in the update</Button>
|
|
45
49
|
</PopoverTrigger>
|
|
46
50
|
<PopoverContent className="w-[min(360px,calc(100vw-32px))] px-3.5 py-2.5 leading-normal">
|
|
47
51
|
<ul className="mb-2 list-disc pl-[18px]">
|
|
@@ -92,47 +96,61 @@ export function UpdateBar() {
|
|
|
92
96
|
if (v.update) queueMicrotask(() => go.current?.querySelector<HTMLElement>("#upd-go")?.focus());
|
|
93
97
|
};
|
|
94
98
|
const shown = msg || (ver ? (ver.behind ? behindMsg(ver) : `${name} ${ver.version}`) : name);
|
|
99
|
+
const hasNews = useWhatsNew((st) => !!st.data?.entry),
|
|
100
|
+
newsOpen = useWhatsNew((st) => cardOpen(st));
|
|
101
|
+
const newsBtn = hasNews && (
|
|
102
|
+
<Button id="wn-btn" aria-expanded={newsOpen} onClick={toggleWhatsNew}>
|
|
103
|
+
What's new
|
|
104
|
+
</Button>
|
|
105
|
+
);
|
|
95
106
|
const checkBtn = (
|
|
96
107
|
<Button id="upd-chk" disabled={checking} onClick={check}>
|
|
97
108
|
{checking ? "Checking…" : label || "Check for updates"}
|
|
98
109
|
</Button>
|
|
99
110
|
);
|
|
100
111
|
return (
|
|
101
|
-
|
|
102
|
-
<div className="mb-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
)}
|
|
115
|
-
{upd ? (
|
|
116
|
-
<>
|
|
117
|
-
<span>
|
|
118
|
-
{name} <b>{upd.latest}</b> is available. You are running {upd.version}.
|
|
119
|
-
</span>
|
|
120
|
-
<span ref={go} className="flex items-center gap-2">
|
|
121
|
-
<News v={upd} />
|
|
122
|
-
{checkBtn}
|
|
123
|
-
<UpdateButton v={upd} label={`Update ${name}`} />
|
|
124
|
-
</span>
|
|
125
|
-
</>
|
|
126
|
-
) : (
|
|
127
|
-
<>
|
|
128
|
-
<span id="upd-msg" aria-live="polite">
|
|
129
|
-
{shown}
|
|
112
|
+
<>
|
|
113
|
+
<div className="mb-6">
|
|
114
|
+
<div className="mb-2 text-sm font-semibold text-strong">About</div>
|
|
115
|
+
<div
|
|
116
|
+
className={
|
|
117
|
+
upd
|
|
118
|
+
? "relative flex flex-wrap items-center justify-between gap-3 rounded-lg border border-primary bg-[color-mix(in_srgb,var(--accent)_10%,var(--bg-2))] px-3.5 py-2.5 text-base"
|
|
119
|
+
: "flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border bg-card px-3.5 py-2.5 text-base text-strong"
|
|
120
|
+
}
|
|
121
|
+
>
|
|
122
|
+
{ver?.failed && (
|
|
123
|
+
<span role="alert" className="basis-full text-warning">
|
|
124
|
+
Last update failed: {ver.failed}
|
|
130
125
|
</span>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
)}
|
|
127
|
+
{upd ? (
|
|
128
|
+
<>
|
|
129
|
+
<span>
|
|
130
|
+
{name} <b>{upd.latest}</b> is available. You are running {upd.version}.
|
|
131
|
+
</span>
|
|
132
|
+
<span ref={go} className="flex items-center gap-2">
|
|
133
|
+
<News v={upd} />
|
|
134
|
+
{newsBtn}
|
|
135
|
+
{checkBtn}
|
|
136
|
+
<UpdateButton v={upd} label={`Update ${name}`} />
|
|
137
|
+
</span>
|
|
138
|
+
</>
|
|
139
|
+
) : (
|
|
140
|
+
<>
|
|
141
|
+
<span id="upd-msg" aria-live="polite">
|
|
142
|
+
{shown}
|
|
143
|
+
</span>
|
|
144
|
+
<span className="flex items-center gap-2">
|
|
145
|
+
{newsBtn}
|
|
146
|
+
{checkBtn}
|
|
147
|
+
</span>
|
|
148
|
+
</>
|
|
149
|
+
)}
|
|
150
|
+
</div>
|
|
134
151
|
</div>
|
|
135
|
-
|
|
152
|
+
<WhatsNewCard />
|
|
153
|
+
</>
|
|
136
154
|
);
|
|
137
155
|
}
|
|
138
156
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { cardOpen, closeWhatsNew, useWhatsNew } from "@lib/settings";
|
|
2
|
+
import { Button } from "@web/ui";
|
|
3
|
+
|
|
4
|
+
// What's New, inline under About (not a dialog): the big improvements first, the fixes below, then Got it. Modelled on iOS's What's New:
|
|
5
|
+
// a short title and a version, each highlight a bold name over one grey line, one full-width button.
|
|
6
|
+
export function WhatsNewCard() {
|
|
7
|
+
const s = useWhatsNew();
|
|
8
|
+
const e = s.data?.entry;
|
|
9
|
+
if (!e || !cardOpen(s)) return null;
|
|
10
|
+
return (
|
|
11
|
+
<section
|
|
12
|
+
aria-label="What's new"
|
|
13
|
+
data-whats-new
|
|
14
|
+
className="mb-6 rounded-lg border border-border bg-card px-[26px] py-[22px] text-base"
|
|
15
|
+
>
|
|
16
|
+
<div className="mb-5 flex items-start justify-between gap-3">
|
|
17
|
+
<div>
|
|
18
|
+
<div
|
|
19
|
+
role="heading"
|
|
20
|
+
aria-level={2}
|
|
21
|
+
className="text-[22px] font-extrabold leading-tight tracking-tight text-strong"
|
|
22
|
+
>
|
|
23
|
+
What's New in kaizen
|
|
24
|
+
</div>
|
|
25
|
+
<div className="mt-0.5 text-sm text-muted-foreground">Version {e.version}</div>
|
|
26
|
+
</div>
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
29
|
+
className="px-0.5 py-1 text-sm text-muted-foreground underline underline-offset-[3px] hover:text-foreground"
|
|
30
|
+
onClick={() => void closeWhatsNew()}
|
|
31
|
+
>
|
|
32
|
+
Hide
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
{e.highlights.map((h) => (
|
|
36
|
+
<div key={h.title} className="mb-[18px]">
|
|
37
|
+
<b className="block text-[15px] font-semibold leading-snug text-strong">{h.title}</b>
|
|
38
|
+
<span className="mt-px block text-sm leading-[1.4] text-muted-foreground">{h.text}</span>
|
|
39
|
+
</div>
|
|
40
|
+
))}
|
|
41
|
+
{e.fixes.length > 0 && (
|
|
42
|
+
<div className="mt-1.5 border-t border-border pt-4">
|
|
43
|
+
<b className="mb-1.5 block text-[15px] font-semibold text-strong">Fixes</b>
|
|
44
|
+
<ul className="m-0 list-disc pl-[18px] text-sm leading-normal text-muted-foreground">
|
|
45
|
+
{e.fixes.map((f) => (
|
|
46
|
+
<li key={f} className="my-0.5">
|
|
47
|
+
{f}
|
|
48
|
+
</li>
|
|
49
|
+
))}
|
|
50
|
+
</ul>
|
|
51
|
+
</div>
|
|
52
|
+
)}
|
|
53
|
+
<a
|
|
54
|
+
className="mt-3.5 inline-block text-sm text-foreground underline underline-offset-[3px]"
|
|
55
|
+
href="https://github.com/hfadhlullah/kaizen/releases"
|
|
56
|
+
target="_blank"
|
|
57
|
+
rel="noopener"
|
|
58
|
+
>
|
|
59
|
+
Full release notes
|
|
60
|
+
</a>
|
|
61
|
+
<Button
|
|
62
|
+
variant="primary"
|
|
63
|
+
className="mt-4 w-full justify-center py-2.5 text-[15px] font-semibold"
|
|
64
|
+
onClick={() => void closeWhatsNew()}
|
|
65
|
+
>
|
|
66
|
+
Got it
|
|
67
|
+
</Button>
|
|
68
|
+
</section>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "@lib/core";
|
|
2
2
|
import type { CSSProperties, ReactNode } from "react";
|
|
3
|
-
import { useUpdate } from "@lib/settings";
|
|
3
|
+
import { useUpdate, useWhatsNew } from "@lib/settings";
|
|
4
4
|
import { railActions } from "@lib/rail";
|
|
5
5
|
import { useRoute } from "@lib/router";
|
|
6
6
|
import { useServer, iceNewCount, needYouCount } from "@lib/server";
|
|
@@ -50,6 +50,8 @@ export function Rail(p: { srcs?: ReactNode; before?: ReactNode }) {
|
|
|
50
50
|
lit = useRoute((r) => r.lit);
|
|
51
51
|
// A dot on Settings while a newer kaizen is known (the About bar and the update card read the same store).
|
|
52
52
|
const latest = useUpdate((s) => (s.ver?.update ? s.ver.latest : ""));
|
|
53
|
+
// The Settings gear carries the same dot while What's New has not been seen on this machine.
|
|
54
|
+
const unseen = useWhatsNew((s) => (s.data?.entry && s.data.unseen ? s.data.entry.version : ""));
|
|
53
55
|
// Counts the server store gives the menu: tasks that need you, new Icebox requests, Terminal tiles hidden on its page.
|
|
54
56
|
const need = useServer((s) => needYouCount(s.tasks)),
|
|
55
57
|
known = useServer((s) => s.tasks !== null),
|
|
@@ -204,13 +206,15 @@ export function Rail(p: { srcs?: ReactNode; before?: ReactNode }) {
|
|
|
204
206
|
</div>
|
|
205
207
|
<div className="rbot">
|
|
206
208
|
<Item
|
|
207
|
-
className={cn("it fold", latest && "upd")}
|
|
209
|
+
className={cn("it fold", (latest || unseen) && "upd")}
|
|
208
210
|
href="/?view=settings"
|
|
209
211
|
view="settings"
|
|
210
212
|
title={
|
|
211
213
|
latest
|
|
212
|
-
? `Settings: ${(globalThis as { kaizenDesktop?: unknown }).kaizenDesktop ? "Kaizen" : "kaizen"} ${latest} is available`
|
|
213
|
-
:
|
|
214
|
+
? `Settings: ${(globalThis as { kaizenDesktop?: unknown }).kaizenDesktop ? "Kaizen" : "kaizen"} ${latest} is available${unseen ? `, and see what's new in ${unseen}` : ""}`
|
|
215
|
+
: unseen
|
|
216
|
+
? `Settings: see what's new in kaizen ${unseen}`
|
|
217
|
+
: "Settings"
|
|
214
218
|
}
|
|
215
219
|
aria="Settings"
|
|
216
220
|
icon="i-gear"
|
package/web/dist/annotate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* kaizen annotator page script
|
|
1
|
+
/* kaizen annotator page script afd2e1864afda466 -- generated by bun run build:web from web/annotate/annotate.ts; do not edit */
|
|
2
2
|
(()=>{var Z=(o)=>o.length<24&&!/\d{3,}|^css-|^_|^sc-|^jsx-/.test(o),dt=(o)=>{let i=Math.min(...o.map((f)=>f.left)),d=Math.min(...o.map((f)=>f.top)),u=Math.max(...o.map((f)=>f.right)),b=Math.max(...o.map((f)=>f.bottom));return{left:i,top:d,right:u,bottom:b,width:u-i,height:b-d}},tt=(o)=>{let i=Math.min(o.x0,o.x1),d=Math.min(o.y0,o.y1),u=Math.abs(o.x1-o.x0),b=Math.abs(o.y1-o.y0);return{left:i,top:d,width:u,height:b,right:i+u,bottom:d+b}},pt=(o)=>o.width>=8&&o.height>=8,ut=(o,i)=>o.width>=4&&o.height>=4&&o.left>=i.left-1&&o.top>=i.top-1&&o.right<=i.right+1&&o.bottom<=i.bottom+1,mt=20,ft=(o,i)=>{let d=o.replace(/\s+/g," ").trim();return d?`"${d.slice(0,60)}${d.length>60?"…":""}"`:i},gt=(o,i)=>`area ${Math.round(o.width)}x${Math.round(o.height)} (${i} elements)`,ht=(o,i,d)=>({left:Math.max(8,Math.min(i-316,o.left)),top:o.bottom+330<d?Math.min(o.bottom+8,d-200):Math.max(8,o.top-190)}),xt=(o,i)=>({left:Math.min(i-12,o.left+o.width),top:Math.max(12,o.top)}),bt=(o,i,d)=>({left:Math.max(8,Math.min(i-268,o.left)),top:Math.min(o.top+o.height+8,d-90)}),yt=(o,i,d,u)=>({kind:o.kind,comment:d.comment,intent:d.intent,severity:d.severity,selector:i.selector,items:o.count>1?i.items:[],path:i.path,text:i.text.slice(0,200),tag:i.tag,url:i.url,box:`${Math.round(o.rect.left+u.x)},${Math.round(o.rect.top+u.y)} ${Math.round(o.rect.width)}x${Math.round(o.rect.height)}`,pb:{x:o.rect.left+u.x,y:o.rect.top+u.y,w:o.rect.width,h:o.rect.height},page:i.page,attrs:i.attrs,styles:i.styles,nearby:i.nearby,selected:o.selected||"",source:i.source,components:i.components});var wt=1500,kt=1300000,et=(o)=>o.width>2400||o.height>2400,vt=(o,i)=>{if(o.width<2||o.height<2||et(o))return null;let d=Math.ceil(o.width),u=Math.ceil(o.height),b=Math.max(0,i.left-o.left),f=Math.max(0,i.top-o.top),l=Math.min(d-b,i.width),C=Math.min(u-f,i.height);return l<2||C<2?null:{w:d,h:u,sx:b,sy:f,sw:l,sh:C}},Et=(o,i,d)=>{let u=[];for(let b=Math.min(2,d||1);b>=0.5;b-=0.5)u.push(Math.min(b,1600/Math.max(o,i)));return u};(()=>{let o=window,i=window.parent!==window||o.__kzHost===!0;if(o.__kzAnnotate||!i)return;o.__kzAnnotate=!0;let d=document.currentScript,u=typeof o.__kzAnnToken==="string"?o.__kzAnnToken:"";if(!u)try{u=new URL(d.src).searchParams.get("t")||""}catch{}let b=window.parent,f=(e)=>b.postMessage({kz:1,t:u,out:1,...e},"*"),l={on:!1,mode:"element",hide:!1,block:!0,color:"#3c82f7",components:!0},C=[],g=null,y=[],E=null,U=!1,j=[],I=[],F=[],nt=window.requestAnimationFrame.bind(window);window.requestAnimationFrame=(e)=>U?(F.push(e),F.length):nt(e);let H=document.createElement("style");H.textContent="*,*::before,*::after{animation-play-state:paused!important;transition:none!important}";function At(e){if(e===U)return;if(U=e,e){document.documentElement.append(H);try{j=document.getAnimations().filter((t)=>t.playState==="running"),j.forEach((t)=>t.pause())}catch{}I=[...document.querySelectorAll("video,audio")].filter((t)=>!t.paused),I.forEach((t)=>t.pause())}else H.remove(),j.forEach((t)=>{try{t.play()}catch{}}),I.forEach((t)=>t.play().catch(()=>{})),j=[],I=[],F.splice(0).forEach((t)=>nt(t))}let z=(e)=>window.CSS&&CSS.escape?CSS.escape(e):e.replace(/[^\w-]/g,"\\$&"),D=(e)=>{try{return document.querySelectorAll(e).length===1}catch{return!1}};function ot(e){if(e.id&&D("#"+z(e.id)))return"#"+z(e.id);let t=e.getAttribute("data-testid");if(t&&D(`[data-testid="${t.replace(/"/g,"\\\"")}"]`))return`[data-testid="${t.replace(/"/g,"\\\"")}"]`;let n=[];for(let r=e;r&&r.nodeType===1&&r!==document.documentElement;r=r.parentElement){let s=r.tagName.toLowerCase();if(r.id){if(n.unshift("#"+z(r.id)),D(n.join(" > ")))break;n.shift()}let c=[...r.classList].filter(Z).slice(0,2);if(c.length)s+=c.map((w)=>"."+z(w)).join("");let p=r.parentElement?[...r.parentElement.children].filter((w)=>w.tagName===r.tagName):[];if(p.length>1&&!(c.length&&r.parentElement.querySelectorAll(":scope > "+s).length===1))s+=`:nth-of-type(${p.indexOf(r)+1})`;if(n.unshift(s),D(n.join(" > ")))break}return n.join(" > ")}let Ct=(e)=>{let t=[];for(let n=e;n&&n.nodeType===1;n=n.parentElement)t.unshift(n.tagName.toLowerCase()+(n.id?"#"+n.id:""));return t.join(" > ")},K=(e)=>e.tagName.toLowerCase()+(e.id?"#"+e.id:"")+[...e.classList].filter(Z).slice(0,2).map((t)=>"."+t).join(""),Y=(e)=>(e.innerText||e.textContent||e.getAttribute("aria-label")||e.getAttribute("alt")||"").replace(/\s+/g," ").trim(),_t=["id","class","role","aria-label","href","type","name","placeholder","alt","data-testid"],St=(e)=>_t.filter((t)=>e.hasAttribute(t)).map((t)=>`${t}="${e.getAttribute(t).slice(0,80)}"`).join(" "),Rt=["color","background-color","font-family","font-size","font-weight","line-height","padding","margin","display","position","border-radius","width","height"],Mt=(e)=>{let t=getComputedStyle(e);return Rt.map((n)=>`${n}: ${t.getPropertyValue(n)}`).join("; ")};function $t(e){let t="",n=[];for(let r=e,s=0;r&&r.nodeType===1&&s<14;r=r.parentElement,s++){let c=r.getAttribute("data-astro-source-file");if(c&&!t)t=c+(r.getAttribute("data-astro-source-loc")?":"+r.getAttribute("data-astro-source-loc").replace(/:/,":"):"");let p=r.__svelte_meta&&r.__svelte_meta.loc;if(p&&!t)t=`${p.file}:${p.line}`;let w=r.__vueParentComponent;for(let a=w,v=0;a&&v<6;a=a.parent,v++){let m=a.type&&(a.type.name||a.type.__name);if(m&&!n.includes(m))n.push(m);if(a.type&&a.type.__file&&!t)t=a.type.__file}if(r.__vue__&&r.__vue__.$options){let a=r.__vue__.$options;if(a.name&&!n.includes(a.name))n.push(a.name);if(a.__file&&!t)t=a.__file}let P=Object.keys(r).find((a)=>a.startsWith("__reactFiber$"));if(P)for(let a=r[P],v=0;a&&v<40;a=a.return,v++){if(a._debugSource&&!t)t=`${a._debugSource.fileName}:${a._debugSource.lineNumber}`;let m=a.type;if(typeof m==="function"||m&&typeof m==="object"){let S=m.displayName||m.name||m.render&&m.render.name||"";if(S&&!n.includes(S)&&n.length<8)n.push(S)}}if(t&&n.length)break}return{source:t,components:n.reverse().join(" > ")}}let M=document.createElement("div");M.style.cssText="all:initial;position:fixed;inset:0;z-index:2147483647;pointer-events:none";let Tt=M.attachShadow({mode:"closed"}),rt=document.createElement("style");rt.textContent=`
|
|
3
3
|
*{box-sizing:border-box;font:12px/1.4 system-ui,sans-serif}
|
|
4
4
|
.b{position:fixed;pointer-events:none;border:2px solid var(--c);background:color-mix(in srgb,var(--c) 14%,transparent);border-radius:2px}
|