@markmo/europacore-session-ui 0.2.0 → 0.3.0

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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as s, Fragment as C, jsx as a } from "react/jsx-runtime";
2
2
  import { useRef as B, useState as D, useLayoutEffect as O } from "react";
3
3
  import { createPortal as j } from "react-dom";
4
- import { z as T, O as G, a8 as w, aC as _, aD as v, ay as k, az as L, aE as P, ae as H, ad as U, a as W } from "./index-NjGO7Jg1.js";
4
+ import { z as T, O as G, a8 as w, aC as _, aD as v, ay as k, az as L, aE as P, ae as H, ad as U, a as W } from "./index-B0hmy2Cw.js";
5
5
  const I = ["backlog", "planned", "in_progress", "blocked", "in_review", "done", "cancelled"], R = {
6
6
  input: "waits for you",
7
7
  failed: "failed",
@@ -100,10 +100,13 @@ function g({ children: e }) {
100
100
  function $({ row: e }) {
101
101
  if (!e.criteria.length) return null;
102
102
  const t = e.stage === "done" || e.stage === "in_review";
103
- return /* @__PURE__ */ a(l, { label: "Criteria", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5", children: e.criteria.slice(0, 4).map((i, n) => /* @__PURE__ */ s("li", { className: "flex gap-1.5", children: [
104
- /* @__PURE__ */ a("span", { className: t ? "text-ok" : "text-faint", "aria-hidden": "true", children: t ? "✔" : "○" }),
105
- /* @__PURE__ */ a("span", { children: i })
106
- ] }, n)) }) });
103
+ return /* @__PURE__ */ a(l, { label: "Criteria", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5", children: e.criteria.slice(0, 4).map((i, n) => (
104
+ // biome-ignore lint/suspicious/noArrayIndexKey: a static list of strings, which may repeat
105
+ /* @__PURE__ */ s("li", { className: "flex gap-1.5", children: [
106
+ /* @__PURE__ */ a("span", { className: t ? "text-ok" : "text-faint", "aria-hidden": "true", children: t ? "✔" : "○" }),
107
+ /* @__PURE__ */ a("span", { children: i })
108
+ ] }, n)
109
+ )) }) });
107
110
  }
108
111
  function Y({ card: e, seen: t, now: i = Date.now() }) {
109
112
  const { row: n } = e, f = n.stageSince ? ` for ${v(Math.max(0, i - n.stageSince))}` : "", u = /* @__PURE__ */ s(C, { children: [
@@ -156,7 +159,10 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
156
159
  "⎇ ",
157
160
  n.branch
158
161
  ] }, "branch")), (n.tokens || n.costUsd !== null) && r.push(/* @__PURE__ */ a(l, { label: "Usage", children: N(n) }, "usage")), n.explain.length && r.push(
159
- /* @__PURE__ */ a(l, { label: "Why", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5 text-muted", children: n.explain.slice(0, 3).map((o, p) => /* @__PURE__ */ a("li", { children: o }, p)) }) }, "why")
162
+ /* @__PURE__ */ a(l, { label: "Why", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5 text-muted", children: n.explain.slice(0, 3).map((o, p) => (
163
+ // biome-ignore lint/suspicious/noArrayIndexKey: a static list of strings, which may repeat
164
+ /* @__PURE__ */ a("li", { children: o }, p)
165
+ )) }) }, "why")
160
166
  ), r.push(/* @__PURE__ */ a($, { row: n }, "criteria")), h = `Opens its fleet session${e.fleet ? `, ${e.fleet}` : ""}.`;
161
167
  else {
162
168
  const o = [n.agent, n.model].filter(Boolean).join(" · "), p = n.waiting > 1 ? ` · ${n.waiting} waits` : "";
@@ -186,7 +192,10 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
186
192
  r.push(/* @__PURE__ */ a(l, { label: "Tasks", children: x.join(" · ") }, "tasks"));
187
193
  }
188
194
  r.push(/* @__PURE__ */ a($, { row: n }, "criteria")), n.explain.length && r.push(
189
- /* @__PURE__ */ a(l, { label: "Collides", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5 text-warn", children: n.explain.slice(0, 2).map((x, d) => /* @__PURE__ */ a("li", { children: x }, d)) }) }, "collides")
195
+ /* @__PURE__ */ a(l, { label: "Collides", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5 text-warn", children: n.explain.slice(0, 2).map((x, d) => (
196
+ // biome-ignore lint/suspicious/noArrayIndexKey: a static list of strings, which may repeat
197
+ /* @__PURE__ */ a("li", { children: x }, d)
198
+ )) }) }, "collides")
190
199
  ), n.branch && r.push(/* @__PURE__ */ s(l, { label: "Branch", children: [
191
200
  "⎇ ",
192
201
  n.branch
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
2
  import { useEffect as F, useMemo as I, useState as x, useRef as ee } from "react";
3
3
  import { useParams as te, Link as z } from "react-router";
4
4
  import { Star as ae, X as ne, ArrowLeft as se, Check as ie, ExternalLink as le } from "lucide-react";
5
- import { E as de, y as K, G as ce, u as re, a2 as oe, aX as me, aY as pe, aZ as fe, Q as O, a_ as he, F as xe, aB as ue, z as L, a$ as f, a as k, H, b0 as X, b1 as ke, b2 as be, b3 as ge, b4 as Ne, aC as _e, B as ye, C as P } from "./index-NjGO7Jg1.js";
5
+ import { E as de, y as K, G as ce, u as re, a2 as oe, aX as me, aY as pe, aZ as fe, Q as O, a_ as he, F as xe, aB as ue, z as L, a$ as f, a as k, H, b0 as X, b1 as ke, b2 as be, b3 as ge, b4 as Ne, aC as _e, B as ye, C as P } from "./index-B0hmy2Cw.js";
6
6
  function we(e) {
7
7
  return e.picked ? { label: "★ picked", tone: "ok" } : e.fleet_state === "passed" ? { label: "✔ passed", tone: "ok" } : e.fleet_state === "failed" ? { label: "✗ failed", tone: "danger" } : e.fleet_state === "cancelled" || e.fleet_state === "skipped" ? { label: "⊘ cancelled", tone: "neutral" } : e.pending_tool_call_id ? { label: "⏸ waiting", tone: "warn" } : { label: "● running", tone: "accent" };
8
8
  }
@@ -2,14 +2,14 @@ import { jsxs as l, jsx as t, Fragment as re } from "react/jsx-runtime";
2
2
  import { useState as x, useRef as W, useEffect as K, forwardRef as De, useMemo as Re } from "react";
3
3
  import { useNavigate as Ae, useSearchParams as Oe, Link as B } from "react-router";
4
4
  import { Hourglass as Te, Send as Ke, Play as Le, Plus as $e, LayoutList as oe, Inbox as ce, Search as de, X as Ie, Pin as q, MessageSquareReply as pe, Eye as Me, PinOff as Ue, Pencil as _e } from "lucide-react";
5
- import { g as ee, y as c, u as Be, Z as Fe, H as D, V as ve, C as F, w as Y, x as Ne, $ as He, a0 as Z, s as We, a1 as je, a2 as he, a3 as qe, z as ue, a4 as Ge, J as me, a as $, a5 as Je, a6 as Qe, a7 as Ve, F as fe, a8 as G, M as xe, a9 as Xe, aa as ge, ab as Ye, ac as be, ad as Ze, ae as et, r as ye, af as I, ag as J, I as Q, ah as tt, ai as nt } from "./index-NjGO7Jg1.js";
6
- import { C as st } from "./CardDetail-CCgP8R61.js";
7
- import { d as Se, P as at, p as we } from "./promptHistory-DjSCHmEk.js";
5
+ import { g as ee, y as c, u as Be, Z as Fe, H as D, V as Ne, C as F, w as Y, x as ve, $ as He, a0 as Z, s as We, a1 as je, a2 as he, a3 as qe, z as ue, a4 as Ge, J as me, a as $, a5 as Je, a6 as Qe, a7 as Ve, F as fe, a8 as G, M as xe, a9 as Xe, aa as ge, ab as Ye, ac as be, ad as Ze, ae as et, r as ye, af as I, ag as J, I as Q, ah as tt, ai as nt } from "./index-B0hmy2Cw.js";
6
+ import { C as st } from "./CardDetail-D0TLVhf7.js";
7
+ import { d as Se, P as at, p as we } from "./promptHistory-DQyt2Br0.js";
8
8
  const V = /* @__PURE__ */ new Map(), Ce = "Commands run in a session: open it to run one.";
9
9
  function H(i) {
10
10
  return !!i.id && !i.parent && !i.run;
11
11
  }
12
- function it({ row: i, onOpen: m, onClose: N, autoFocus: S = !0 }) {
12
+ function it({ row: i, onOpen: m, onClose: v, autoFocus: S = !0 }) {
13
13
  const { toast: R } = ee(), g = i.id ? c.get(i.id) : void 0;
14
14
  Be(g, F.pause, F.run, F.session, F.reset);
15
15
  const [w, M] = x(() => V.get(i.key) ?? ""), [f, o] = x(null), [P, b] = x(!1), A = W(null);
@@ -34,10 +34,10 @@ function it({ row: i, onOpen: m, onClose: N, autoFocus: S = !0 }) {
34
34
  try {
35
35
  await c.reply(i.id, r), R(`${O ? "Steered" : "Sent to"} “${i.title}”`, "ok", { action: { label: "Open", onClick: m } });
36
36
  } catch (p) {
37
- k(r), R(`Couldn't send to “${i.title}”: ${ve(p)}`, "danger");
37
+ k(r), R(`Couldn't send to “${i.title}”: ${Ne(p)}`, "danger");
38
38
  }
39
39
  };
40
- return h && g ? /* @__PURE__ */ l("div", { className: "flex flex-col gap-2", "aria-label": `Decision for ${i.title}`, children: [
40
+ return h && g ? /* @__PURE__ */ l("fieldset", { className: "flex min-w-0 flex-col gap-2", "aria-label": `Decision for ${i.title}`, children: [
41
41
  /* @__PURE__ */ t(at, { controller: g, collisions: Fe.collisions }),
42
42
  w.trim() && /* @__PURE__ */ t("button", { type: "button", className: "self-start text-[12px] text-muted hover:text-ink", onClick: () => b(!1), children: "Back to your message" })
43
43
  ] }) : /* @__PURE__ */ l("div", { className: "flex flex-col gap-1.5", children: [
@@ -55,7 +55,7 @@ function it({ row: i, onOpen: m, onClose: N, autoFocus: S = !0 }) {
55
55
  rows: 2,
56
56
  onChange: (r) => k(r.target.value),
57
57
  onKeyDown: (r) => {
58
- r.stopPropagation(), r.key === "Enter" && !r.shiftKey && !r.nativeEvent.isComposing ? (r.preventDefault(), C()) : r.key === "Escape" && (r.preventDefault(), N());
58
+ r.stopPropagation(), r.key === "Enter" && !r.shiftKey && !r.nativeEvent.isComposing ? (r.preventDefault(), C()) : r.key === "Escape" && (r.preventDefault(), v());
59
59
  },
60
60
  placeholder: g?.running() ? "Steer it…" : "Reply…",
61
61
  "aria-label": `Reply to ${i.title}`,
@@ -84,8 +84,8 @@ function rt(i) {
84
84
  } catch {
85
85
  }
86
86
  }
87
- const ot = De(function({ onStarted: m, onOpenNew: N, onLeave: S }, R) {
88
- const { toast: g } = ee(), w = Y((n) => n.agents), M = Y((n) => n.features), f = Ne(w, M), [o, P] = x(() => ({ agent: "", workspace: "", ...lt() })), [b, A] = x(null), [y, h] = x(""), [k, C] = x(null), [r, O] = x(!1), p = f.find((n) => n.name === o.agent) ?? f.find((n) => n.name === "chat") ?? f[0], z = !!(p && He.has(p.name)), v = b?.find((n) => n.path === o.workspace) ?? b?.[0] ?? null;
87
+ const ot = De(function({ onStarted: m, onOpenNew: v, onLeave: S }, R) {
88
+ const { toast: g } = ee(), w = Y((n) => n.agents), M = Y((n) => n.features), f = ve(w, M), [o, P] = x(() => ({ agent: "", workspace: "", ...lt() })), [b, A] = x(null), [y, h] = x(""), [k, C] = x(null), [r, O] = x(!1), p = f.find((n) => n.name === o.agent) ?? f.find((n) => n.name === "chat") ?? f[0], z = !!(p && He.has(p.name)), N = b?.find((n) => n.path === o.workspace) ?? b?.[0] ?? null;
89
89
  K(() => {
90
90
  if (!z || b !== null) return;
91
91
  const n = We().workspaces;
@@ -98,18 +98,18 @@ const ot = De(function({ onStarted: m, onOpenNew: N, onLeave: S }, R) {
98
98
  }, T = async () => {
99
99
  if (!p) return;
100
100
  const n = y.trim();
101
- if (!n) return N({ agent: p.name, workspace: z ? v?.path ?? null : null });
101
+ if (!n) return v({ agent: p.name, workspace: z ? N?.path ?? null : null });
102
102
  if (n.startsWith("/")) return C(Ce);
103
- if (z && !v) return C(`${p.name} works in a workspace: create one from New session first.`);
104
- O(!0), h(""), C(null), we.record(n, v?.path);
103
+ if (z && !N) return C(`${p.name} works in a workspace: create one from New session first.`);
104
+ O(!0), h(""), C(null), we.record(n, N?.path);
105
105
  try {
106
106
  const { controller: d, problem: E } = await c.dispatch(
107
- { agent: p, ...z && v ? { workspace: { path: v.path, worktree: !0 } } : {} },
107
+ { agent: p, ...z && N ? { workspace: { path: N.path, worktree: !0 } } : {} },
108
108
  n
109
109
  );
110
110
  d.started && m(d.id, d.title()), E && (d.started || h(n), g(`The session didn't start: ${E}`, "danger"));
111
111
  } catch (d) {
112
- h(n), g(`The session didn't start: ${ve(d)}`, "danger");
112
+ h(n), g(`The session didn't start: ${Ne(d)}`, "danger");
113
113
  } finally {
114
114
  O(!1);
115
115
  }
@@ -117,7 +117,7 @@ const ot = De(function({ onStarted: m, onOpenNew: N, onLeave: S }, R) {
117
117
  return f.length ? /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: [
118
118
  /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center gap-1.5 rounded-lg border border-line bg-surface p-1.5 focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/20", children: [
119
119
  f.length > 1 && /* @__PURE__ */ t(Z, { "aria-label": "Agent", value: p?.name ?? "", onChange: (n) => L({ agent: n.target.value }), className: "h-8 w-auto text-[12.5px]", children: f.map((n) => /* @__PURE__ */ t("option", { value: n.name, children: n.name }, n.name)) }),
120
- z && (b?.length ?? 0) > 0 && /* @__PURE__ */ t(Z, { "aria-label": "Workspace", value: v?.path ?? "", onChange: (n) => L({ workspace: n.target.value }), className: "h-8 w-auto max-w-48 text-[12.5px]", children: b.map((n) => /* @__PURE__ */ t("option", { value: n.path, children: n.name }, n.path)) }),
120
+ z && (b?.length ?? 0) > 0 && /* @__PURE__ */ t(Z, { "aria-label": "Workspace", value: N?.path ?? "", onChange: (n) => L({ workspace: n.target.value }), className: "h-8 w-auto max-w-48 text-[12.5px]", children: b.map((n) => /* @__PURE__ */ t("option", { value: n.path, children: n.name }, n.path)) }),
121
121
  /* @__PURE__ */ t(
122
122
  "input",
123
123
  {
@@ -142,11 +142,11 @@ const ot = De(function({ onStarted: m, onOpenNew: N, onLeave: S }, R) {
142
142
  ] }) : null;
143
143
  }), ke = { input: "Waits for you", failed: "Failed", collision: "Collision", ready: "Ready to merge", done: "Finished" }, ct = "(min-width: 1280px)", dt = "(min-width: 768px)";
144
144
  function pt(i, m) {
145
- return i.flatMap((N) => [{ row: N, depth: 0 }, ...m.has(N.key) ? N.children.map((S) => ({ row: S, depth: 1 })) : []]);
145
+ return i.flatMap((v) => [{ row: v, depth: 0 }, ...m.has(v.key) ? v.children.map((S) => ({ row: S, depth: 1 })) : []]);
146
146
  }
147
147
  const X = (i) => !!(i?.id && !i.parent && !i.run);
148
148
  function yt() {
149
- const i = je(), m = Ae(), { toast: N } = ee(), S = Y((e) => Ne(e.agents, e.features).length > 0), R = he(ct), g = he(dt), w = R ? "aside" : g ? "table" : "card", [M, f] = Oe(), o = M.get("view") === "inbox" ? "inbox" : "all", [P, b] = x(/* @__PURE__ */ new Set()), [A, y] = x(null), [h, k] = x(""), [C, r] = x(null), [O, p] = x(null), z = W(null), v = W(null), L = W(null), T = c.seen, n = qe(o === "inbox" ? c.inbox() : i, h), d = Re(() => o === "inbox" ? n.map((e) => ({ row: e, depth: 0 })) : pt(n, P), [n, P, o]), E = Math.max(0, d.findIndex((e) => e.row.key === A)), s = d[E]?.row ?? null, U = s !== null && C === s.key, te = (e) => {
149
+ const i = je(), m = Ae(), { toast: v } = ee(), S = Y((e) => ve(e.agents, e.features).length > 0), R = he(ct), g = he(dt), w = R ? "aside" : g ? "table" : "card", [M, f] = Oe(), o = M.get("view") === "inbox" ? "inbox" : "all", [P, b] = x(/* @__PURE__ */ new Set()), [A, y] = x(null), [h, k] = x(""), [C, r] = x(null), [O, p] = x(null), z = W(null), N = W(null), L = W(null), T = c.seen, n = qe(o === "inbox" ? c.inbox() : i, h), d = Re(() => o === "inbox" ? n.map((e) => ({ row: e, depth: 0 })) : pt(n, P), [n, P, o]), E = Math.max(0, d.findIndex((e) => e.row.key === A)), s = d[E]?.row ?? null, U = s !== null && C === s.key, te = (e) => {
150
150
  const a = d[Math.max(0, Math.min(d.length - 1, e))]?.row;
151
151
  a && y(a.key);
152
152
  };
@@ -159,7 +159,7 @@ function yt() {
159
159
  }, ne = (e) => {
160
160
  if (!X(e)) return;
161
161
  const a = c.togglePin(e.id);
162
- N(a ? `Pinned “${e.title}” to the top` : `Unpinned “${e.title}”`, "ok");
162
+ v(a ? `Pinned “${e.title}” to the top` : `Unpinned “${e.title}”`, "ok");
163
163
  }, Pe = ({ agent: e, workspace: a }) => {
164
164
  const u = new URLSearchParams({ agent: e });
165
165
  a && u.set("workspace", a), m(me(u));
@@ -173,7 +173,7 @@ function yt() {
173
173
  if (a.key === "Enter" && s) return m(I(s));
174
174
  if ((a.key === "ArrowRight" || a.key === "l") && s) j(s);
175
175
  else if (a.key === "n" && S) L.current?.focus();
176
- else if (a.key === "/") v.current?.focus();
176
+ else if (a.key === "/") N.current?.focus();
177
177
  else if (a.key === "*") ne(s);
178
178
  else if (a.key === "e" && X(s)) p(s.key);
179
179
  else if (a.key === "m" && s) c.markSeen(s);
@@ -213,7 +213,7 @@ function yt() {
213
213
  {
214
214
  ref: L,
215
215
  onStarted: (e, a) => {
216
- y(e), N(`Started “${a}”`, "ok", { action: { label: "Open", onClick: () => m(ue(e)) } });
216
+ y(e), v(`Started “${a}”`, "ok", { action: { label: "Open", onClick: () => m(ue(e)) } });
217
217
  },
218
218
  onOpenNew: Pe,
219
219
  onLeave: () => L.current?.blur()
@@ -237,11 +237,11 @@ function yt() {
237
237
  /* @__PURE__ */ t(
238
238
  "input",
239
239
  {
240
- ref: v,
240
+ ref: N,
241
241
  value: h,
242
242
  onChange: (e) => k(e.target.value),
243
243
  onKeyDown: (e) => {
244
- e.stopPropagation(), e.key === "Escape" ? (e.preventDefault(), h ? k("") : v.current?.blur()) : e.key === "Enter" && v.current?.blur();
244
+ e.stopPropagation(), e.key === "Escape" ? (e.preventDefault(), h ? k("") : N.current?.blur()) : e.key === "Enter" && N.current?.blur();
245
245
  },
246
246
  placeholder: "Filter · a:agent s:state",
247
247
  "aria-label": "Filter sessions",
@@ -250,7 +250,8 @@ function yt() {
250
250
  ),
251
251
  h && /* @__PURE__ */ t("button", { type: "button", "aria-label": "Clear the filter", onClick: () => k(""), className: "absolute top-1/2 right-1.5 -translate-y-1/2 rounded p-0.5 text-faint hover:text-ink", children: /* @__PURE__ */ t(Ie, { size: 13 }) })
252
252
  ] }),
253
- o === "all" && /* @__PURE__ */ l("label", { className: "ml-auto flex items-center gap-2 text-[12.5px] text-muted", children: [
253
+ o === "all" && // biome-ignore lint/a11y/noLabelWithoutControl: NativeSelect is a select
254
+ /* @__PURE__ */ l("label", { className: "ml-auto flex items-center gap-2 text-[12.5px] text-muted", children: [
254
255
  "Sort",
255
256
  /* @__PURE__ */ t(Z, { value: c.sort, onChange: (e) => Ve(e.target.value) && c.setSort(e.target.value), className: "h-8 w-auto text-[12.5px]", children: Je.map((e) => /* @__PURE__ */ t("option", { value: e, children: Qe[e] }, e)) })
256
257
  ] })
@@ -1,8 +1,8 @@
1
1
  import { jsxs as o, jsx as s, Fragment as Ce } from "react/jsx-runtime";
2
2
  import { useState as m, useSyncExternalStore as $e, useEffect as Ae, useMemo as k, useCallback as Ee, Fragment as Le } from "react";
3
3
  import { useSearchParams as Me, Link as De } from "react-router";
4
- import { Download as Re, FileText as Fe, FileSpreadsheet as Te, FileJson as je, Search as X, RotateCcw as Ie, BookMarked as ye } from "lucide-react";
5
- import { aF as P, g as _e, aG as ze, y as _, aH as Oe, aI as z, aJ as Be, a4 as Pe, H as D, au as Ue, ax as qe, av as Ve, a0 as Z, aK as O, aL as ee, aM as se, aA as te, aB as Je, F as ne, aN as ae, aO as ie, aP as oe, aQ as le, aR as re, a as B, aS as Ke, aT as He, Q as Ge, z as Qe, r as We, aU as Ye, aV as Xe, aW as Ze } from "./index-NjGO7Jg1.js";
4
+ import { Download as Re, FileText as Fe, FileSpreadsheet as Te, FileJson as je, Search as X, RotateCcw as Ie, BookMarked as _e } from "lucide-react";
5
+ import { aF as P, g as ye, aG as ze, y, aH as Oe, aI as z, aJ as Be, a4 as Pe, H as D, au as Ue, ax as qe, av as Ve, a0 as Z, aK as O, aL as ee, aM as se, aA as te, aB as Je, F as ne, aN as ae, aO as ie, aP as oe, aQ as le, aR as re, a as B, aS as Ke, aT as He, Q as Ge, z as Qe, r as We, aU as Ye, aV as Xe, aW as Ze } from "./index-B0hmy2Cw.js";
6
6
  import { Menu as es, MenuButton as ss } from "@headlessui/react";
7
7
  function U(t) {
8
8
  if (Number.isNaN(t.getTime())) return "";
@@ -138,7 +138,7 @@ function pe({ iso: t }) {
138
138
  return /* @__PURE__ */ s("time", { dateTime: t, title: new Date(t).toLocaleString(), children: We(t) });
139
139
  }
140
140
  function ks() {
141
- const { toast: t } = _e(), [i, n] = Me(), [r, c] = m([]), [h, g] = m(/* @__PURE__ */ new Map()), [p, C] = m(!0), [x, b] = m(null), [ge, fe] = m(0), [v, q] = m("all"), [N, V] = m("all"), [w, J] = m("all"), [$, K] = m(""), [R, A] = m(null), [F, H] = m(null), xe = ze(), be = $e(_.subscribe, _.getVersion);
141
+ const { toast: t } = ye(), [i, n] = Me(), [r, c] = m([]), [h, g] = m(/* @__PURE__ */ new Map()), [p, C] = m(!0), [x, b] = m(null), [ge, fe] = m(0), [v, q] = m("all"), [N, V] = m("all"), [w, J] = m("all"), [$, K] = m(""), [R, A] = m(null), [F, H] = m(null), xe = ze(), be = $e(y.subscribe, y.getVersion);
142
142
  Ae(() => {
143
143
  let e = !1;
144
144
  return C(!0), b(null), gs(c, () => e).catch((a) => {
@@ -152,7 +152,7 @@ function ks() {
152
152
  const E = k(() => {
153
153
  const e = new Map(r.map((a) => [a.id, a]));
154
154
  for (const [a, l] of h) e.set(a, l);
155
- for (const a of _.attached()) a.session && e.has(a.id) && e.set(a.id, a.session);
155
+ for (const a of y.attached()) a.session && e.has(a.id) && e.set(a.id, a.session);
156
156
  return e;
157
157
  }, [r, h, xe, be]), S = k(() => [...E.values()], [E]), T = k(() => Oe(S), [S]), d = i.get("scope") ?? T[0]?.scope ?? z, u = k(() => Be(S, d), [S, d]), L = k(
158
158
  () => u.filter(
@@ -175,7 +175,7 @@ function ks() {
175
175
  for (const f of e) f && l.set(f.id, f);
176
176
  return l;
177
177
  });
178
- }, []), I = { scope: d, sessions: S }, y = async (e, a) => {
178
+ }, []), I = { scope: d, sessions: S }, _ = async (e, a) => {
179
179
  H(e.uid);
180
180
  try {
181
181
  const l = await a();
@@ -184,9 +184,9 @@ function ks() {
184
184
  H(null);
185
185
  }
186
186
  }, W = (e, a) => {
187
- a === "retire" ? y(e, () => Ze(I, e.id)) : A({ uid: e.uid, mode: a });
187
+ a === "retire" ? _(e, () => Ze(I, e.id)) : A({ uid: e.uid, mode: a });
188
188
  }, we = (e, a, l, f) => {
189
- a === "edit" ? y(e, () => Ye(I, e.id, { text: l, rationale: f })) : y(e, () => Xe(I, e.id, { text: l, rationale: f }));
189
+ a === "edit" ? _(e, () => Ye(I, e.id, { text: l, rationale: f })) : _(e, () => Xe(I, e.id, { text: l, rationale: f }));
190
190
  }, Se = (e) => {
191
191
  const a = ps(e, u, d);
192
192
  hs(a.text, a.type, a.filename);
@@ -310,13 +310,13 @@ function ks() {
310
310
  "Could not read every session: ",
311
311
  x
312
312
  ] }),
313
- u.length === 0 ? /* @__PURE__ */ s("div", { className: "rounded-xl border border-line bg-surface", children: p ? /* @__PURE__ */ s("div", { className: "flex justify-center py-16 text-accent", children: /* @__PURE__ */ s(te, {}) }) : /* @__PURE__ */ o(ne, { icon: /* @__PURE__ */ s(ye, { size: 20 }), title: "Nothing remembered here yet", children: [
313
+ u.length === 0 ? /* @__PURE__ */ s("div", { className: "rounded-xl border border-line bg-surface", children: p ? /* @__PURE__ */ s("div", { className: "flex justify-center py-16 text-accent", children: /* @__PURE__ */ s(te, {}) }) : /* @__PURE__ */ o(ne, { icon: /* @__PURE__ */ s(_e, { size: 20 }), title: "Nothing remembered here yet", children: [
314
314
  "In a session, ",
315
315
  /* @__PURE__ */ s("code", { className: "font-mono", children: "/decision" }),
316
316
  " or ",
317
317
  /* @__PURE__ */ s("code", { className: "font-mono", children: "/requirement" }),
318
318
  " records one, approvals are remembered as you make them, and ",
319
- /* @__PURE__ */ s("code", { className: "font-mono", children: "/memory extract" }),
319
+ /* @__PURE__ */ s("code", { className: "font-mono", children: "/decisions extract" }),
320
320
  " asks the agent for what was agreed."
321
321
  ] }) }) : L.length === 0 ? /* @__PURE__ */ s("div", { className: "rounded-xl border border-line bg-surface", children: /* @__PURE__ */ s(ne, { icon: /* @__PURE__ */ s(X, { size: 20 }), title: "No entries match", action: /* @__PURE__ */ s(D, { size: "sm", onClick: Q, children: "Clear filters" }), children: "Nothing in this scope matches the filters." }) }) : /* @__PURE__ */ o(Ce, { children: [
322
322
  /* @__PURE__ */ s("div", { className: "hidden overflow-hidden rounded-xl border border-line bg-surface md:block", children: /* @__PURE__ */ o("table", { className: "w-full table-fixed text-left text-[13px]", children: [