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