@parallelworks/tandem-web 0.194.0 → 0.194.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.
- package/_virtual/_virtual_i18n/en/common.js +48 -4
- package/_virtual/_virtual_i18n/es/common.js +48 -4
- package/_virtual/_virtual_i18n/ja/common.js +48 -4
- package/_virtual/_virtual_i18n/ko/common.js +48 -4
- package/_virtual/_virtual_i18n/zh/common.js +48 -4
- package/api/queries.js +501 -504
- package/components/AgentActions.js +97 -0
- package/components/AgentBugReports.js +228 -0
- package/components/AgentDeploy.js +88 -0
- package/components/IssueBreakdown.js +128 -116
- package/components/NewIssueDialog.js +146 -146
- package/lib/agents.js +11 -1
- package/lib/breakdownPicks.js +17 -0
- package/lib/knowledge.js +8 -1
- package/lib/panelRequest.js +13 -0
- package/package.json +1 -1
- package/pages/issues.js +334 -324
- package/routes/_workspace/agents/_slug.js +1 -0
- package/routes/_workspace/agents/_slug2.js +399 -347
- package/routes/_workspace/knowledge/_term2.js +121 -109
- package/routes/_workspace/knowledge/index2.js +88 -81
|
@@ -10,45 +10,45 @@ import { Route as p } from "./index.js";
|
|
|
10
10
|
import { Button as m, EmptyState as h, SearchInput as g, SegmentedControl as _, Tooltip as v, buttonClasses as y, useOpenMenu as b } from "@parallelworks/ui";
|
|
11
11
|
import { Suspense as x, useCallback as S, useEffect as C, useMemo as w, useState as T } from "react";
|
|
12
12
|
import { useLocale as E, useTranslations as D } from "use-intl";
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { useQuery as
|
|
13
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
14
|
+
import { useQuery as j, useSuspenseQuery as M } from "@tanstack/react-query";
|
|
15
15
|
// src/routes/$workspace/knowledge/index.tsx?tsr-split=component
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
let { workspace: o } = p.useParams(), { archived: f, kind: v = "all" } = p.useSearch(), b = D("knowledge"),
|
|
16
|
+
var N = 5, P = 8;
|
|
17
|
+
function F() {
|
|
18
|
+
let { workspace: o } = p.useParams(), { archived: f, kind: v = "all" } = p.useSearch(), b = D("knowledge"), F = E();
|
|
19
19
|
l(b("title"));
|
|
20
|
-
let
|
|
20
|
+
let L = d(), [R, z] = T(""), [B, V] = T(""), [H, U] = T(null);
|
|
21
21
|
C(() => {
|
|
22
|
-
let e = setTimeout(() =>
|
|
22
|
+
let e = setTimeout(() => V(R.trim()), 200);
|
|
23
23
|
return () => clearTimeout(e);
|
|
24
|
-
}, [
|
|
25
|
-
let { data:
|
|
26
|
-
...
|
|
24
|
+
}, [R]);
|
|
25
|
+
let { data: W } = M(t(o)), { data: G = [] } = j(e(o)), K = {
|
|
26
|
+
...B && { q: B },
|
|
27
27
|
...f && { archived: !0 }
|
|
28
|
-
}, { data:
|
|
29
|
-
...t(o,
|
|
30
|
-
enabled: !!
|
|
31
|
-
}),
|
|
28
|
+
}, { data: q } = j({
|
|
29
|
+
...t(o, K),
|
|
30
|
+
enabled: !!B || !!f
|
|
31
|
+
}), J = !!B || !!f, Y = J ? q ?? [] : W, X = v === "all" ? Y : Y.filter((e) => e.kind === v), Z = S((e) => U(e), []), Q = w(() => {
|
|
32
32
|
let e = /* @__PURE__ */ new Map();
|
|
33
|
-
for (let t of
|
|
33
|
+
for (let t of Y) e.set(t.kind, (e.get(t.kind) ?? 0) + 1);
|
|
34
34
|
return e;
|
|
35
|
-
}, [
|
|
36
|
-
let e = new Intl.Collator(
|
|
37
|
-
for (let e of
|
|
38
|
-
let n =
|
|
35
|
+
}, [Y]), ee = w(() => [...X].sort((e, t) => t.updatedAt.localeCompare(e.updatedAt)).slice(0, N), [X]), te = w(() => {
|
|
36
|
+
let e = new Intl.Collator(F, { sensitivity: "base" }), t = /* @__PURE__ */ new Map();
|
|
37
|
+
for (let e of X) {
|
|
38
|
+
let n = G.some((t) => t.id === e.areaId) ? e.areaId : "";
|
|
39
39
|
t.set(n, [...t.get(n) ?? [], e]);
|
|
40
40
|
}
|
|
41
41
|
return [...t].map(([t, n]) => ({
|
|
42
42
|
id: t,
|
|
43
|
-
title:
|
|
43
|
+
title: G.find((e) => e.id === t)?.title ?? b("general"),
|
|
44
44
|
entries: n.sort((t, n) => e.compare(t.name, n.name))
|
|
45
45
|
})).sort((t, n) => t.id ? n.id ? e.compare(t.title, n.title) : -1 : 1);
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
X,
|
|
48
|
+
G,
|
|
49
|
+
F,
|
|
50
50
|
b
|
|
51
|
-
]), ne = (e) =>
|
|
51
|
+
]), ne = (e) => L({
|
|
52
52
|
to: "/$workspace/knowledge",
|
|
53
53
|
params: { workspace: o },
|
|
54
54
|
search: {
|
|
@@ -56,59 +56,59 @@ function P() {
|
|
|
56
56
|
...e !== "all" && { kind: e }
|
|
57
57
|
},
|
|
58
58
|
replace: !0
|
|
59
|
-
}), $ = s.filter((e) =>
|
|
60
|
-
return /* @__PURE__ */
|
|
59
|
+
}), $ = s.filter((e) => Q.has(e) || e === v);
|
|
60
|
+
return /* @__PURE__ */ A("div", {
|
|
61
61
|
className: "flex h-full flex-col",
|
|
62
62
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ A("header", {
|
|
64
64
|
className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
|
|
65
65
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ k("h1", {
|
|
67
67
|
className: "min-w-0 truncate text-sm font-semibold",
|
|
68
68
|
children: b("title")
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ k(n, {
|
|
71
71
|
workspace: o,
|
|
72
72
|
kind: "page",
|
|
73
73
|
target: "knowledge"
|
|
74
74
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ k("span", {
|
|
76
76
|
className: "whitespace-nowrap text-xs text-muted-foreground tabular-nums",
|
|
77
|
-
children: b("count", { count:
|
|
77
|
+
children: b("count", { count: W.length })
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ k(u, {
|
|
80
80
|
to: "/$workspace/graph",
|
|
81
81
|
params: { workspace: o },
|
|
82
82
|
className: `${y({ size: "sm" })} ml-auto`,
|
|
83
83
|
children: b("graph")
|
|
84
84
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ A(m, {
|
|
86
86
|
type: "button",
|
|
87
87
|
variant: "primary",
|
|
88
88
|
size: "sm",
|
|
89
|
-
onClick: () =>
|
|
90
|
-
children: [/* @__PURE__ */
|
|
89
|
+
onClick: () => Z({ kind: "create" }),
|
|
90
|
+
children: [/* @__PURE__ */ k(r, { className: "size-3.5" }), /* @__PURE__ */ k("span", {
|
|
91
91
|
className: "max-md:sr-only",
|
|
92
92
|
children: b("new")
|
|
93
93
|
})]
|
|
94
94
|
})
|
|
95
95
|
]
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ k("div", {
|
|
98
98
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
99
|
-
children: /* @__PURE__ */
|
|
99
|
+
children: /* @__PURE__ */ A("div", {
|
|
100
100
|
className: "mx-auto w-full max-w-3xl px-4 pt-8 pb-16 md:px-8",
|
|
101
101
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
value:
|
|
104
|
-
onValueChange:
|
|
102
|
+
/* @__PURE__ */ k(g, {
|
|
103
|
+
value: R,
|
|
104
|
+
onValueChange: z,
|
|
105
105
|
label: b("search"),
|
|
106
106
|
size: "lg",
|
|
107
107
|
className: "w-full"
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ A("div", {
|
|
110
110
|
className: "mt-4 flex flex-wrap items-center gap-2",
|
|
111
|
-
children: [$.length > 1 && /* @__PURE__ */
|
|
111
|
+
children: [$.length > 1 && /* @__PURE__ */ k(_, {
|
|
112
112
|
label: b("kindLabel"),
|
|
113
113
|
size: "sm",
|
|
114
114
|
value: v,
|
|
@@ -116,13 +116,13 @@ function P() {
|
|
|
116
116
|
options: [{
|
|
117
117
|
value: "all",
|
|
118
118
|
label: b("allKinds"),
|
|
119
|
-
count:
|
|
119
|
+
count: Y.length
|
|
120
120
|
}, ...$.map((e) => ({
|
|
121
121
|
value: e,
|
|
122
122
|
label: b(`kinds.${e}`),
|
|
123
|
-
count:
|
|
123
|
+
count: Q.get(e) ?? 0
|
|
124
124
|
}))]
|
|
125
|
-
}), /* @__PURE__ */
|
|
125
|
+
}), /* @__PURE__ */ k(u, {
|
|
126
126
|
to: "/$workspace/knowledge",
|
|
127
127
|
params: { workspace: o },
|
|
128
128
|
search: {
|
|
@@ -137,42 +137,42 @@ function P() {
|
|
|
137
137
|
children: b("archived")
|
|
138
138
|
})]
|
|
139
139
|
}),
|
|
140
|
-
|
|
141
|
-
icon: /* @__PURE__ */
|
|
142
|
-
title: b(
|
|
143
|
-
description:
|
|
144
|
-
action: !
|
|
140
|
+
X.length === 0 ? /* @__PURE__ */ k(h, {
|
|
141
|
+
icon: /* @__PURE__ */ k(i, {}),
|
|
142
|
+
title: b(J || v !== "all" ? "noMatches" : "emptyTitle"),
|
|
143
|
+
description: J || v !== "all" ? void 0 : b("empty"),
|
|
144
|
+
action: !J && v === "all" ? /* @__PURE__ */ k(m, {
|
|
145
145
|
type: "button",
|
|
146
146
|
variant: "primary",
|
|
147
|
-
onClick: () =>
|
|
147
|
+
onClick: () => Z({ kind: "create" }),
|
|
148
148
|
children: b("new")
|
|
149
149
|
}) : void 0,
|
|
150
150
|
className: "mt-16"
|
|
151
|
-
}) :
|
|
151
|
+
}) : J ? /* @__PURE__ */ k(I, {
|
|
152
152
|
workspace: o,
|
|
153
153
|
title: b("results"),
|
|
154
|
-
entries:
|
|
155
|
-
onOpen:
|
|
156
|
-
}) : /* @__PURE__ */
|
|
154
|
+
entries: X,
|
|
155
|
+
onOpen: Z
|
|
156
|
+
}) : /* @__PURE__ */ A(O, { children: [X.length >= P && /* @__PURE__ */ k(I, {
|
|
157
157
|
workspace: o,
|
|
158
158
|
title: b("recent"),
|
|
159
|
-
entries:
|
|
160
|
-
onOpen:
|
|
159
|
+
entries: ee,
|
|
160
|
+
onOpen: Z,
|
|
161
161
|
showTime: !0
|
|
162
|
-
}), te.map((e) => /* @__PURE__ */
|
|
162
|
+
}), te.map((e) => /* @__PURE__ */ k(I, {
|
|
163
163
|
workspace: o,
|
|
164
164
|
title: e.title,
|
|
165
165
|
entries: e.entries,
|
|
166
|
-
onOpen:
|
|
166
|
+
onOpen: Z
|
|
167
167
|
}, e.id || "general"))] })
|
|
168
168
|
]
|
|
169
169
|
})
|
|
170
170
|
}),
|
|
171
|
-
|
|
171
|
+
H && /* @__PURE__ */ k(x, { children: /* @__PURE__ */ k(a, {
|
|
172
172
|
workspace: o,
|
|
173
|
-
mode:
|
|
174
|
-
onClose: () =>
|
|
175
|
-
onSaved: (e) =>
|
|
173
|
+
mode: H,
|
|
174
|
+
onClose: () => U(null),
|
|
175
|
+
onSaved: (e) => L({
|
|
176
176
|
to: "/$workspace/knowledge/$term",
|
|
177
177
|
params: {
|
|
178
178
|
workspace: o,
|
|
@@ -183,20 +183,20 @@ function P() {
|
|
|
183
183
|
]
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function I({ workspace: e, title: t, entries: n, onOpen: r, showTime: i = !1 }) {
|
|
187
187
|
let a = D("knowledge"), s = b(), l = o(e, r), d = f();
|
|
188
|
-
return /* @__PURE__ */
|
|
188
|
+
return /* @__PURE__ */ A("section", {
|
|
189
189
|
"aria-label": t,
|
|
190
190
|
className: "mt-10",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ A("h2", {
|
|
192
192
|
className: "flex items-baseline gap-2 text-base font-semibold",
|
|
193
|
-
children: [t, /* @__PURE__ */
|
|
193
|
+
children: [t, /* @__PURE__ */ k("span", {
|
|
194
194
|
className: "text-xs font-normal text-muted-foreground tabular-nums",
|
|
195
195
|
children: n.length
|
|
196
196
|
})]
|
|
197
|
-
}), /* @__PURE__ */
|
|
197
|
+
}), /* @__PURE__ */ k("ul", {
|
|
198
198
|
className: "mt-3 divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
|
|
199
|
-
children: n.map((t) => /* @__PURE__ */
|
|
199
|
+
children: n.map((t) => /* @__PURE__ */ k("li", { children: /* @__PURE__ */ A(u, {
|
|
200
200
|
to: "/$workspace/knowledge/$term",
|
|
201
201
|
params: {
|
|
202
202
|
workspace: e,
|
|
@@ -204,20 +204,27 @@ function F({ workspace: e, title: t, entries: n, onOpen: r, showTime: i = !1 })
|
|
|
204
204
|
},
|
|
205
205
|
onContextMenu: (e) => s(e, l(t)),
|
|
206
206
|
className: "group flex flex-col gap-1 px-4 py-3 sm:flex-row sm:items-start sm:gap-3 transition-colors duration-150 hover:bg-muted focus-visible:outline-offset-[-2px]",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ A("span", {
|
|
208
208
|
className: "min-w-0 flex-1",
|
|
209
|
-
children: [
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ k("span", {
|
|
211
|
+
className: `block truncate text-sm font-medium ${t.status === "superseded" ? "text-muted-foreground line-through" : ""}`,
|
|
212
|
+
children: t.name
|
|
213
|
+
}),
|
|
214
|
+
t.status === "added" && t.replacesName && /* @__PURE__ */ k("span", {
|
|
215
|
+
className: "block truncate text-xs text-primary",
|
|
216
|
+
children: a("suggestsChange", { name: t.replacesName })
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ k("span", {
|
|
219
|
+
className: "mt-0.5 line-clamp-2 text-xs leading-5 text-muted-foreground",
|
|
220
|
+
children: t.definition
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
}), (t.kind !== "term" || i) && /* @__PURE__ */ A("span", {
|
|
217
224
|
className: "flex items-center gap-2 text-xs text-muted-foreground sm:shrink-0 sm:pt-0.5",
|
|
218
|
-
children: [t.kind !== "term" && /* @__PURE__ */
|
|
225
|
+
children: [t.kind !== "term" && /* @__PURE__ */ k("span", { children: a(`kind.${t.kind}`) }), i && /* @__PURE__ */ k(v, {
|
|
219
226
|
content: d.full(t.updatedAt),
|
|
220
|
-
children: /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ k("time", {
|
|
221
228
|
dateTime: t.updatedAt,
|
|
222
229
|
className: "tabular-nums",
|
|
223
230
|
children: d.relative(t.updatedAt)
|
|
@@ -228,4 +235,4 @@ function F({ workspace: e, title: t, entries: n, onOpen: r, showTime: i = !1 })
|
|
|
228
235
|
})]
|
|
229
236
|
});
|
|
230
237
|
}
|
|
231
|
-
export {
|
|
238
|
+
export { F as component };
|