@parallelworks/tandem-web 0.176.0 → 0.178.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,139 +1,185 @@
1
1
  import { api as e, unwrap as t } from "../../../api/client.js";
2
- import { agentsQuery as n, meQuery as r } from "../../../api/queries.js";
3
- import { AgentIcon as i } from "../../../components/icons.js";
4
- import { harnessNames as a } from "../../../lib/agents.js";
5
- import { useConfirm as o } from "../../../lib/confirm.js";
6
- import { copyItem as s, useLinkItems as c } from "../../../lib/menus.js";
7
- import { usePageTitle as l } from "../../../lib/pageTitle.js";
8
- import { may as u } from "../../../lib/roles.js";
9
- import { Link as d, useNavigate as f } from "../../../lib/router.js";
10
- import { Route as p } from "./index.js";
11
- import { Avatar as m, Card as h, EmptyState as g, buttonClasses as _, menuDivider as v, useOpenMenu as y } from "@parallelworks/ui";
12
- import { useTranslations as b } from "use-intl";
13
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
14
- import { useMutation as C, useQueryClient as w, useSuspenseQuery as T } from "@tanstack/react-query";
2
+ import { agentsQuery as n, meQuery as r, runnersQuery as i, workspaceRunsQuery as a } from "../../../api/queries.js";
3
+ import { AgentIcon as o, AlertIcon as s } from "../../../components/icons.js";
4
+ import { RunnerBadge as c } from "../../../components/RunnerBadge.js";
5
+ import { harnessNames as l, runnersFor as u } from "../../../lib/agents.js";
6
+ import { useConfirm as d } from "../../../lib/confirm.js";
7
+ import { copyItem as f, useLinkItems as p } from "../../../lib/menus.js";
8
+ import { usePageTitle as m } from "../../../lib/pageTitle.js";
9
+ import { may as h } from "../../../lib/roles.js";
10
+ import { Link as g, useNavigate as _ } from "../../../lib/router.js";
11
+ import { Route as v } from "./index.js";
12
+ import { Avatar as y, Card as b, EmptyState as x, buttonClasses as S, menuDivider as C, useOpenMenu as w } from "@parallelworks/ui";
13
+ import { useTranslations as T } from "use-intl";
14
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
15
+ import { useMutation as O, useQuery as k, useQueryClient as A, useSuspenseQuery as j } from "@tanstack/react-query";
15
16
  // src/routes/$workspace/agents/index.tsx?tsr-split=component
16
- function E() {
17
- let { workspace: E } = p.useParams(), D = b("agents"), O = b("common"), k = c(), { data: A } = T(n(E));
18
- l(D("title"));
19
- let { data: j } = T(r), M = u(j, E, "manage_agents"), N = y(), P = f(), F = w(), I = C({
17
+ function M() {
18
+ let { workspace: s } = v.useParams(), c = T("agents"), u = T("common"), M = p(), { data: P } = j(n(s)), { data: F = [] } = k(i(s)), { data: I = [] } = k(a(s, {
19
+ live: !0,
20
+ limit: 200
21
+ }));
22
+ m(c("title"));
23
+ let { data: L } = j(r), R = h(L, s, "manage_agents"), z = w(), B = _(), V = A(), H = O({
20
24
  mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/agents/{slug}", { params: { path: {
21
- workspace: E,
25
+ workspace: s,
22
26
  slug: n
23
27
  } } })),
24
- onSettled: () => F.invalidateQueries({ queryKey: n(E).queryKey })
25
- }), { confirm: L, dialog: R } = o(), z = (e) => [
28
+ onSettled: () => V.invalidateQueries({ queryKey: n(s).queryKey })
29
+ }), { confirm: U, dialog: W } = d(), G = (e) => [
26
30
  {
27
- label: O("open"),
28
- onClick: () => P({
31
+ label: u("open"),
32
+ onClick: () => B({
29
33
  to: "/$workspace/agents/$slug",
30
34
  params: {
31
- workspace: E,
35
+ workspace: s,
32
36
  slug: e.slug
33
37
  }
34
38
  })
35
39
  },
36
- ...k(`/${E}/agents/${e.slug}`),
37
- s(D("copySlug"), e.slug),
38
- ...M && !e.archivedAt ? [v, {
39
- label: D("archive"),
40
+ ...M(`/${s}/agents/${e.slug}`),
41
+ f(c("copySlug"), e.slug),
42
+ ...R && !e.archivedAt ? [C, {
43
+ label: c("archive"),
40
44
  destructive: !0,
41
- onClick: () => L({
42
- title: D("archiveTitle", { name: e.name }),
43
- description: D("archiveDescription"),
44
- confirmLabel: D("archive"),
45
- onConfirm: () => I.mutateAsync(e.slug)
45
+ onClick: () => U({
46
+ title: c("archiveTitle", { name: e.name }),
47
+ description: c("archiveDescription"),
48
+ confirmLabel: c("archive"),
49
+ onConfirm: () => H.mutateAsync(e.slug)
46
50
  })
47
51
  }] : []
48
52
  ];
49
- return /* @__PURE__ */ S("div", {
53
+ return /* @__PURE__ */ D("div", {
50
54
  className: "w-full px-4 py-6 md:px-8 md:py-8",
51
55
  children: [
52
- /* @__PURE__ */ S("div", {
56
+ /* @__PURE__ */ D("div", {
53
57
  className: "flex items-center justify-between",
54
58
  children: [
55
- /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x("h1", {
59
+ /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E("h1", {
56
60
  className: "text-xl font-semibold tracking-tight",
57
- children: D("title")
61
+ children: c("title")
58
62
  }) }),
59
- A.length > 0 && /* @__PURE__ */ x(d, {
63
+ P.length > 0 && /* @__PURE__ */ E(g, {
60
64
  to: "/$workspace/measures",
61
- params: { workspace: E },
62
- className: `${_()} ml-auto mr-2`,
63
- children: D("measures")
65
+ params: { workspace: s },
66
+ className: `${S()} ml-auto mr-2`,
67
+ children: c("measures")
64
68
  }),
65
- M && A.length > 0 && /* @__PURE__ */ x(d, {
69
+ R && P.length > 0 && /* @__PURE__ */ E(g, {
66
70
  to: "/$workspace/agents/$slug",
67
71
  params: {
68
- workspace: E,
72
+ workspace: s,
69
73
  slug: "new"
70
74
  },
71
- className: _({ variant: "primary" }),
72
- children: D("new")
75
+ className: S({ variant: "primary" }),
76
+ children: c("new")
73
77
  })
74
78
  ]
75
79
  }),
76
- A.length === 0 ? /* @__PURE__ */ x(g, {
77
- icon: /* @__PURE__ */ x(i, {}),
78
- title: D("empty"),
79
- description: D("emptyDescription"),
80
- ...M && { action: /* @__PURE__ */ x(d, {
80
+ P.length === 0 ? /* @__PURE__ */ E(x, {
81
+ icon: /* @__PURE__ */ E(o, {}),
82
+ title: c("empty"),
83
+ description: c("emptyDescription"),
84
+ ...R && { action: /* @__PURE__ */ E(g, {
81
85
  to: "/$workspace/agents/$slug",
82
86
  params: {
83
- workspace: E,
87
+ workspace: s,
84
88
  slug: "new"
85
89
  },
86
- className: _({ variant: "primary" }),
87
- children: D("new")
90
+ className: S({ variant: "primary" }),
91
+ children: c("new")
88
92
  }) },
89
93
  className: "mt-8"
90
- }) : /* @__PURE__ */ x(h, {
94
+ }) : /* @__PURE__ */ E(b, {
91
95
  size: "fill",
92
96
  padding: "none",
93
97
  divided: !0,
94
98
  interactive: !1,
95
- render: /* @__PURE__ */ x("ul", {}),
99
+ render: /* @__PURE__ */ E("ul", {}),
96
100
  className: "mt-8 overflow-hidden",
97
- children: A.map((e) => /* @__PURE__ */ x("li", { children: /* @__PURE__ */ S(d, {
101
+ children: P.map((e) => /* @__PURE__ */ E("li", { children: /* @__PURE__ */ D(g, {
98
102
  to: "/$workspace/agents/$slug",
99
103
  params: {
100
- workspace: E,
104
+ workspace: s,
101
105
  slug: e.slug
102
106
  },
103
- onContextMenu: (t) => N(t, z(e)),
107
+ onContextMenu: (t) => z(t, G(e)),
104
108
  className: "flex items-center gap-3 px-3 py-2.5 hover:bg-muted",
105
109
  children: [
106
- /* @__PURE__ */ x(m, {
110
+ /* @__PURE__ */ E(y, {
107
111
  kind: "agent",
108
112
  name: e.name,
109
113
  size: "md",
110
114
  decorative: !0
111
115
  }),
112
- /* @__PURE__ */ S("span", {
116
+ /* @__PURE__ */ D("span", {
113
117
  className: "min-w-0 flex-1",
114
- children: [/* @__PURE__ */ S("span", {
115
- className: "block text-sm font-medium",
116
- children: [e.name, e.archivedAt && /* @__PURE__ */ S("span", {
117
- className: "font-normal text-muted-foreground",
118
- children: [" ", D("archived")]
119
- })]
120
- }), /* @__PURE__ */ x("span", {
121
- className: "block truncate text-xs text-muted-foreground",
122
- children: e.description || D("noDescription")
123
- })]
118
+ children: [
119
+ /* @__PURE__ */ D("span", {
120
+ className: "block text-sm font-medium",
121
+ children: [e.name, e.archivedAt && /* @__PURE__ */ D("span", {
122
+ className: "font-normal text-muted-foreground",
123
+ children: [" ", c("archived")]
124
+ })]
125
+ }),
126
+ /* @__PURE__ */ E("span", {
127
+ className: "block truncate text-xs text-muted-foreground",
128
+ children: e.description || c("noDescription")
129
+ }),
130
+ !e.archivedAt && /* @__PURE__ */ E(N, {
131
+ workspace: s,
132
+ agent: e,
133
+ runners: F,
134
+ working: I.filter((t) => t.agentId === e.id && t.state === "working")
135
+ })
136
+ ]
124
137
  }),
125
- /* @__PURE__ */ x("span", {
138
+ /* @__PURE__ */ E("span", {
126
139
  className: "text-xs text-muted-foreground",
127
- children: e.model ? D("harnessWithModel", {
128
- harness: a[e.harness] ?? e.harness,
140
+ children: e.model ? c("harnessWithModel", {
141
+ harness: l[e.harness] ?? e.harness,
129
142
  model: e.model
130
- }) : a[e.harness]
143
+ }) : l[e.harness]
131
144
  })
132
145
  ]
133
146
  }) }, e.id))
134
147
  }),
135
- R
148
+ W
136
149
  ]
137
150
  });
138
151
  }
139
- export { E as component };
152
+ function N({ workspace: e, agent: t, runners: n, working: r }) {
153
+ let i = T("agents"), a = u(t, n).filter((e) => e.online), o = [...new Map(r.filter((e) => e.runnerName).map((e) => [e.runnerName, e])).values()];
154
+ return /* @__PURE__ */ D("span", {
155
+ className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",
156
+ children: [o.length > 0 ? /* @__PURE__ */ D("span", {
157
+ className: "inline-flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5",
158
+ children: [/* @__PURE__ */ E("span", {
159
+ className: "whitespace-nowrap",
160
+ children: i("workingOn")
161
+ }), o.map((t) => /* @__PURE__ */ E(c, {
162
+ workspace: e,
163
+ name: t.runnerName ?? "",
164
+ kind: t.runnerKind,
165
+ link: !1,
166
+ className: "font-medium text-foreground"
167
+ }, t.runnerName))]
168
+ }) : /* @__PURE__ */ E("span", { children: i("idle") }), a.length > 0 ? /* @__PURE__ */ D("span", {
169
+ className: "inline-flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5",
170
+ children: [/* @__PURE__ */ E("span", {
171
+ className: "whitespace-nowrap",
172
+ children: i("canRunOn")
173
+ }), a.map((t) => /* @__PURE__ */ E(c, {
174
+ workspace: e,
175
+ name: t.runner.name,
176
+ kind: t.runner.kind,
177
+ link: !1
178
+ }, t.runner.id))]
179
+ }) : /* @__PURE__ */ D("span", {
180
+ className: "inline-flex items-center gap-1 text-warning",
181
+ children: [/* @__PURE__ */ E(s, { className: "size-3.5" }), i("noRunnerOnline")]
182
+ })]
183
+ });
184
+ }
185
+ export { M as component };
@@ -1,53 +1,67 @@
1
1
  import { api as e, unwrap as t } from "../../../api/client.js";
2
- import { runnersQuery as n } from "../../../api/queries.js";
3
- import { ComputeTargets as r } from "../../../components/ComputeTargets.js";
4
- import { InlineCommand as i } from "../../../components/InlineCommand.js";
5
- import { WorkerIcon as a } from "../../../components/icons.js";
6
- import { SettingsPage as o } from "../../../components/settings.js";
7
- import { useConfirm as s } from "../../../lib/confirm.js";
8
- import { copyItem as c } from "../../../lib/menus.js";
9
- import { useTime as l } from "../../../lib/time.js";
2
+ import { runnersQuery as n, workspaceRunsQuery as r } from "../../../api/queries.js";
3
+ import { ComputeTargets as i } from "../../../components/ComputeTargets.js";
4
+ import { InlineCommand as a } from "../../../components/InlineCommand.js";
5
+ import { WorkerIcon as o } from "../../../components/icons.js";
6
+ import { SettingsPage as s } from "../../../components/settings.js";
7
+ import { useConfirm as c } from "../../../lib/confirm.js";
8
+ import { copyItem as l } from "../../../lib/menus.js";
9
+ import { Link as ee } from "../../../lib/router.js";
10
+ import { useTime as te } from "../../../lib/time.js";
10
11
  import { Route as u } from "./runners.js";
11
- import { Callout as d, StatusDot as f, Table as p, menuDivider as m, useOpenMenu as h } from "@parallelworks/ui";
12
- import { useMemo as g } from "react";
13
- import { useFormatter as _, useTranslations as v } from "use-intl";
14
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
15
- import { useMutation as x, useQueryClient as ee, useSuspenseQuery as S } from "@tanstack/react-query";
16
- import { ListCellText as C, ListColumns as w, ListPage as T, ListRow as E, ListToolbar as D, NameCell as O, listTableProps as k, useListNavigate as A, useListSearch as j, useListView as M } from "@parallelworks/ui/list";
12
+ import { Callout as d, StatusDot as f, Table as p, menuDivider as m, useOpenMenu as ne } from "@parallelworks/ui";
13
+ import { useMemo as h } from "react";
14
+ import { useFormatter as g, useTranslations as _ } from "use-intl";
15
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
16
+ import { useMutation as re, useQuery as ie, useQueryClient as ae, useSuspenseQuery as b } from "@tanstack/react-query";
17
+ import { ListCellText as x, ListColumns as S, ListPage as C, ListRow as w, ListToolbar as T, NameCell as E, listTableProps as D, useListNavigate as O, useListSearch as k, useListView as A } from "@parallelworks/ui/list";
17
18
  // src/routes/$workspace/settings/runners.tsx?tsr-split=component
18
- var N = {
19
+ var j = {
19
20
  default: "runnerModeDefault",
20
21
  "accept-edits": "runnerModeAcceptEdits",
21
22
  auto: "runnerModeAuto",
22
23
  bypass: "runnerModeBypass"
23
24
  };
24
- function P() {
25
+ function M() {
25
26
  let { workspace: e } = u.useParams();
26
- return /* @__PURE__ */ y(F, { workspace: e });
27
+ return /* @__PURE__ */ v(N, { workspace: e });
27
28
  }
28
- function F({ workspace: u }) {
29
- let { data: P } = S(n(u)), F = v("account"), I = _(), L = v("common"), R = l(), z = ee(), B = j(), V = A(), H = h(), U = x({
29
+ function N({ workspace: u }) {
30
+ let { data: M } = b(n(u)), { data: N = [] } = ie(r(u, {
31
+ live: !0,
32
+ limit: 200
33
+ })), P = /* @__PURE__ */ new Map();
34
+ for (let e of N) e.state === "working" && e.runnerId && P.set(e.runnerId, [...P.get(e.runnerId) ?? [], e]);
35
+ let F = _("account"), I = g(), L = _("common"), R = te(), z = ae(), B = k(), V = O(), H = ne(), U = re({
30
36
  mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/runners/{runnerId}", { params: { path: {
31
37
  workspace: u,
32
38
  runnerId: n
33
39
  } } })),
34
40
  onSettled: () => z.invalidateQueries({ queryKey: n(u).queryKey })
35
- }), { confirm: W, dialog: G } = s(), K = (e) => W({
41
+ }), { confirm: W, dialog: G } = c(), K = (e) => W({
36
42
  title: F("revokeRunnerTitle"),
37
43
  description: F("revokeRunnerDescription", { name: e.name }),
38
44
  confirmLabel: F("revoke"),
39
45
  onConfirm: () => U.mutateAsync(e.id)
40
- }), q = g(() => [{
41
- key: "name",
42
- label: L("name"),
43
- headerClassName: "py-2",
44
- alwaysVisible: !0
45
- }, {
46
- key: "seen",
47
- label: F("runnerColSeen"),
48
- headerClassName: "py-2 w-40",
49
- align: "end"
50
- }], [F, L]), J = g(() => [{
46
+ }), q = h(() => [
47
+ {
48
+ key: "name",
49
+ label: L("name"),
50
+ headerClassName: "py-2",
51
+ alwaysVisible: !0
52
+ },
53
+ {
54
+ key: "working",
55
+ label: F("runnerColWorking"),
56
+ headerClassName: "py-2 w-48"
57
+ },
58
+ {
59
+ key: "seen",
60
+ label: F("runnerColSeen"),
61
+ headerClassName: "py-2 w-40",
62
+ align: "end"
63
+ }
64
+ ], [F, L]), J = h(() => [{
51
65
  value: "name",
52
66
  label: L("name"),
53
67
  compare: (e, t) => e.name.localeCompare(t.name)
@@ -55,31 +69,31 @@ function F({ workspace: u }) {
55
69
  value: "seen",
56
70
  label: F("runnerColSeen"),
57
71
  compare: (e, t) => (t.lastSeenAt ?? "").localeCompare(e.lastSeenAt ?? "")
58
- }], [F, L]), Y = M({
72
+ }], [F, L]), Y = A({
59
73
  storageKey: `tandem-runners-${u}`,
60
74
  defaultShowColumnHeaders: !1,
61
75
  columns: q,
62
76
  orderBys: J,
63
77
  defaultOrderBy: "name",
64
78
  facets: []
65
- }), X = B.filter.trim().toLowerCase(), Z = P.filter((e) => !X || [
79
+ }), X = B.filter.trim().toLowerCase(), Z = M.filter((e) => !X || [
66
80
  e.name,
67
81
  e.group ?? "",
68
82
  ...e.harnesses,
69
83
  ...e.labels
70
- ].some((e) => e.toLowerCase().includes(X))), Q = P.filter((e) => e.sharingRefused), $ = P.filter((e) => e.sharingUnchecked);
71
- return /* @__PURE__ */ b(o, {
84
+ ].some((e) => e.toLowerCase().includes(X))), Q = M.filter((e) => e.sharingRefused), $ = M.filter((e) => e.sharingUnchecked);
85
+ return /* @__PURE__ */ y(s, {
72
86
  wide: !0,
73
87
  title: F("runners"),
74
- description: F.rich("runnersDescription", { code: (e) => /* @__PURE__ */ y(i, { children: e }) }),
75
- toolbar: P.length > 0 && /* @__PURE__ */ y(D, {
88
+ description: F.rich("runnersDescription", { code: (e) => /* @__PURE__ */ v(a, { children: e }) }),
89
+ toolbar: M.length > 0 && /* @__PURE__ */ v(T, {
76
90
  view: Y,
77
91
  search: B,
78
92
  searchLabel: F("runnerSearch"),
79
93
  searchPlaceholder: F("runnerSearch")
80
94
  }),
81
95
  children: [
82
- Q.length > 0 && /* @__PURE__ */ y(d, {
96
+ Q.length > 0 && /* @__PURE__ */ v(d, {
83
97
  tone: "warning",
84
98
  className: "mb-6",
85
99
  children: F("runnerSharingRefused", {
@@ -87,7 +101,7 @@ function F({ workspace: u }) {
87
101
  names: I.list(Q.map((e) => e.name), { type: "conjunction" })
88
102
  })
89
103
  }),
90
- $.length > 0 && /* @__PURE__ */ y(d, {
104
+ $.length > 0 && /* @__PURE__ */ v(d, {
91
105
  tone: "muted",
92
106
  className: "mb-6",
93
107
  children: F("runnerSharingUnchecked", {
@@ -95,11 +109,11 @@ function F({ workspace: u }) {
95
109
  names: I.list($.map((e) => e.name), { type: "conjunction" })
96
110
  })
97
111
  }),
98
- /* @__PURE__ */ y("div", {
112
+ /* @__PURE__ */ v("div", {
99
113
  className: "border-t border-border",
100
- children: /* @__PURE__ */ y(T, {
114
+ children: /* @__PURE__ */ v(C, {
101
115
  view: Y,
102
- total: P.length,
116
+ total: M.length,
103
117
  matches: Z.length,
104
118
  count: {
105
119
  filterActive: B.filter.trim() !== "",
@@ -107,19 +121,19 @@ function F({ workspace: u }) {
107
121
  nounPlural: F("runnerNounPlural")
108
122
  },
109
123
  empty: {
110
- icon: /* @__PURE__ */ y(a, {}),
124
+ icon: /* @__PURE__ */ v(o, {}),
111
125
  title: F("noRunners")
112
126
  },
113
127
  noMatches: F("runnerNoMatches"),
114
- children: /* @__PURE__ */ b(p, {
115
- ...k,
116
- children: [/* @__PURE__ */ y(w, { view: Y }), Y.applyOrder(Z).map((e) => /* @__PURE__ */ b(E, {
128
+ children: /* @__PURE__ */ y(p, {
129
+ ...D,
130
+ children: [/* @__PURE__ */ v(S, { view: Y }), Y.applyOrder(Z).map((e) => /* @__PURE__ */ y(w, {
117
131
  href: null,
118
132
  goTo: V,
119
133
  openMenu: H,
120
134
  items: [
121
- c(F("copyRunnerId"), e.id),
122
- c(L("copyName"), e.name),
135
+ l(F("copyRunnerId"), e.id),
136
+ l(L("copyName"), e.name),
123
137
  m,
124
138
  {
125
139
  label: F("revoke"),
@@ -127,37 +141,53 @@ function F({ workspace: u }) {
127
141
  onClick: () => K(e)
128
142
  }
129
143
  ],
130
- children: [/* @__PURE__ */ y(O, {
131
- icon: /* @__PURE__ */ y(a, {}),
132
- iconTile: !0,
133
- name: e.name,
134
- subtitle: I.list([
135
- ...e.group ? [F("runnerSharedWith", { group: e.group })] : [],
136
- ...e.sharingRefused ? [F("runnerNotTakingRuns")] : [],
137
- ...e.sharingUnchecked ? [F("runnerSharingUnknown")] : [],
138
- ...e.permissionMode ? [F(N[e.permissionMode])] : [],
139
- ...e.harnesses,
140
- ...e.labels
141
- ], { type: "unit" }),
142
- href: null
143
- }), Y.isVisible("seen") && /* @__PURE__ */ b(p.Item, {
144
- className: "py-2.5",
145
- children: [/* @__PURE__ */ y(C, { children: e.lastSeenAt ? F("runnerSeen", { seen: R.relative(e.lastSeenAt) }) : F("runnerNeverConnected") }), e.isolation && /* @__PURE__ */ b("span", {
146
- className: "flex items-center justify-end gap-1.5 text-xs text-muted-foreground",
147
- title: e.isolation.failures.join("\n") || void 0,
148
- children: [/* @__PURE__ */ y(f, {
149
- variant: e.isolation.passed ? "success" : "error",
150
- size: 8
151
- }), e.isolation.passed ? F("runnerIsolated") : F("runnerNotIsolated", { count: e.isolation.failures.length })]
152
- })]
153
- })]
144
+ children: [
145
+ /* @__PURE__ */ v(E, {
146
+ icon: /* @__PURE__ */ v(o, {}),
147
+ iconTile: !0,
148
+ name: e.name,
149
+ subtitle: I.list([
150
+ ...e.group ? [F("runnerSharedWith", { group: e.group })] : [],
151
+ ...e.sharingRefused ? [F("runnerNotTakingRuns")] : [],
152
+ ...e.sharingUnchecked ? [F("runnerSharingUnknown")] : [],
153
+ ...e.permissionMode ? [F(j[e.permissionMode])] : [],
154
+ ...e.harnesses,
155
+ ...e.labels
156
+ ], { type: "unit" }),
157
+ href: null
158
+ }),
159
+ Y.isVisible("working") && /* @__PURE__ */ v(p.Item, {
160
+ className: "py-2.5",
161
+ children: /* @__PURE__ */ v(x, { children: (P.get(e.id) ?? []).length > 0 ? (P.get(e.id) ?? []).map((e, t) => /* @__PURE__ */ y("span", { children: [t > 0 && ", ", /* @__PURE__ */ v(ee, {
162
+ to: "/$workspace/issues/$identifier",
163
+ params: {
164
+ workspace: u,
165
+ identifier: e.identifier
166
+ },
167
+ className: "hover:underline",
168
+ title: e.issueTitle,
169
+ children: e.identifier
170
+ })] }, e.id)) : F("runnerIdle") })
171
+ }),
172
+ Y.isVisible("seen") && /* @__PURE__ */ y(p.Item, {
173
+ className: "py-2.5",
174
+ children: [/* @__PURE__ */ v(x, { children: e.lastSeenAt ? F("runnerSeen", { seen: R.relative(e.lastSeenAt) }) : F("runnerNeverConnected") }), e.isolation && /* @__PURE__ */ y("span", {
175
+ className: "flex items-center justify-end gap-1.5 text-xs text-muted-foreground",
176
+ title: e.isolation.failures.join("\n") || void 0,
177
+ children: [/* @__PURE__ */ v(f, {
178
+ variant: e.isolation.passed ? "success" : "error",
179
+ size: 8
180
+ }), e.isolation.passed ? F("runnerIsolated") : F("runnerNotIsolated", { count: e.isolation.failures.length })]
181
+ })]
182
+ })
183
+ ]
154
184
  }, e.id))]
155
185
  })
156
186
  })
157
187
  }),
158
- /* @__PURE__ */ y(r, { workspace: u }),
188
+ /* @__PURE__ */ v(i, { workspace: u }),
159
189
  G
160
190
  ]
161
191
  });
162
192
  }
163
- export { P as component };
193
+ export { M as component };