@parallelworks/tandem-web 0.187.0 → 0.188.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/_virtual/_virtual_i18n/en/common.js +8 -1
- package/_virtual/_virtual_i18n/es/common.js +8 -1
- package/_virtual/_virtual_i18n/ja/common.js +8 -1
- package/_virtual/_virtual_i18n/ko/common.js +8 -1
- package/_virtual/_virtual_i18n/zh/common.js +8 -1
- package/components/FavoritesNav.js +123 -81
- package/package.json +1 -1
- package/pages/area.js +75 -69
- package/routes/_workspace/agents/_slug2.js +132 -126
- package/routes/_workspace/dashboards/_dashboardId2.js +111 -103
- package/routes/_workspace/knowledge/_term2.js +128 -123
- package/routes/_workspace/people/_username2.js +67 -58
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +86 -81
- package/routes/_workspace/settings/runners2.js +96 -96
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { agentQuery as n, agentsQuery as r, meQuery as i, myModelsQuery as a, runnersQuery as o, workspaceRunsQuery as s } from "../../../api/queries.js";
|
|
3
3
|
import { Editor as c } from "../../../components/Editor.js";
|
|
4
|
+
import { FavoriteStar as ee } from "../../../components/FavoriteStar.js";
|
|
4
5
|
import { AlertIcon as l } from "../../../components/icons.js";
|
|
5
6
|
import { RunnerBadge as u } from "../../../components/RunnerBadge.js";
|
|
6
7
|
import { NotFound as d } from "../../../components/status.js";
|
|
7
|
-
import { harnessOptions as
|
|
8
|
-
import { usePageTitle as
|
|
8
|
+
import { harnessOptions as f, runnableHarnesses as p, runnersFor as m } from "../../../lib/agents.js";
|
|
9
|
+
import { usePageTitle as h } from "../../../lib/pageTitle.js";
|
|
9
10
|
import { modeBelow as te, runnerModeCommand as ne, usePermissionModeName as re } from "../../../lib/permissionModes.js";
|
|
10
|
-
import { may as
|
|
11
|
-
import { Link as g, useNavigate as
|
|
11
|
+
import { may as ie } from "../../../lib/roles.js";
|
|
12
|
+
import { Link as g, useNavigate as ae } from "../../../lib/router.js";
|
|
12
13
|
import { Route as _ } from "./_slug.js";
|
|
13
|
-
import { Autocomplete as
|
|
14
|
-
import { useState as
|
|
15
|
-
import { useErrorMessage as
|
|
16
|
-
import { useTranslations as
|
|
17
|
-
import { jsx as
|
|
18
|
-
import { useMutation as
|
|
14
|
+
import { Autocomplete as oe, Button as se, ErrorText as ce, Input as v, NumberInput as y, PageHeader as le, RelativeTime as b, Select as x, toast as S } from "@parallelworks/ui";
|
|
15
|
+
import { useState as C } from "react";
|
|
16
|
+
import { useErrorMessage as ue } from "@parallelworks/problem/react";
|
|
17
|
+
import { useTranslations as w } from "use-intl";
|
|
18
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
19
|
+
import { useMutation as D, useQuery as O, useQueryClient as de, useSuspenseQuery as k } from "@tanstack/react-query";
|
|
19
20
|
// src/routes/$workspace/agents/$slug.tsx?tsr-split=component
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
let { workspace: e, slug: t } = _.useParams(), { data: n } =
|
|
23
|
-
return
|
|
21
|
+
var A = "block text-sm font-medium";
|
|
22
|
+
function j() {
|
|
23
|
+
let { workspace: e, slug: t } = _.useParams(), { data: n } = k(r(e)), i = n.find((e) => e.slug === t), a = w("agent");
|
|
24
|
+
return h(i ? i.name : a("newAgent")), t !== "new" && !i ? /* @__PURE__ */ T(d, { title: a("notFound") }) : /* @__PURE__ */ T(M, {
|
|
24
25
|
workspace: e,
|
|
25
26
|
agent: i
|
|
26
27
|
}, i?.id ?? "new");
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function fe(e) {
|
|
29
30
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 63);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
let u =
|
|
32
|
+
function M({ workspace: s, agent: l }) {
|
|
33
|
+
let u = w("agent"), d = w("workspace"), m = ue(), h = w("common"), { data: g } = k(i), _ = ie(g, s, "manage_agents"), b = de(), j = ae(), [M, me] = C(l?.name ?? ""), [N, P] = C(l?.description ?? ""), [F, I] = C(l?.instructions ?? ""), [L, R] = C(l?.harness ?? "pw-code"), [z, he] = C(l?.model ?? ""), B = re(), ge = O({
|
|
33
34
|
...n(s, l?.slug ?? ""),
|
|
34
35
|
enabled: !!l
|
|
35
|
-
}).data?.modeAllowed, V =
|
|
36
|
+
}).data?.modeAllowed, V = O({
|
|
36
37
|
...a,
|
|
37
38
|
enabled: L === "pw-code"
|
|
38
|
-
}).data ?? [], { data:
|
|
39
|
+
}).data ?? [], { data: _e = [] } = O(o(s)), { data: ve } = k(r(s)), H = [...new Set(ve.filter((e) => e.harness === L && e.model && e.id !== l?.id).map((e) => e.model))].filter((e) => !V.some((t) => t.id === e)), ye = [...V.map((e) => ({
|
|
39
40
|
value: e.id,
|
|
40
41
|
label: e.name || e.id,
|
|
41
42
|
...e.name && e.name !== e.id && { description: e.id }
|
|
42
43
|
})), ...H.length > 0 ? [{
|
|
43
44
|
label: u("modelsInWorkspace"),
|
|
44
45
|
items: H
|
|
45
|
-
}] : []], [U,
|
|
46
|
-
name:
|
|
47
|
-
description:
|
|
46
|
+
}] : []], [U, be] = C(l?.runnerLabels.join(", ") ?? ""), [W, xe] = C(l?.maxRole ?? "member"), [G, Se] = C(l?.permissionMode ?? "accept-edits"), [K, Ce] = C(l?.maxTurns ?? 200), [q, we] = C(l?.maxMinutes ?? 120), [J, Y] = C((l?.maxCostMicros ?? 2e7) / 1e6), [Te, X] = C(null), Z = () => ({
|
|
47
|
+
name: M,
|
|
48
|
+
description: N,
|
|
48
49
|
instructions: F,
|
|
49
50
|
harness: L,
|
|
50
51
|
model: z,
|
|
@@ -53,8 +54,8 @@ function N({ workspace: s, agent: l }) {
|
|
|
53
54
|
permissionMode: G,
|
|
54
55
|
maxTurns: K ?? 0,
|
|
55
56
|
maxMinutes: q ?? 0,
|
|
56
|
-
maxCostMicros: Math.round((
|
|
57
|
-
}), Q =
|
|
57
|
+
maxCostMicros: Math.round((J ?? 0) * 1e6)
|
|
58
|
+
}), Q = D({
|
|
58
59
|
mutationFn: async () => t(l ? await e.PUT("/api/v1/workspaces/{workspace}/agents/{slug}", {
|
|
59
60
|
params: { path: {
|
|
60
61
|
workspace: s,
|
|
@@ -64,13 +65,13 @@ function N({ workspace: s, agent: l }) {
|
|
|
64
65
|
}) : await e.POST("/api/v1/workspaces/{workspace}/agents", {
|
|
65
66
|
params: { path: { workspace: s } },
|
|
66
67
|
body: {
|
|
67
|
-
slug:
|
|
68
|
+
slug: fe(M),
|
|
68
69
|
...Z()
|
|
69
70
|
}
|
|
70
71
|
})),
|
|
71
72
|
onMutate: () => X(null),
|
|
72
73
|
onSuccess: (e) => {
|
|
73
|
-
|
|
74
|
+
b.invalidateQueries({ queryKey: r(s).queryKey }), S.success(u(l ? "saved" : "created", { name: e.name })), j({
|
|
74
75
|
to: "/$workspace/agents/$slug",
|
|
75
76
|
params: {
|
|
76
77
|
workspace: s,
|
|
@@ -78,92 +79,97 @@ function N({ workspace: s, agent: l }) {
|
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
},
|
|
81
|
-
onError: (e) => X(
|
|
82
|
-
}),
|
|
82
|
+
onError: (e) => X(m(e))
|
|
83
|
+
}), Ee = D({
|
|
83
84
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/agents/{slug}", { params: { path: {
|
|
84
85
|
workspace: s,
|
|
85
86
|
slug: l?.slug ?? ""
|
|
86
87
|
} } })),
|
|
87
88
|
onSuccess: () => {
|
|
88
|
-
|
|
89
|
+
b.invalidateQueries({ queryKey: r(s).queryKey }), j({
|
|
89
90
|
to: "/$workspace/agents",
|
|
90
91
|
params: { workspace: s }
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
|
-
}), $ =
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
}), $ = _e.filter((e) => e.harnesses.includes(L) && e.permissionMode && te(e.permissionMode, G));
|
|
95
|
+
return /* @__PURE__ */ E("div", {
|
|
95
96
|
className: "flex h-full min-h-0 flex-col",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ T(le, {
|
|
97
98
|
heading: !1,
|
|
98
99
|
breadcrumbs: [{
|
|
99
100
|
label: d("agents"),
|
|
100
101
|
href: `/${s}/agents`
|
|
101
|
-
}, { label: l ? l.name : u("newAgent") }]
|
|
102
|
-
|
|
102
|
+
}, { label: l ? l.name : u("newAgent") }],
|
|
103
|
+
...l && { titleActions: /* @__PURE__ */ T(ee, {
|
|
104
|
+
workspace: s,
|
|
105
|
+
kind: "agent",
|
|
106
|
+
target: l.id
|
|
107
|
+
}) }
|
|
108
|
+
}), /* @__PURE__ */ E("div", {
|
|
103
109
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ E("form", {
|
|
105
111
|
className: "w-full space-y-6 px-4 py-6 md:px-8 md:py-8",
|
|
106
112
|
onSubmit: (e) => {
|
|
107
113
|
e.preventDefault(), Q.mutate();
|
|
108
114
|
},
|
|
109
115
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h1", {
|
|
111
117
|
className: "text-xl font-semibold tracking-tight",
|
|
112
118
|
children: l ? l.name : u("newAgent")
|
|
113
|
-
}), l && /* @__PURE__ */
|
|
119
|
+
}), l && /* @__PURE__ */ T("p", {
|
|
114
120
|
className: "mt-1 text-sm text-muted-foreground",
|
|
115
121
|
children: u("version", { version: l.version })
|
|
116
122
|
})] }),
|
|
117
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ E("fieldset", {
|
|
118
124
|
disabled: !_,
|
|
119
125
|
className: "space-y-5",
|
|
120
126
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ E("div", {
|
|
122
128
|
className: "grid gap-4 sm:grid-cols-2",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ E("label", {
|
|
124
130
|
className: "block",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
126
|
-
className:
|
|
127
|
-
children:
|
|
128
|
-
}), /* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ T("span", {
|
|
132
|
+
className: A,
|
|
133
|
+
children: h("name")
|
|
134
|
+
}), /* @__PURE__ */ T(v, {
|
|
129
135
|
required: !0,
|
|
130
|
-
value:
|
|
131
|
-
onChange: (e) =>
|
|
136
|
+
value: M,
|
|
137
|
+
onChange: (e) => me(e.target.value),
|
|
132
138
|
className: "mt-1"
|
|
133
139
|
})]
|
|
134
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ E("div", {
|
|
135
141
|
className: "block",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
-
className:
|
|
142
|
+
children: [/* @__PURE__ */ T("span", {
|
|
143
|
+
className: A,
|
|
138
144
|
children: u("model")
|
|
139
|
-
}), /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ T(oe, {
|
|
140
146
|
value: z,
|
|
141
|
-
items:
|
|
142
|
-
onValueChange:
|
|
147
|
+
items: ye,
|
|
148
|
+
onValueChange: he,
|
|
143
149
|
placeholder: u(L === "pw-code" ? "modelPlaceholder" : "modelHarnessDefault"),
|
|
144
150
|
"aria-label": u("model"),
|
|
145
151
|
className: "mt-1"
|
|
146
152
|
})]
|
|
147
153
|
})]
|
|
148
154
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ E("label", {
|
|
150
156
|
className: "block",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
152
|
-
className:
|
|
153
|
-
children:
|
|
154
|
-
}), /* @__PURE__ */
|
|
155
|
-
value:
|
|
156
|
-
onChange: (e) =>
|
|
157
|
+
children: [/* @__PURE__ */ T("span", {
|
|
158
|
+
className: A,
|
|
159
|
+
children: h("description")
|
|
160
|
+
}), /* @__PURE__ */ T(v, {
|
|
161
|
+
value: N,
|
|
162
|
+
onChange: (e) => P(e.target.value),
|
|
157
163
|
placeholder: u("optional"),
|
|
158
164
|
className: "mt-1"
|
|
159
165
|
})]
|
|
160
166
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
-
className:
|
|
167
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("span", {
|
|
168
|
+
className: A,
|
|
163
169
|
children: u("instructions")
|
|
164
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ T("div", {
|
|
165
171
|
className: "mt-1 rounded-md border border-border bg-card px-3 py-2",
|
|
166
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ T(c, {
|
|
167
173
|
value: F,
|
|
168
174
|
onChange: I,
|
|
169
175
|
editable: _,
|
|
@@ -172,17 +178,17 @@ function N({ workspace: s, agent: l }) {
|
|
|
172
178
|
className: "min-h-32"
|
|
173
179
|
})
|
|
174
180
|
})] }),
|
|
175
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ E("div", {
|
|
176
182
|
className: "flex flex-wrap items-end gap-6",
|
|
177
183
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
className:
|
|
184
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("span", {
|
|
185
|
+
className: A,
|
|
180
186
|
children: u("harness")
|
|
181
|
-
}), /* @__PURE__ */
|
|
187
|
+
}), /* @__PURE__ */ T("div", {
|
|
182
188
|
className: "mt-1",
|
|
183
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ T(x, {
|
|
184
190
|
value: L,
|
|
185
|
-
items:
|
|
191
|
+
items: f.filter((e) => p.includes(e.value) || e.value === l?.harness).map((e) => p.includes(e.value) ? e : {
|
|
186
192
|
...e,
|
|
187
193
|
label: u("harnessNoRunner", { harness: e.label })
|
|
188
194
|
}),
|
|
@@ -192,12 +198,12 @@ function N({ workspace: s, agent: l }) {
|
|
|
192
198
|
disabled: !_
|
|
193
199
|
})
|
|
194
200
|
})] }),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
className:
|
|
201
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("span", {
|
|
202
|
+
className: A,
|
|
197
203
|
children: u("access")
|
|
198
|
-
}), /* @__PURE__ */
|
|
204
|
+
}), /* @__PURE__ */ T("div", {
|
|
199
205
|
className: "mt-1",
|
|
200
|
-
children: /* @__PURE__ */
|
|
206
|
+
children: /* @__PURE__ */ T(x, {
|
|
201
207
|
value: W,
|
|
202
208
|
items: [{
|
|
203
209
|
value: "member",
|
|
@@ -206,18 +212,18 @@ function N({ workspace: s, agent: l }) {
|
|
|
206
212
|
value: "viewer",
|
|
207
213
|
label: u("accessViewer")
|
|
208
214
|
}],
|
|
209
|
-
onValueChange: (e) =>
|
|
215
|
+
onValueChange: (e) => xe(e),
|
|
210
216
|
"aria-label": u("access"),
|
|
211
217
|
width: "content",
|
|
212
218
|
disabled: !_
|
|
213
219
|
})
|
|
214
220
|
})] }),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
className:
|
|
221
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("span", {
|
|
222
|
+
className: A,
|
|
217
223
|
children: u("permissionMode")
|
|
218
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ T("div", {
|
|
219
225
|
className: "mt-1",
|
|
220
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ T(x, {
|
|
221
227
|
value: G,
|
|
222
228
|
items: [
|
|
223
229
|
{
|
|
@@ -237,78 +243,78 @@ function N({ workspace: s, agent: l }) {
|
|
|
237
243
|
label: u("permissionBypass")
|
|
238
244
|
}
|
|
239
245
|
],
|
|
240
|
-
onValueChange: (e) =>
|
|
246
|
+
onValueChange: (e) => Se(e),
|
|
241
247
|
"aria-label": u("permissionMode"),
|
|
242
248
|
width: "content",
|
|
243
249
|
disabled: !_ || W === "viewer"
|
|
244
250
|
})
|
|
245
251
|
})] }),
|
|
246
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ E("label", {
|
|
247
253
|
className: "block min-w-48 flex-1",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
249
|
-
className:
|
|
254
|
+
children: [/* @__PURE__ */ T("span", {
|
|
255
|
+
className: A,
|
|
250
256
|
children: u("runnerLabels")
|
|
251
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ T(v, {
|
|
252
258
|
value: U,
|
|
253
|
-
onChange: (e) =>
|
|
259
|
+
onChange: (e) => be(e.target.value),
|
|
254
260
|
placeholder: u("runnerLabelsPlaceholder"),
|
|
255
261
|
className: "mt-1"
|
|
256
262
|
})]
|
|
257
263
|
})
|
|
258
264
|
]
|
|
259
265
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ T("p", {
|
|
261
267
|
className: "-mt-2 text-xs text-muted-foreground",
|
|
262
268
|
children: u("permissionModeHint")
|
|
263
269
|
}),
|
|
264
|
-
$.length > 0 && W !== "viewer" ? /* @__PURE__ */
|
|
270
|
+
$.length > 0 && W !== "viewer" ? /* @__PURE__ */ T("p", {
|
|
265
271
|
role: "status",
|
|
266
272
|
className: "-mt-2 text-xs text-pretty text-warning",
|
|
267
273
|
children: u.rich("modeCappedBy", {
|
|
268
274
|
runners: $.map((e) => `${e.name} (${B(e.permissionMode ?? "")})`).join(", "),
|
|
269
275
|
mode: B(G),
|
|
270
|
-
code: () => /* @__PURE__ */
|
|
276
|
+
code: () => /* @__PURE__ */ T("code", { children: ne(G) })
|
|
271
277
|
})
|
|
272
|
-
}) :
|
|
278
|
+
}) : ge === !1 && l?.permissionMode === G && /* @__PURE__ */ T("p", {
|
|
273
279
|
role: "status",
|
|
274
280
|
className: "-mt-2 text-xs text-warning",
|
|
275
281
|
children: u("modeNotAllowed", { mode: B(G) })
|
|
276
282
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
278
|
-
className:
|
|
283
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("span", {
|
|
284
|
+
className: A,
|
|
279
285
|
children: u("limits")
|
|
280
|
-
}), /* @__PURE__ */
|
|
286
|
+
}), /* @__PURE__ */ E("div", {
|
|
281
287
|
className: "mt-2 grid gap-4 sm:grid-cols-3",
|
|
282
288
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ E("label", {
|
|
284
290
|
className: "block text-sm",
|
|
285
|
-
children: [u("turns"), /* @__PURE__ */
|
|
291
|
+
children: [u("turns"), /* @__PURE__ */ T(y, {
|
|
286
292
|
min: 1,
|
|
287
293
|
value: K,
|
|
288
|
-
onValueChange:
|
|
294
|
+
onValueChange: Ce,
|
|
289
295
|
"aria-label": u("turns"),
|
|
290
296
|
disabled: !_,
|
|
291
297
|
className: "mt-1"
|
|
292
298
|
})]
|
|
293
299
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ E("label", {
|
|
295
301
|
className: "block text-sm",
|
|
296
|
-
children: [u("minutes"), /* @__PURE__ */
|
|
302
|
+
children: [u("minutes"), /* @__PURE__ */ T(y, {
|
|
297
303
|
min: 1,
|
|
298
304
|
value: q,
|
|
299
|
-
onValueChange:
|
|
305
|
+
onValueChange: we,
|
|
300
306
|
"aria-label": u("minutes"),
|
|
301
307
|
disabled: !_,
|
|
302
308
|
className: "mt-1"
|
|
303
309
|
})]
|
|
304
310
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ E("label", {
|
|
306
312
|
className: "block text-sm",
|
|
307
|
-
children: [u("cost"), /* @__PURE__ */
|
|
313
|
+
children: [u("cost"), /* @__PURE__ */ T(y, {
|
|
308
314
|
min: .01,
|
|
309
315
|
step: .01,
|
|
310
|
-
value:
|
|
311
|
-
onValueChange:
|
|
316
|
+
value: J,
|
|
317
|
+
onValueChange: Y,
|
|
312
318
|
"aria-label": u("cost"),
|
|
313
319
|
disabled: !_,
|
|
314
320
|
className: "mt-1"
|
|
@@ -318,81 +324,81 @@ function N({ workspace: s, agent: l }) {
|
|
|
318
324
|
})] })
|
|
319
325
|
]
|
|
320
326
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ T(ce, {
|
|
322
328
|
size: "md",
|
|
323
|
-
children:
|
|
329
|
+
children: Te
|
|
324
330
|
}),
|
|
325
|
-
_ && /* @__PURE__ */
|
|
331
|
+
_ && /* @__PURE__ */ E("div", {
|
|
326
332
|
className: "flex items-center gap-3",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
333
|
+
children: [/* @__PURE__ */ T(se, {
|
|
328
334
|
type: "submit",
|
|
329
335
|
variant: "primary",
|
|
330
|
-
disabled: !
|
|
336
|
+
disabled: !M.trim(),
|
|
331
337
|
loading: Q.isPending,
|
|
332
|
-
children: l ?
|
|
333
|
-
}), l && !l.archivedAt && /* @__PURE__ */
|
|
338
|
+
children: l ? h("save") : u("create")
|
|
339
|
+
}), l && !l.archivedAt && /* @__PURE__ */ T("button", {
|
|
334
340
|
type: "button",
|
|
335
|
-
onClick: () =>
|
|
341
|
+
onClick: () => Ee.mutate(),
|
|
336
342
|
className: "h-9 rounded-md px-3 text-sm text-muted-foreground hover:text-danger",
|
|
337
343
|
children: u("archive")
|
|
338
344
|
})]
|
|
339
345
|
})
|
|
340
346
|
]
|
|
341
|
-
}), l && /* @__PURE__ */
|
|
347
|
+
}), l && /* @__PURE__ */ T(pe, {
|
|
342
348
|
workspace: s,
|
|
343
349
|
agent: l
|
|
344
350
|
})]
|
|
345
351
|
})]
|
|
346
352
|
});
|
|
347
353
|
}
|
|
348
|
-
function
|
|
349
|
-
let n =
|
|
350
|
-
return /* @__PURE__ */
|
|
354
|
+
function pe({ workspace: e, agent: t }) {
|
|
355
|
+
let n = w("agent"), r = w("agentWork.state"), { data: i = [] } = O(s(e, { agent: t.slug })), { data: a = [] } = O(o(e)), c = m(t, a).some((e) => e.online);
|
|
356
|
+
return /* @__PURE__ */ E("section", {
|
|
351
357
|
"aria-labelledby": "agent-runs",
|
|
352
358
|
className: "space-y-3 px-4 pb-8 md:px-8",
|
|
353
359
|
children: [
|
|
354
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ T("h2", {
|
|
355
361
|
id: "agent-runs",
|
|
356
362
|
className: "text-base font-semibold",
|
|
357
363
|
children: n("runs")
|
|
358
364
|
}),
|
|
359
|
-
!c && !t.archivedAt && /* @__PURE__ */
|
|
365
|
+
!c && !t.archivedAt && /* @__PURE__ */ E("p", {
|
|
360
366
|
className: "flex items-center gap-1.5 text-sm text-warning",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ T(l, { className: "size-4" }), n("noRunnerOnline")]
|
|
362
368
|
}),
|
|
363
|
-
i.length === 0 ? /* @__PURE__ */
|
|
369
|
+
i.length === 0 ? /* @__PURE__ */ T("p", {
|
|
364
370
|
className: "text-sm text-muted-foreground",
|
|
365
371
|
children: n("noRuns")
|
|
366
|
-
}) : /* @__PURE__ */
|
|
372
|
+
}) : /* @__PURE__ */ T("ul", {
|
|
367
373
|
className: "divide-y divide-border rounded-lg border border-border",
|
|
368
|
-
children: i.map((t) => /* @__PURE__ */
|
|
374
|
+
children: i.map((t) => /* @__PURE__ */ E("li", {
|
|
369
375
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",
|
|
370
376
|
children: [
|
|
371
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ E(g, {
|
|
372
378
|
to: "/$workspace/issues/$identifier",
|
|
373
379
|
params: {
|
|
374
380
|
workspace: e,
|
|
375
381
|
identifier: t.identifier
|
|
376
382
|
},
|
|
377
383
|
className: "min-w-0 flex-1 truncate hover:underline",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ T("span", {
|
|
379
385
|
className: "mr-2 tabular-nums text-muted-foreground",
|
|
380
386
|
children: t.identifier
|
|
381
387
|
}), t.issueTitle]
|
|
382
388
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ T("span", {
|
|
384
390
|
className: "text-xs text-muted-foreground",
|
|
385
391
|
children: r(t.state)
|
|
386
392
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ T("span", {
|
|
388
394
|
className: "text-xs text-muted-foreground",
|
|
389
|
-
children: t.lastRunnerName ? /* @__PURE__ */
|
|
395
|
+
children: t.lastRunnerName ? /* @__PURE__ */ T(u, {
|
|
390
396
|
workspace: e,
|
|
391
397
|
name: t.lastRunnerName,
|
|
392
398
|
kind: t.runnerKind
|
|
393
399
|
}) : n("noRunnerYet")
|
|
394
400
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ T(b, {
|
|
396
402
|
value: t.createdAt,
|
|
397
403
|
format: "compact",
|
|
398
404
|
className: "text-xs text-muted-foreground"
|
|
@@ -403,4 +409,4 @@ function de({ workspace: e, agent: t }) {
|
|
|
403
409
|
]
|
|
404
410
|
});
|
|
405
411
|
}
|
|
406
|
-
export {
|
|
412
|
+
export { j as component };
|