@parallelworks/tandem-web 0.139.0 → 0.139.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/pages/triage.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
- import { Link as n, useNavigate as r } from "../lib/router.js";
3
- import { issueQuery as i, teamsQuery as a } from "../api/queries.js";
4
- import { triageQuery as o } from "../lib/triage.js";
5
- import { PriorityIcon as s, StatusIcon as c, TriageIcon as l, usePriorityNames as u } from "../components/icons.js";
6
- import { useTime as d } from "../lib/time.js";
7
- import { usePeople as f } from "../lib/people.js";
8
- import { usePageTitle as p } from "../lib/pageTitle.js";
2
+ import { usePageTitle as n } from "../lib/pageTitle.js";
3
+ import { Link as r, useNavigate as i } from "../lib/router.js";
4
+ import { issueQuery as a, teamsQuery as o } from "../api/queries.js";
5
+ import { triageQuery as s } from "../lib/triage.js";
6
+ import { PriorityIcon as c, StatusIcon as l, TriageIcon as u, usePriorityNames as d } from "../components/icons.js";
7
+ import { useTime as f } from "../lib/time.js";
8
+ import { usePeople as p } from "../lib/people.js";
9
9
  import { useCanTriage as m } from "../lib/roles.js";
10
10
  import { EntityIcon as h } from "../components/EntityIcon.js";
11
11
  import { actorAvatar as g } from "../lib/avatar.js";
@@ -20,11 +20,11 @@ import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
20
20
  import { useMutation as F, useQuery as I, useQueryClient as L, useSuspenseQuery as R } from "@tanstack/react-query";
21
21
  // src/pages/triage.tsx
22
22
  function z() {
23
- let n = j("triage"), { workspace: i, key: a } = w({ strict: !1 }), { issue: s } = T({ strict: !1 }), { data: c } = R(o(i, a));
24
- p(n("title"));
25
- let u = c.issues, d = A(), f = L(), [m, h] = k(/* @__PURE__ */ new Set()), [g, _] = k(/* @__PURE__ */ new Set()), y = E((e, t) => {
23
+ let r = j("triage"), { workspace: a, key: o } = w({ strict: !1 }), { issue: c } = T({ strict: !1 }), { data: l } = R(s(a, o));
24
+ n(r("title"));
25
+ let d = l.issues, f = A(), p = L(), [m, h] = k(/* @__PURE__ */ new Set()), [g, _] = k(/* @__PURE__ */ new Set()), y = E((e, t) => {
26
26
  h((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : V(n, e));
27
- }, []), S = u.filter((e) => m.has(e.id)), M = S.filter((e) => g.has(e.id)), I = r(), z = u.findIndex((e) => e.identifier === s?.toUpperCase()), W = O(null), G = u[z], K = (e) => I({
27
+ }, []), S = d.filter((e) => m.has(e.id)), M = S.filter((e) => g.has(e.id)), I = i(), z = d.findIndex((e) => e.identifier === c?.toUpperCase()), W = O(null), G = d[z], K = (e) => I({
28
28
  to: ".",
29
29
  search: e ? { issue: e.identifier.toLowerCase() } : {},
30
30
  replace: !0
@@ -32,17 +32,17 @@ function z() {
32
32
  m.has(e.id) && _((t) => t.has(e.id) ? V(t, e.id) : new Set(t).add(e.id));
33
33
  }, J = (e, t) => {
34
34
  let [n, r] = e < t ? [e, t] : [t, e];
35
- _(new Set(u.slice(n, r + 1).filter((e) => m.has(e.id)).map((e) => e.id)));
35
+ _(new Set(d.slice(n, r + 1).filter((e) => m.has(e.id)).map((e) => e.id)));
36
36
  }, Y = (e, t) => {
37
- let n = u[t];
37
+ let n = d[t];
38
38
  n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), q(n), W.current = t) : e.shiftKey && (e.preventDefault(), J(W.current ?? (z >= 0 ? z : t), t)));
39
39
  }, X = (e, t) => {
40
- if (u.length === 0) return;
41
- let n = z < 0 ? 0 : Math.min(Math.max(z + e, 0), u.length - 1);
42
- t && ((W.current === null || g.size === 0) && (W.current = Math.max(z, 0)), J(W.current, n)), K(u[n]);
40
+ if (d.length === 0) return;
41
+ let n = z < 0 ? 0 : Math.min(Math.max(z + e, 0), d.length - 1);
42
+ t && ((W.current === null || g.size === 0) && (W.current = Math.max(z, 0)), J(W.current, n)), K(d[n]);
43
43
  }, Z = (e) => {
44
- let t = u.findIndex((t) => t.id === e.id);
45
- e.id === G?.id && K(u[t + 1] ?? u[t - 1]);
44
+ let t = d.findIndex((t) => t.id === e.id);
45
+ e.id === G?.id && K(d[t + 1] ?? d[t - 1]);
46
46
  };
47
47
  v({
48
48
  j: () => X(1, !1),
@@ -57,7 +57,7 @@ function z() {
57
57
  Enter: () => G && I({
58
58
  to: "/$workspace/issues/$identifier",
59
59
  params: {
60
- workspace: i,
60
+ workspace: a,
61
61
  identifier: G.identifier
62
62
  }
63
63
  }),
@@ -69,7 +69,7 @@ function z() {
69
69
  let Q = F({
70
70
  mutationFn: async (n) => (await Promise.allSettled(M.map(async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
71
71
  params: { path: {
72
- workspace: i,
72
+ workspace: a,
73
73
  identifier: r.identifier
74
74
  } },
75
75
  body: { decision: n }
@@ -77,18 +77,18 @@ function z() {
77
77
  onSuccess: (e) => {
78
78
  if (G && g.has(G.id)) {
79
79
  let e = (e) => !g.has(e.id);
80
- K(u.slice(z + 1).find(e) ?? u.slice(0, z).findLast(e));
80
+ K(d.slice(z + 1).find(e) ?? d.slice(0, z).findLast(e));
81
81
  }
82
82
  _(/* @__PURE__ */ new Set());
83
83
  let t = e[0];
84
- t && C.error(n("bulkFailed", {
84
+ t && C.error(r("bulkFailed", {
85
85
  count: e.length,
86
- reason: d(t.reason)
86
+ reason: f(t.reason)
87
87
  }));
88
88
  },
89
- onSettled: () => f.invalidateQueries({ queryKey: [
89
+ onSettled: () => p.invalidateQueries({ queryKey: [
90
90
  "workspace",
91
- i,
91
+ a,
92
92
  "issues"
93
93
  ] })
94
94
  });
@@ -99,66 +99,66 @@ function z() {
99
99
  children: [
100
100
  /* @__PURE__ */ N("h1", {
101
101
  className: "text-sm font-semibold",
102
- children: n("title")
102
+ children: r("title")
103
103
  }),
104
104
  /* @__PURE__ */ N("span", {
105
105
  className: "text-xs text-muted-foreground tabular-nums",
106
- children: u.length
106
+ children: d.length
107
107
  }),
108
108
  M.length > 0 && /* @__PURE__ */ P("div", {
109
109
  className: "ml-auto flex items-center gap-2",
110
110
  children: [
111
111
  /* @__PURE__ */ N("span", {
112
112
  className: "text-xs font-medium text-human",
113
- children: n("selected", { count: M.length })
113
+ children: r("selected", { count: M.length })
114
114
  }),
115
115
  M.length < S.length && /* @__PURE__ */ N("button", {
116
116
  type: "button",
117
117
  onClick: () => _(new Set(S.map((e) => e.id))),
118
118
  className: "text-xs hover:underline",
119
- children: n("selectAll")
119
+ children: r("selectAll")
120
120
  }),
121
121
  /* @__PURE__ */ N("button", {
122
122
  type: "button",
123
123
  onClick: () => _(/* @__PURE__ */ new Set()),
124
124
  className: "text-xs hover:underline",
125
- children: n("clear")
125
+ children: r("clear")
126
126
  }),
127
127
  /* @__PURE__ */ N(b, {
128
128
  variant: "outline",
129
129
  size: "sm",
130
- title: n("declineHelp"),
130
+ title: r("declineHelp"),
131
131
  loading: Q.isPending && Q.variables === "decline",
132
132
  disabled: Q.isPending,
133
133
  onClick: () => Q.mutate("decline"),
134
- children: n("declineCount", { count: M.length })
134
+ children: r("declineCount", { count: M.length })
135
135
  }),
136
136
  /* @__PURE__ */ N(b, {
137
137
  variant: "primary",
138
138
  size: "sm",
139
- title: n("acceptHelp"),
139
+ title: r("acceptHelp"),
140
140
  loading: Q.isPending && Q.variables === "accept",
141
141
  disabled: Q.isPending,
142
142
  onClick: () => Q.mutate("accept"),
143
- children: n("acceptCount", { count: M.length })
143
+ children: r("acceptCount", { count: M.length })
144
144
  })
145
145
  ]
146
146
  })
147
147
  ]
148
- }), u.length === 0 ? /* @__PURE__ */ N("div", {
148
+ }), d.length === 0 ? /* @__PURE__ */ N("div", {
149
149
  className: "min-h-0 flex-1 overflow-y-auto p-6",
150
150
  children: /* @__PURE__ */ N(x, {
151
- icon: /* @__PURE__ */ N(l, {}),
152
- title: n("empty"),
153
- description: n("emptyDescription")
151
+ icon: /* @__PURE__ */ N(u, {}),
152
+ title: r("empty"),
153
+ description: r("emptyDescription")
154
154
  })
155
155
  }) : /* @__PURE__ */ P("div", {
156
156
  className: "flex min-h-0 flex-1",
157
157
  children: [/* @__PURE__ */ N("ul", {
158
- "aria-label": n("title"),
158
+ "aria-label": r("title"),
159
159
  className: B("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", G ? "hidden" : "flex"),
160
- children: u.map((e, t) => /* @__PURE__ */ N(H, {
161
- workspace: i,
160
+ children: d.map((e, t) => /* @__PURE__ */ N(H, {
161
+ workspace: a,
162
162
  issue: e,
163
163
  onEligible: y,
164
164
  picked: g.has(e.id) && m.has(e.id),
@@ -168,15 +168,15 @@ function z() {
168
168
  }), /* @__PURE__ */ N("div", {
169
169
  className: B("min-w-0 flex-1 overflow-y-auto md:block", G ? "block" : "hidden"),
170
170
  children: G ? /* @__PURE__ */ N(U, {
171
- workspace: i,
171
+ workspace: a,
172
172
  issue: G,
173
173
  onBack: () => K(void 0),
174
174
  onDecided: Z
175
175
  }, G.id) : /* @__PURE__ */ N("div", {
176
176
  className: "px-6 py-24",
177
177
  children: /* @__PURE__ */ N(x, {
178
- title: n("noneSelected"),
179
- description: n("shortcuts")
178
+ title: r("noneSelected"),
179
+ description: r("shortcuts")
180
180
  })
181
181
  })
182
182
  })]
@@ -188,18 +188,18 @@ function V(e, t) {
188
188
  let n = new Set(e);
189
189
  return n.delete(t), n;
190
190
  }
191
- function H({ workspace: e, issue: t, onEligible: r, picked: i, current: a, onClick: o }) {
192
- let s = j("triage"), c = d(), { actorName: l, avatarOf: u } = f(e), p = m(e, t.teamId);
193
- D(() => r(t.id, p), [
194
- r,
191
+ function H({ workspace: e, issue: t, onEligible: n, picked: i, current: a, onClick: o }) {
192
+ let s = j("triage"), c = f(), { actorName: l, avatarOf: u } = p(e), d = m(e, t.teamId);
193
+ D(() => n(t.id, d), [
194
+ n,
195
195
  t.id,
196
- p
196
+ d
197
197
  ]);
198
198
  let h = t.creator;
199
199
  return /* @__PURE__ */ N("li", {
200
200
  id: `triage-${t.id}`,
201
201
  "data-picked": i || void 0,
202
- children: /* @__PURE__ */ P(n, {
202
+ children: /* @__PURE__ */ P(r, {
203
203
  to: ".",
204
204
  search: { issue: t.identifier.toLowerCase() },
205
205
  replace: !0,
@@ -242,19 +242,19 @@ function H({ workspace: e, issue: t, onEligible: r, picked: i, current: a, onCli
242
242
  })
243
243
  });
244
244
  }
245
- function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
246
- let v = j("triage"), x = d(), C = A(), w = L(), T = u(), { data: E } = R(a(r)), { data: D } = I(i(r, o.identifier)), O = D ?? o, { actorName: k, avatarOf: z } = f(r), B = E.find((e) => e.id === O.teamId), V = m(r, O.teamId), H = F({
247
- mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
245
+ function U({ workspace: n, issue: i, onBack: s, onDecided: u }) {
246
+ let v = j("triage"), x = f(), C = A(), w = L(), T = d(), { data: E } = R(o(n)), { data: D } = I(a(n, i.identifier)), O = D ?? i, { actorName: k, avatarOf: z } = p(n), B = E.find((e) => e.id === O.teamId), V = m(n, O.teamId), H = F({
247
+ mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
248
248
  params: { path: {
249
- workspace: r,
249
+ workspace: n,
250
250
  identifier: O.identifier
251
251
  } },
252
- body: { decision: n }
252
+ body: { decision: r }
253
253
  })),
254
254
  onSuccess: () => {
255
- p(o), w.invalidateQueries({ queryKey: [
255
+ u(i), w.invalidateQueries({ queryKey: [
256
256
  "workspace",
257
- r,
257
+ n,
258
258
  "issues"
259
259
  ] });
260
260
  }
@@ -264,7 +264,7 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
264
264
  children: [
265
265
  /* @__PURE__ */ N("button", {
266
266
  type: "button",
267
- onClick: l,
267
+ onClick: s,
268
268
  className: "mb-3 text-xs text-muted-foreground hover:text-foreground md:hidden",
269
269
  children: v("back")
270
270
  }),
@@ -307,10 +307,10 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
307
307
  }),
308
308
  /* @__PURE__ */ N("h2", {
309
309
  className: "mt-1 text-xl font-semibold text-balance",
310
- children: /* @__PURE__ */ N(n, {
310
+ children: /* @__PURE__ */ N(r, {
311
311
  to: "/$workspace/issues/$identifier",
312
312
  params: {
313
- workspace: r,
313
+ workspace: n,
314
314
  identifier: O.identifier
315
315
  },
316
316
  className: "hover:underline",
@@ -335,10 +335,10 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
335
335
  disabled: H.isPending,
336
336
  onClick: () => H.mutate("decline"),
337
337
  children: v("decline")
338
- })] }), /* @__PURE__ */ N(n, {
338
+ })] }), /* @__PURE__ */ N(r, {
339
339
  to: "/$workspace/issues/$identifier",
340
340
  params: {
341
- workspace: r,
341
+ workspace: n,
342
342
  identifier: O.identifier
343
343
  },
344
344
  className: S({
@@ -361,11 +361,11 @@ function U({ workspace: r, issue: o, onBack: l, onDecided: p }) {
361
361
  children: [
362
362
  /* @__PURE__ */ P("span", {
363
363
  className: "inline-flex items-center gap-1.5",
364
- children: [/* @__PURE__ */ N(c, { category: O.status.category }), O.status.name]
364
+ children: [/* @__PURE__ */ N(l, { category: O.status.category }), O.status.name]
365
365
  }),
366
366
  /* @__PURE__ */ P("span", {
367
367
  className: "inline-flex items-center gap-1.5",
368
- children: [/* @__PURE__ */ N(s, { priority: O.priority }), T[O.priority]]
368
+ children: [/* @__PURE__ */ N(c, { priority: O.priority }), T[O.priority]]
369
369
  }),
370
370
  O.labels.map((e) => /* @__PURE__ */ P("span", {
371
371
  className: "inline-flex items-center gap-1.5",
@@ -1,8 +1,8 @@
1
1
  import { api as e, unwrap as t } from "../../../api/client.js";
2
- import { useNavigate as n } from "../../../lib/router.js";
3
- import { agentQuery as r, agentsQuery as i, meQuery as a, myModelsQuery as ee } from "../../../api/queries.js";
4
- import { Route as o } from "./_slug.js";
5
- import { usePageTitle as s } from "../../../lib/pageTitle.js";
2
+ import { usePageTitle as n } from "../../../lib/pageTitle.js";
3
+ import { useNavigate as r } from "../../../lib/router.js";
4
+ import { agentQuery as i, agentsQuery as a, meQuery as o, myModelsQuery as ee } from "../../../api/queries.js";
5
+ import { Route as s } from "./_slug.js";
6
6
  import { may as c } from "../../../lib/roles.js";
7
7
  import { Editor as te } from "../../../components/Editor.js";
8
8
  import { harnessOptions as l, runnableHarnesses as u } from "../../../lib/agents.js";
@@ -16,26 +16,26 @@ import { useMutation as b, useQuery as x, useQueryClient as se, useSuspenseQuery
16
16
  // src/routes/$workspace/agents/$slug.tsx?tsr-split=component
17
17
  var C = "block text-sm font-medium";
18
18
  function w() {
19
- let { workspace: e, slug: t } = o.useParams(), { data: n } = S(i(e)), r = n.find((e) => e.slug === t), a = _("agent");
20
- return s(r ? r.name : a("newAgent")), t !== "new" && !r ? /* @__PURE__ */ v("p", {
19
+ let { workspace: e, slug: t } = s.useParams(), { data: r } = S(a(e)), i = r.find((e) => e.slug === t), o = _("agent");
20
+ return n(i ? i.name : o("newAgent")), t !== "new" && !i ? /* @__PURE__ */ v("p", {
21
21
  className: "p-8 text-sm text-muted-foreground",
22
- children: a("notFound")
22
+ children: o("notFound")
23
23
  }) : /* @__PURE__ */ v(E, {
24
24
  workspace: e,
25
- agent: r
26
- }, r?.id ?? "new");
25
+ agent: i
26
+ }, i?.id ?? "new");
27
27
  }
28
28
  function T(e) {
29
29
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 63);
30
30
  }
31
- function E({ workspace: o, agent: s }) {
32
- let w = _("agent"), E = _("workspace"), D = oe(), O = _("common"), { data: ce } = S(a), k = c(ce, o, "manage_agents"), A = se(), j = n(), [M, le] = g(s?.name ?? ""), [N, P] = g(s?.description ?? ""), [F, I] = g(s?.instructions ?? ""), [L, R] = g(s?.harness ?? "pw-code"), [z, B] = g(s?.model ?? ""), V = d(), H = x({
33
- ...r(o, s?.slug ?? ""),
31
+ function E({ workspace: n, agent: s }) {
32
+ let w = _("agent"), E = _("workspace"), D = oe(), O = _("common"), { data: ce } = S(o), k = c(ce, n, "manage_agents"), A = se(), j = r(), [M, le] = g(s?.name ?? ""), [N, P] = g(s?.description ?? ""), [F, I] = g(s?.instructions ?? ""), [L, R] = g(s?.harness ?? "pw-code"), [z, B] = g(s?.model ?? ""), V = d(), H = x({
33
+ ...i(n, s?.slug ?? ""),
34
34
  enabled: !!s
35
35
  }).data?.modeAllowed, U = x({
36
36
  ...ee,
37
37
  enabled: L === "pw-code"
38
- }).data ?? [], { data: ue } = S(i(o)), W = [...new Set(ue.filter((e) => e.harness === L && e.model && e.id !== s?.id).map((e) => e.model))].filter((e) => !U.some((t) => t.id === e)), de = [...U.map((e) => ({
38
+ }).data ?? [], { data: ue } = S(a(n)), W = [...new Set(ue.filter((e) => e.harness === L && e.model && e.id !== s?.id).map((e) => e.model))].filter((e) => !U.some((t) => t.id === e)), de = [...U.map((e) => ({
39
39
  value: e.id,
40
40
  label: e.name || e.id,
41
41
  ...e.name && e.name !== e.id && { description: e.id }
@@ -57,12 +57,12 @@ function E({ workspace: o, agent: s }) {
57
57
  }), $ = b({
58
58
  mutationFn: async () => t(s ? await e.PUT("/api/v1/workspaces/{workspace}/agents/{slug}", {
59
59
  params: { path: {
60
- workspace: o,
60
+ workspace: n,
61
61
  slug: s.slug
62
62
  } },
63
63
  body: Q()
64
64
  }) : await e.POST("/api/v1/workspaces/{workspace}/agents", {
65
- params: { path: { workspace: o } },
65
+ params: { path: { workspace: n } },
66
66
  body: {
67
67
  slug: T(M),
68
68
  ...Q()
@@ -70,10 +70,10 @@ function E({ workspace: o, agent: s }) {
70
70
  })),
71
71
  onMutate: () => Z(null),
72
72
  onSuccess: (e) => {
73
- A.invalidateQueries({ queryKey: i(o).queryKey }), ae.success(w(s ? "saved" : "created", { name: e.name })), j({
73
+ A.invalidateQueries({ queryKey: a(n).queryKey }), ae.success(w(s ? "saved" : "created", { name: e.name })), j({
74
74
  to: "/$workspace/agents/$slug",
75
75
  params: {
76
- workspace: o,
76
+ workspace: n,
77
77
  slug: e.slug
78
78
  }
79
79
  });
@@ -81,13 +81,13 @@ function E({ workspace: o, agent: s }) {
81
81
  onError: (e) => Z(D(e))
82
82
  }), ye = b({
83
83
  mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/agents/{slug}", { params: { path: {
84
- workspace: o,
84
+ workspace: n,
85
85
  slug: s?.slug ?? ""
86
86
  } } })),
87
87
  onSuccess: () => {
88
- A.invalidateQueries({ queryKey: i(o).queryKey }), j({
88
+ A.invalidateQueries({ queryKey: a(n).queryKey }), j({
89
89
  to: "/$workspace/agents",
90
- params: { workspace: o }
90
+ params: { workspace: n }
91
91
  });
92
92
  }
93
93
  });
@@ -97,7 +97,7 @@ function E({ workspace: o, agent: s }) {
97
97
  heading: !1,
98
98
  breadcrumbs: [{
99
99
  label: E("agents"),
100
- href: `/${o}/agents`
100
+ href: `/${n}/agents`
101
101
  }, { label: s ? s.name : w("newAgent") }]
102
102
  }), /* @__PURE__ */ v("div", {
103
103
  className: "min-h-0 flex-1 overflow-y-auto",
@@ -1,10 +1,10 @@
1
1
  import { api as e, unwrap as t } from "../../../api/client.js";
2
- import { Link as n, useNavigate as r } from "../../../lib/router.js";
3
- import { agentsQuery as i, meQuery as a } from "../../../api/queries.js";
4
- import { Route as o } from "./index.js";
5
- import { AgentIcon as s } from "../../../components/icons.js";
6
- import { copyItem as c, useLinkItems as l } from "../../../lib/menus.js";
7
- import { usePageTitle as u } from "../../../lib/pageTitle.js";
2
+ import { usePageTitle as n } from "../../../lib/pageTitle.js";
3
+ import { Link as r, useNavigate as i } from "../../../lib/router.js";
4
+ import { agentsQuery as a, meQuery as o } from "../../../api/queries.js";
5
+ import { Route as s } from "./index.js";
6
+ import { AgentIcon as c } from "../../../components/icons.js";
7
+ import { copyItem as l, useLinkItems as u } from "../../../lib/menus.js";
8
8
  import { may as d } from "../../../lib/roles.js";
9
9
  import { useConfirm as f } from "../../../lib/confirm.js";
10
10
  import { harnessNames as p } from "../../../lib/agents.js";
@@ -14,14 +14,14 @@ import { jsx as x, jsxs as S } from "react/jsx-runtime";
14
14
  import { useMutation as C, useQueryClient as w, useSuspenseQuery as T } from "@tanstack/react-query";
15
15
  // src/routes/$workspace/agents/index.tsx?tsr-split=component
16
16
  function E() {
17
- let { workspace: E } = o.useParams(), D = b("agents"), O = b("common"), k = l(), { data: A } = T(i(E));
18
- u(D("title"));
19
- let { data: j } = T(a), M = d(j, E, "manage_agents"), N = y(), P = r(), F = w(), I = C({
17
+ let { workspace: E } = s.useParams(), D = b("agents"), O = b("common"), k = u(), { data: A } = T(a(E));
18
+ n(D("title"));
19
+ let { data: j } = T(o), M = d(j, E, "manage_agents"), N = y(), P = i(), F = w(), I = C({
20
20
  mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/agents/{slug}", { params: { path: {
21
21
  workspace: E,
22
22
  slug: n
23
23
  } } })),
24
- onSettled: () => F.invalidateQueries({ queryKey: i(E).queryKey })
24
+ onSettled: () => F.invalidateQueries({ queryKey: a(E).queryKey })
25
25
  }), { confirm: L, dialog: R } = f(), z = (e) => [
26
26
  {
27
27
  label: O("open"),
@@ -34,7 +34,7 @@ function E() {
34
34
  })
35
35
  },
36
36
  ...k(`/${E}/agents/${e.slug}`),
37
- c(D("copySlug"), e.slug),
37
+ l(D("copySlug"), e.slug),
38
38
  ...M && !e.archivedAt ? [v, {
39
39
  label: D("archive"),
40
40
  destructive: !0,
@@ -56,13 +56,13 @@ function E() {
56
56
  className: "text-xl font-semibold tracking-tight",
57
57
  children: D("title")
58
58
  }) }),
59
- A.length > 0 && /* @__PURE__ */ x(n, {
59
+ A.length > 0 && /* @__PURE__ */ x(r, {
60
60
  to: "/$workspace/measures",
61
61
  params: { workspace: E },
62
62
  className: `${_()} ml-auto mr-2`,
63
63
  children: D("measures")
64
64
  }),
65
- M && A.length > 0 && /* @__PURE__ */ x(n, {
65
+ M && A.length > 0 && /* @__PURE__ */ x(r, {
66
66
  to: "/$workspace/agents/$slug",
67
67
  params: {
68
68
  workspace: E,
@@ -74,10 +74,10 @@ function E() {
74
74
  ]
75
75
  }),
76
76
  A.length === 0 ? /* @__PURE__ */ x(g, {
77
- icon: /* @__PURE__ */ x(s, {}),
77
+ icon: /* @__PURE__ */ x(c, {}),
78
78
  title: D("empty"),
79
79
  description: D("emptyDescription"),
80
- ...M && { action: /* @__PURE__ */ x(n, {
80
+ ...M && { action: /* @__PURE__ */ x(r, {
81
81
  to: "/$workspace/agents/$slug",
82
82
  params: {
83
83
  workspace: E,
@@ -94,7 +94,7 @@ function E() {
94
94
  interactive: !1,
95
95
  render: /* @__PURE__ */ x("ul", {}),
96
96
  className: "mt-8 overflow-hidden",
97
- children: A.map((e) => /* @__PURE__ */ x("li", { children: /* @__PURE__ */ S(n, {
97
+ children: A.map((e) => /* @__PURE__ */ x("li", { children: /* @__PURE__ */ S(r, {
98
98
  to: "/$workspace/agents/$slug",
99
99
  params: {
100
100
  workspace: E,