@parallelworks/tandem-web 0.171.0 → 0.171.2

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.
Files changed (170) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +1 -0
  2. package/_virtual/_virtual_i18n/es/common.js +1 -0
  3. package/_virtual/_virtual_i18n/ja/common.js +1 -0
  4. package/_virtual/_virtual_i18n/ko/common.js +1 -0
  5. package/_virtual/_virtual_i18n/zh/common.js +1 -0
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +57 -57
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/AgentWork.js +494 -494
  10. package/components/AppLauncher.js +7 -7
  11. package/components/AreaLink.js +13 -13
  12. package/components/AreaTiles.js +13 -13
  13. package/components/AreaWork.js +22 -22
  14. package/components/Attachments.js +29 -29
  15. package/components/BlockHandle.js +3 -3
  16. package/components/BugRotation.js +8 -8
  17. package/components/CodeHostSettings.js +38 -38
  18. package/components/CollabEditor.js +13 -13
  19. package/components/CommandPalette.js +206 -206
  20. package/components/CustomFields.js +95 -95
  21. package/components/CustomerRequests.js +11 -11
  22. package/components/DashboardPanel.js +23 -23
  23. package/components/DateChip.js +21 -21
  24. package/components/DocHistory.js +14 -14
  25. package/components/DocIcon.js +4 -4
  26. package/components/DocIconPicker.js +4 -4
  27. package/components/DocLinkPicker.js +22 -22
  28. package/components/DocLook.js +16 -16
  29. package/components/DocProperties.js +81 -81
  30. package/components/DocTable.js +53 -53
  31. package/components/DocsTree.js +179 -179
  32. package/components/Editor.js +69 -69
  33. package/components/FavoritesNav.js +78 -78
  34. package/components/GitHub.js +87 -87
  35. package/components/Graph.js +14 -14
  36. package/components/HostActions.js +21 -21
  37. package/components/HostPanel.js +6 -6
  38. package/components/HoverCards.js +74 -74
  39. package/components/IssueBoard.js +13 -10
  40. package/components/IssueBreakdown.js +31 -31
  41. package/components/IssueCode.js +19 -19
  42. package/components/IssueEvent.js +12 -12
  43. package/components/IssueFilters.js +103 -99
  44. package/components/IssueGroup.js +16 -16
  45. package/components/IssueImport.js +13 -13
  46. package/components/IssueInsights.js +20 -20
  47. package/components/IssueListBlock.js +81 -81
  48. package/components/IssueRelations.js +34 -34
  49. package/components/IssueRow.js +31 -31
  50. package/components/IssueSentry.js +4 -4
  51. package/components/IssueTemplates.js +23 -23
  52. package/components/IssueTypes.js +40 -40
  53. package/components/MarkdownTransfer.js +10 -10
  54. package/components/MentionPicker.js +19 -19
  55. package/components/NewIssueDialog.js +53 -53
  56. package/components/NewProjectDialog.js +82 -82
  57. package/components/PersonActivity.js +13 -13
  58. package/components/PersonHoverCard.js +44 -44
  59. package/components/Planning.js +16 -16
  60. package/components/Reports.js +8 -8
  61. package/components/SettingsNav.js +15 -15
  62. package/components/ShareDialog.js +8 -8
  63. package/components/SharedViewer.js +23 -23
  64. package/components/SlashMenu.js +26 -26
  65. package/components/SubPages.js +10 -10
  66. package/components/TeamForm.js +9 -9
  67. package/components/TeamRepositories.js +21 -21
  68. package/components/TeamWorkflow.js +6 -6
  69. package/components/UnlinkedMentions.js +29 -29
  70. package/components/Updates.js +8 -8
  71. package/components/Widgets.js +4 -4
  72. package/components/WorkCounts.js +12 -12
  73. package/components/cycleCrumb.js +8 -8
  74. package/components/editorPlugins.js +101 -101
  75. package/components/settings.js +6 -6
  76. package/components/video.js +7 -7
  77. package/hostedApp.js +24 -24
  78. package/index.js +18 -18
  79. package/lib/assigneeOrder.js +6 -0
  80. package/lib/assignees.js +24 -20
  81. package/lib/attachments.js +12 -12
  82. package/lib/boardMove.js +27 -27
  83. package/lib/collab.js +1 -1
  84. package/lib/docs.js +115 -115
  85. package/lib/githubLink.js +7 -7
  86. package/lib/issueList.js +51 -51
  87. package/lib/issueMenu.js +117 -117
  88. package/lib/knowledge.js +134 -134
  89. package/lib/live.js +38 -38
  90. package/lib/notifications.js +47 -47
  91. package/lib/views.js +31 -31
  92. package/package.json +24 -24
  93. package/pages/area.js +64 -64
  94. package/pages/areas.js +199 -199
  95. package/pages/decisions.js +51 -51
  96. package/pages/issues.js +120 -120
  97. package/pages/projects.js +238 -238
  98. package/pages/triage.js +109 -109
  99. package/routes/_workspace/agents/_slug2.js +127 -127
  100. package/routes/_workspace/agents/index2.js +22 -22
  101. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  102. package/routes/_workspace/dashboards/index2.js +34 -34
  103. package/routes/_workspace/docs/_doc2.js +267 -267
  104. package/routes/_workspace/docs/space2._space.js +31 -31
  105. package/routes/_workspace/docs2.js +4 -4
  106. package/routes/_workspace/graph2.js +11 -11
  107. package/routes/_workspace/graph3.js +11 -11
  108. package/routes/_workspace/issues/_identifier2.js +477 -477
  109. package/routes/_workspace/issues/index.js +13 -13
  110. package/routes/_workspace/knowledge/_term2.js +175 -175
  111. package/routes/_workspace/knowledge/_term3.js +4 -4
  112. package/routes/_workspace/knowledge/index.js +12 -12
  113. package/routes/_workspace/knowledge/index2.js +117 -117
  114. package/routes/_workspace/measures2.js +8 -8
  115. package/routes/_workspace/measures3.js +29 -29
  116. package/routes/_workspace/notifications2.js +263 -263
  117. package/routes/_workspace/people/_username.js +10 -10
  118. package/routes/_workspace/people/_username2.js +41 -41
  119. package/routes/_workspace/projects/_projectId3.js +303 -303
  120. package/routes/_workspace/projects/_projectId4.js +4 -4
  121. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  122. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  123. package/routes/_workspace/projects/index.js +8 -8
  124. package/routes/_workspace/settings/account2.js +8 -8
  125. package/routes/_workspace/settings/audit-log2.js +8 -8
  126. package/routes/_workspace/settings/audit-log3.js +155 -155
  127. package/routes/_workspace/settings/connections2.js +4 -4
  128. package/routes/_workspace/settings/fields2.js +5 -5
  129. package/routes/_workspace/settings/github2.js +11 -11
  130. package/routes/_workspace/settings/gitlab2.js +5 -5
  131. package/routes/_workspace/settings/groups2.js +52 -52
  132. package/routes/_workspace/settings/import2.js +39 -39
  133. package/routes/_workspace/settings/index2.js +5 -5
  134. package/routes/_workspace/settings/intercom2.js +11 -11
  135. package/routes/_workspace/settings/labels2.js +33 -33
  136. package/routes/_workspace/settings/members2.js +81 -81
  137. package/routes/_workspace/settings/notifications2.js +46 -46
  138. package/routes/_workspace/settings/parallelworks2.js +20 -20
  139. package/routes/_workspace/settings/roles2.js +41 -41
  140. package/routes/_workspace/settings/runners2.js +15 -15
  141. package/routes/_workspace/settings/sentry2.js +15 -15
  142. package/routes/_workspace/settings/sessions2.js +9 -9
  143. package/routes/_workspace/settings/sessions3.js +4 -4
  144. package/routes/_workspace/settings/slack2.js +12 -12
  145. package/routes/_workspace/settings/sso2.js +37 -37
  146. package/routes/_workspace/settings/sso3.js +7 -7
  147. package/routes/_workspace/settings/teams2.js +29 -29
  148. package/routes/_workspace/settings/tokens2.js +32 -32
  149. package/routes/_workspace/settings/tokens3.js +4 -4
  150. package/routes/_workspace/settings/webhooks2.js +41 -41
  151. package/routes/_workspace/settings/zendesk2.js +11 -11
  152. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  153. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  154. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  155. package/routes/_workspace/teams/_key/issues.js +10 -10
  156. package/routes/_workspace/teams/_key/projects.js +6 -6
  157. package/routes/_workspace/teams/_key/settings2.js +396 -396
  158. package/routes/_workspace2.js +308 -308
  159. package/routes/_workspace3.js +8 -8
  160. package/routes/device2.js +4 -4
  161. package/routes/device3.js +4 -4
  162. package/routes/docs/_tag/_endpoint2.js +3 -3
  163. package/routes/docs/_tag/index2.js +3 -3
  164. package/routes/docs/route2.js +7 -7
  165. package/routes/index2.js +5 -5
  166. package/routes/login2.js +10 -10
  167. package/routes/new2.js +12 -12
  168. package/routes/new3.js +5 -5
  169. package/routes/request2._token.js +6 -6
  170. package/routes/share2._secret.js +4 -4
@@ -1,46 +1,46 @@
1
1
  import { api as e, unwrap as t } from "../../../api/client.js";
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";
8
- import { usePermissionModeName as u } from "../../../lib/permissionModes.js";
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";
2
+ import { agentQuery as n, agentsQuery as r, meQuery as i, myModelsQuery as a } from "../../../api/queries.js";
3
+ import { Editor as ee } from "../../../components/Editor.js";
4
+ import { NotFound as o } from "../../../components/status.js";
5
+ import { harnessOptions as te, runnableHarnesses as s } from "../../../lib/agents.js";
6
+ import { usePageTitle as c } from "../../../lib/pageTitle.js";
7
+ import { usePermissionModeName as ne } from "../../../lib/permissionModes.js";
8
+ import { may as l } from "../../../lib/roles.js";
9
+ import { useNavigate as re } from "../../../lib/router.js";
10
+ import { Route as u } from "./_slug.js";
11
+ import { Autocomplete as ie, Button as ae, ErrorText as d, Input as f, NumberInput as p, PageHeader as m, Select as h, toast as oe } from "@parallelworks/ui";
12
+ import { useState as g } from "react";
13
+ import { useErrorMessage as _ } from "@parallelworks/problem/react";
14
+ import { useTranslations as v } from "use-intl";
15
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
16
+ import { useMutation as x, useQuery as S, useQueryClient as C, useSuspenseQuery as w } from "@tanstack/react-query";
17
17
  // src/routes/$workspace/agents/$slug.tsx?tsr-split=component
18
18
  var T = "block text-sm font-medium";
19
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, {
20
+ let { workspace: e, slug: t } = u.useParams(), { data: n } = w(r(e)), i = n.find((e) => e.slug === t), a = v("agent");
21
+ return c(i ? i.name : a("newAgent")), t !== "new" && !i ? /* @__PURE__ */ y(o, { title: a("notFound") }) : /* @__PURE__ */ y(D, {
22
22
  workspace: e,
23
- agent: a
24
- }, a?.id ?? "new");
23
+ agent: i
24
+ }, i?.id ?? "new");
25
25
  }
26
- function D(e) {
26
+ function se(e) {
27
27
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 63);
28
28
  }
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({
34
- ...ee,
29
+ function D({ workspace: o, agent: c }) {
30
+ let u = v("agent"), E = v("workspace"), D = _(), O = v("common"), { data: k } = w(i), A = l(k, o, "manage_agents"), j = C(), M = re(), [N, ce] = g(c?.name ?? ""), [P, le] = g(c?.description ?? ""), [F, I] = g(c?.instructions ?? ""), [L, R] = g(c?.harness ?? "pw-code"), [z, B] = g(c?.model ?? ""), V = ne(), H = S({
31
+ ...n(o, c?.slug ?? ""),
32
+ enabled: !!c
33
+ }).data?.modeAllowed, U = S({
34
+ ...a,
35
35
  enabled: L === "pw-code"
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) => ({
36
+ }).data ?? [], { data: ue } = w(r(o)), W = [...new Set(ue.filter((e) => e.harness === L && e.model && e.id !== c?.id).map((e) => e.model))].filter((e) => !U.some((t) => t.id === e)), de = [...U.map((e) => ({
37
37
  value: e.id,
38
38
  label: e.name || e.id,
39
39
  ...e.name && e.name !== e.id && { description: e.id }
40
40
  })), ...W.length > 0 ? [{
41
- label: c("modelsInWorkspace"),
41
+ label: u("modelsInWorkspace"),
42
42
  items: W
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 = () => ({
43
+ }] : []], [G, fe] = g(c?.runnerLabels.join(", ") ?? ""), [K, pe] = g(c?.maxRole ?? "member"), [q, me] = g(c?.permissionMode ?? "accept-edits"), [J, he] = g(c?.maxTurns ?? 200), [Y, ge] = g(c?.maxMinutes ?? 120), [X, _e] = g((c?.maxCostMicros ?? 2e7) / 1e6), [ve, Z] = g(null), Q = () => ({
44
44
  name: N,
45
45
  description: P,
46
46
  instructions: F,
@@ -52,254 +52,254 @@ function O({ workspace: n, agent: r }) {
52
52
  maxTurns: J ?? 0,
53
53
  maxMinutes: Y ?? 0,
54
54
  maxCostMicros: Math.round((X ?? 0) * 1e6)
55
- }), $ = S({
56
- mutationFn: async () => t(r ? await e.PUT("/api/v1/workspaces/{workspace}/agents/{slug}", {
55
+ }), $ = x({
56
+ mutationFn: async () => t(c ? await e.PUT("/api/v1/workspaces/{workspace}/agents/{slug}", {
57
57
  params: { path: {
58
- workspace: n,
59
- slug: r.slug
58
+ workspace: o,
59
+ slug: c.slug
60
60
  } },
61
61
  body: Q()
62
62
  }) : await e.POST("/api/v1/workspaces/{workspace}/agents", {
63
- params: { path: { workspace: n } },
63
+ params: { path: { workspace: o } },
64
64
  body: {
65
- slug: D(N),
65
+ slug: se(N),
66
66
  ...Q()
67
67
  }
68
68
  })),
69
69
  onMutate: () => Z(null),
70
70
  onSuccess: (e) => {
71
- j.invalidateQueries({ queryKey: o(n).queryKey }), ae.success(c(r ? "saved" : "created", { name: e.name })), M({
71
+ j.invalidateQueries({ queryKey: r(o).queryKey }), oe.success(u(c ? "saved" : "created", { name: e.name })), M({
72
72
  to: "/$workspace/agents/$slug",
73
73
  params: {
74
- workspace: n,
74
+ workspace: o,
75
75
  slug: e.slug
76
76
  }
77
77
  });
78
78
  },
79
- onError: (e) => Z(O(e))
80
- }), ye = S({
79
+ onError: (e) => Z(D(e))
80
+ }), ye = x({
81
81
  mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/agents/{slug}", { params: { path: {
82
- workspace: n,
83
- slug: r?.slug ?? ""
82
+ workspace: o,
83
+ slug: c?.slug ?? ""
84
84
  } } })),
85
85
  onSuccess: () => {
86
- j.invalidateQueries({ queryKey: o(n).queryKey }), M({
86
+ j.invalidateQueries({ queryKey: r(o).queryKey }), M({
87
87
  to: "/$workspace/agents",
88
- params: { workspace: n }
88
+ params: { workspace: o }
89
89
  });
90
90
  }
91
91
  });
92
- return /* @__PURE__ */ x("div", {
92
+ return /* @__PURE__ */ b("div", {
93
93
  className: "flex h-full min-h-0 flex-col",
94
- children: [/* @__PURE__ */ b(h, {
94
+ children: [/* @__PURE__ */ y(m, {
95
95
  heading: !1,
96
96
  breadcrumbs: [{
97
97
  label: E("agents"),
98
- href: `/${n}/agents`
99
- }, { label: r ? r.name : c("newAgent") }]
100
- }), /* @__PURE__ */ b("div", {
98
+ href: `/${o}/agents`
99
+ }, { label: c ? c.name : u("newAgent") }]
100
+ }), /* @__PURE__ */ y("div", {
101
101
  className: "min-h-0 flex-1 overflow-y-auto",
102
- children: /* @__PURE__ */ x("form", {
102
+ children: /* @__PURE__ */ b("form", {
103
103
  className: "w-full space-y-6 px-4 py-6 md:px-8 md:py-8",
104
104
  onSubmit: (e) => {
105
105
  e.preventDefault(), $.mutate();
106
106
  },
107
107
  children: [
108
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h1", {
108
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
109
109
  className: "text-xl font-semibold tracking-tight",
110
- children: r ? r.name : c("newAgent")
111
- }), r && /* @__PURE__ */ b("p", {
110
+ children: c ? c.name : u("newAgent")
111
+ }), c && /* @__PURE__ */ y("p", {
112
112
  className: "mt-1 text-sm text-muted-foreground",
113
- children: c("version", { version: r.version })
113
+ children: u("version", { version: c.version })
114
114
  })] }),
115
- /* @__PURE__ */ x("fieldset", {
115
+ /* @__PURE__ */ b("fieldset", {
116
116
  disabled: !A,
117
117
  className: "space-y-5",
118
118
  children: [
119
- /* @__PURE__ */ x("div", {
119
+ /* @__PURE__ */ b("div", {
120
120
  className: "grid gap-4 sm:grid-cols-2",
121
- children: [/* @__PURE__ */ x("label", {
121
+ children: [/* @__PURE__ */ b("label", {
122
122
  className: "block",
123
- children: [/* @__PURE__ */ b("span", {
123
+ children: [/* @__PURE__ */ y("span", {
124
124
  className: T,
125
- children: k("name")
126
- }), /* @__PURE__ */ b(p, {
125
+ children: O("name")
126
+ }), /* @__PURE__ */ y(f, {
127
127
  required: !0,
128
128
  value: N,
129
129
  onChange: (e) => ce(e.target.value),
130
130
  className: "mt-1"
131
131
  })]
132
- }), /* @__PURE__ */ x("div", {
132
+ }), /* @__PURE__ */ b("div", {
133
133
  className: "block",
134
- children: [/* @__PURE__ */ b("span", {
134
+ children: [/* @__PURE__ */ y("span", {
135
135
  className: T,
136
- children: c("model")
137
- }), /* @__PURE__ */ b(re, {
136
+ children: u("model")
137
+ }), /* @__PURE__ */ y(ie, {
138
138
  value: z,
139
139
  items: de,
140
140
  onValueChange: B,
141
- placeholder: c(L === "pw-code" ? "modelPlaceholder" : "modelHarnessDefault"),
142
- "aria-label": c("model"),
141
+ placeholder: u(L === "pw-code" ? "modelPlaceholder" : "modelHarnessDefault"),
142
+ "aria-label": u("model"),
143
143
  className: "mt-1"
144
144
  })]
145
145
  })]
146
146
  }),
147
- /* @__PURE__ */ x("label", {
147
+ /* @__PURE__ */ b("label", {
148
148
  className: "block",
149
- children: [/* @__PURE__ */ b("span", {
149
+ children: [/* @__PURE__ */ y("span", {
150
150
  className: T,
151
- children: k("description")
152
- }), /* @__PURE__ */ b(p, {
151
+ children: O("description")
152
+ }), /* @__PURE__ */ y(f, {
153
153
  value: P,
154
154
  onChange: (e) => le(e.target.value),
155
- placeholder: c("optional"),
155
+ placeholder: u("optional"),
156
156
  className: "mt-1"
157
157
  })]
158
158
  }),
159
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("span", {
159
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("span", {
160
160
  className: T,
161
- children: c("instructions")
162
- }), /* @__PURE__ */ b("div", {
161
+ children: u("instructions")
162
+ }), /* @__PURE__ */ y("div", {
163
163
  className: "mt-1 rounded-md border border-border bg-card px-3 py-2",
164
- children: /* @__PURE__ */ b(d, {
164
+ children: /* @__PURE__ */ y(ee, {
165
165
  value: F,
166
166
  onChange: I,
167
167
  editable: A,
168
- placeholder: c("instructionsPlaceholder"),
169
- label: c("instructions"),
168
+ placeholder: u("instructionsPlaceholder"),
169
+ label: u("instructions"),
170
170
  className: "min-h-32"
171
171
  })
172
172
  })] }),
173
- /* @__PURE__ */ x("div", {
173
+ /* @__PURE__ */ b("div", {
174
174
  className: "flex flex-wrap items-end gap-6",
175
175
  children: [
176
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("span", {
176
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("span", {
177
177
  className: T,
178
- children: c("harness")
179
- }), /* @__PURE__ */ b("div", {
178
+ children: u("harness")
179
+ }), /* @__PURE__ */ y("div", {
180
180
  className: "mt-1",
181
- children: /* @__PURE__ */ b(g, {
181
+ children: /* @__PURE__ */ y(h, {
182
182
  value: L,
183
- items: te.filter((e) => l.includes(e.value) || e.value === r?.harness).map((e) => l.includes(e.value) ? e : {
183
+ items: te.filter((e) => s.includes(e.value) || e.value === c?.harness).map((e) => s.includes(e.value) ? e : {
184
184
  ...e,
185
- label: c("harnessNoRunner", { harness: e.label })
185
+ label: u("harnessNoRunner", { harness: e.label })
186
186
  }),
187
187
  onValueChange: (e) => R(e),
188
- "aria-label": c("harness"),
188
+ "aria-label": u("harness"),
189
189
  width: "content",
190
190
  disabled: !A
191
191
  })
192
192
  })] }),
193
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("span", {
193
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("span", {
194
194
  className: T,
195
- children: c("access")
196
- }), /* @__PURE__ */ b("div", {
195
+ children: u("access")
196
+ }), /* @__PURE__ */ y("div", {
197
197
  className: "mt-1",
198
- children: /* @__PURE__ */ b(g, {
198
+ children: /* @__PURE__ */ y(h, {
199
199
  value: K,
200
200
  items: [{
201
201
  value: "member",
202
- label: c("accessMember")
202
+ label: u("accessMember")
203
203
  }, {
204
204
  value: "viewer",
205
- label: c("accessViewer")
205
+ label: u("accessViewer")
206
206
  }],
207
207
  onValueChange: (e) => pe(e),
208
- "aria-label": c("access"),
208
+ "aria-label": u("access"),
209
209
  width: "content",
210
210
  disabled: !A
211
211
  })
212
212
  })] }),
213
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("span", {
213
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("span", {
214
214
  className: T,
215
- children: c("permissionMode")
216
- }), /* @__PURE__ */ b("div", {
215
+ children: u("permissionMode")
216
+ }), /* @__PURE__ */ y("div", {
217
217
  className: "mt-1",
218
- children: /* @__PURE__ */ b(g, {
218
+ children: /* @__PURE__ */ y(h, {
219
219
  value: q,
220
220
  items: [
221
221
  {
222
222
  value: "default",
223
- label: c("permissionDefault")
223
+ label: u("permissionDefault")
224
224
  },
225
225
  {
226
226
  value: "accept-edits",
227
- label: c("permissionAcceptEdits")
227
+ label: u("permissionAcceptEdits")
228
228
  },
229
229
  {
230
230
  value: "auto",
231
- label: c("permissionAuto")
231
+ label: u("permissionAuto")
232
232
  },
233
233
  {
234
234
  value: "bypass",
235
- label: c("permissionBypass")
235
+ label: u("permissionBypass")
236
236
  }
237
237
  ],
238
238
  onValueChange: (e) => me(e),
239
- "aria-label": c("permissionMode"),
239
+ "aria-label": u("permissionMode"),
240
240
  width: "content",
241
241
  disabled: !A || K === "viewer"
242
242
  })
243
243
  })] }),
244
- /* @__PURE__ */ x("label", {
244
+ /* @__PURE__ */ b("label", {
245
245
  className: "block min-w-48 flex-1",
246
- children: [/* @__PURE__ */ b("span", {
246
+ children: [/* @__PURE__ */ y("span", {
247
247
  className: T,
248
- children: c("runnerLabels")
249
- }), /* @__PURE__ */ b(p, {
248
+ children: u("runnerLabels")
249
+ }), /* @__PURE__ */ y(f, {
250
250
  value: G,
251
251
  onChange: (e) => fe(e.target.value),
252
- placeholder: c("runnerLabelsPlaceholder"),
252
+ placeholder: u("runnerLabelsPlaceholder"),
253
253
  className: "mt-1"
254
254
  })]
255
255
  })
256
256
  ]
257
257
  }),
258
- /* @__PURE__ */ b("p", {
258
+ /* @__PURE__ */ y("p", {
259
259
  className: "-mt-2 text-xs text-muted-foreground",
260
- children: c("permissionModeHint")
260
+ children: u("permissionModeHint")
261
261
  }),
262
- H === !1 && r?.permissionMode === q && /* @__PURE__ */ b("p", {
262
+ H === !1 && c?.permissionMode === q && /* @__PURE__ */ y("p", {
263
263
  role: "status",
264
264
  className: "-mt-2 text-xs text-warning",
265
- children: c("modeNotAllowed", { mode: V(q) })
265
+ children: u("modeNotAllowed", { mode: V(q) })
266
266
  }),
267
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("span", {
267
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("span", {
268
268
  className: T,
269
- children: c("limits")
270
- }), /* @__PURE__ */ x("div", {
269
+ children: u("limits")
270
+ }), /* @__PURE__ */ b("div", {
271
271
  className: "mt-2 grid gap-4 sm:grid-cols-3",
272
272
  children: [
273
- /* @__PURE__ */ x("label", {
273
+ /* @__PURE__ */ b("label", {
274
274
  className: "block text-sm",
275
- children: [c("turns"), /* @__PURE__ */ b(m, {
275
+ children: [u("turns"), /* @__PURE__ */ y(p, {
276
276
  min: 1,
277
277
  value: J,
278
278
  onValueChange: he,
279
- "aria-label": c("turns"),
279
+ "aria-label": u("turns"),
280
280
  disabled: !A,
281
281
  className: "mt-1"
282
282
  })]
283
283
  }),
284
- /* @__PURE__ */ x("label", {
284
+ /* @__PURE__ */ b("label", {
285
285
  className: "block text-sm",
286
- children: [c("minutes"), /* @__PURE__ */ b(m, {
286
+ children: [u("minutes"), /* @__PURE__ */ y(p, {
287
287
  min: 1,
288
288
  value: Y,
289
289
  onValueChange: ge,
290
- "aria-label": c("minutes"),
290
+ "aria-label": u("minutes"),
291
291
  disabled: !A,
292
292
  className: "mt-1"
293
293
  })]
294
294
  }),
295
- /* @__PURE__ */ x("label", {
295
+ /* @__PURE__ */ b("label", {
296
296
  className: "block text-sm",
297
- children: [c("cost"), /* @__PURE__ */ b(m, {
297
+ children: [u("cost"), /* @__PURE__ */ y(p, {
298
298
  min: .01,
299
299
  step: .01,
300
300
  value: X,
301
301
  onValueChange: _e,
302
- "aria-label": c("cost"),
302
+ "aria-label": u("cost"),
303
303
  disabled: !A,
304
304
  className: "mt-1"
305
305
  })]
@@ -308,23 +308,23 @@ function O({ workspace: n, agent: r }) {
308
308
  })] })
309
309
  ]
310
310
  }),
311
- /* @__PURE__ */ b(f, {
311
+ /* @__PURE__ */ y(d, {
312
312
  size: "md",
313
313
  children: ve
314
314
  }),
315
- A && /* @__PURE__ */ x("div", {
315
+ A && /* @__PURE__ */ b("div", {
316
316
  className: "flex items-center gap-3",
317
- children: [/* @__PURE__ */ b(ie, {
317
+ children: [/* @__PURE__ */ y(ae, {
318
318
  type: "submit",
319
319
  variant: "primary",
320
320
  disabled: !N.trim(),
321
321
  loading: $.isPending,
322
- children: r ? k("save") : c("create")
323
- }), r && !r.archivedAt && /* @__PURE__ */ b("button", {
322
+ children: c ? O("save") : u("create")
323
+ }), c && !c.archivedAt && /* @__PURE__ */ y("button", {
324
324
  type: "button",
325
325
  onClick: () => ye.mutate(),
326
326
  className: "h-9 rounded-md px-3 text-sm text-muted-foreground hover:text-danger",
327
- children: c("archive")
327
+ children: u("archive")
328
328
  })]
329
329
  })
330
330
  ]
@@ -1,28 +1,28 @@
1
1
  import { api as e, unwrap as t } from "../../../api/client.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 { harnessNames as c } from "../../../lib/agents.js";
7
- import { copyItem as l, useLinkItems as u } from "../../../lib/menus.js";
8
- import { AgentIcon as d } from "../../../components/icons.js";
9
- import { may as f } from "../../../lib/roles.js";
10
- import { useConfirm as p } from "../../../lib/confirm.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
11
  import { Avatar as m, Card as h, EmptyState as g, buttonClasses as _, menuDivider as v, useOpenMenu as y } from "@parallelworks/ui";
12
12
  import { useTranslations as b } from "use-intl";
13
13
  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 } = 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 = f(j, E, "manage_agents"), N = y(), P = i(), F = w(), I = C({
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({
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: a(E).queryKey })
25
- }), { confirm: L, dialog: R } = p(), z = (e) => [
24
+ onSettled: () => F.invalidateQueries({ queryKey: n(E).queryKey })
25
+ }), { confirm: L, dialog: R } = o(), z = (e) => [
26
26
  {
27
27
  label: O("open"),
28
28
  onClick: () => P({
@@ -34,7 +34,7 @@ function E() {
34
34
  })
35
35
  },
36
36
  ...k(`/${E}/agents/${e.slug}`),
37
- l(D("copySlug"), e.slug),
37
+ s(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(r, {
59
+ A.length > 0 && /* @__PURE__ */ x(d, {
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(r, {
65
+ M && A.length > 0 && /* @__PURE__ */ x(d, {
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(d, {}),
77
+ icon: /* @__PURE__ */ x(i, {}),
78
78
  title: D("empty"),
79
79
  description: D("emptyDescription"),
80
- ...M && { action: /* @__PURE__ */ x(r, {
80
+ ...M && { action: /* @__PURE__ */ x(d, {
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(r, {
97
+ children: A.map((e) => /* @__PURE__ */ x("li", { children: /* @__PURE__ */ S(d, {
98
98
  to: "/$workspace/agents/$slug",
99
99
  params: {
100
100
  workspace: E,
@@ -125,9 +125,9 @@ function E() {
125
125
  /* @__PURE__ */ x("span", {
126
126
  className: "text-xs text-muted-foreground",
127
127
  children: e.model ? D("harnessWithModel", {
128
- harness: c[e.harness] ?? e.harness,
128
+ harness: a[e.harness] ?? e.harness,
129
129
  model: e.model
130
- }) : c[e.harness]
130
+ }) : a[e.harness]
131
131
  })
132
132
  ]
133
133
  }) }, e.id))