@parallelworks/tandem-web 0.178.1 → 0.179.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 -15
- package/_virtual/_virtual_i18n/es/common.js +3 -15
- package/_virtual/_virtual_i18n/ja/common.js +3 -15
- package/_virtual/_virtual_i18n/ko/common.js +3 -15
- package/_virtual/_virtual_i18n/zh/common.js +3 -15
- package/components/AgentWork.js +313 -308
- package/components/AreaWork.js +38 -43
- package/components/Graph.js +1 -1
- package/components/HoverCards.js +109 -122
- package/components/editorPlugins.js +107 -101
- package/lib/knowledge.js +0 -6
- package/lib/permissionModes.js +7 -1
- package/package.json +1 -1
- package/routes/_workspace/agents/_slug2.js +202 -194
- package/routes/_workspace/graph.js +1 -5
- package/routes/_workspace/graph2.js +16 -17
- package/routes/_workspace/graph3.js +70 -82
- package/routes/_workspace/knowledge/_term2.js +126 -130
- package/routes/_workspace/knowledge/index2.js +125 -130
- package/styles.css +8 -0
|
@@ -2,127 +2,126 @@ import { areasQuery as e, knowledgeEntryQuery as t, knowledgeEventsQuery as n, k
|
|
|
2
2
|
import { Timeline as a, TimelineItem as o, activityIcon as s } from "../../../components/ActivityTimeline.js";
|
|
3
3
|
import { AttachButton as c, UploadStatus as l, useFileUpload as u } from "../../../components/Attachments.js";
|
|
4
4
|
import { Editor as d } from "../../../components/Editor.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { EntryDialog as y, useKnowledgeActions as ee, useKnowledgeMenu as b } from "../../../lib/knowledge.js";
|
|
5
|
+
import { FileTextIcon as f, LibraryIcon as p, StatusIcon as m } from "../../../components/icons.js";
|
|
6
|
+
import { uploadKnowledgeAttachment as h } from "../../../lib/attachments.js";
|
|
7
|
+
import { docRef as g } from "../../../lib/docs.js";
|
|
8
|
+
import { headingAnchor as _ } from "../../../lib/glossary.js";
|
|
9
|
+
import { EntryDialog as v, useKnowledgeActions as y, useKnowledgeMenu as b } from "../../../lib/knowledge.js";
|
|
11
10
|
import { termRef as x } from "../../../lib/knowledgeKinds.js";
|
|
12
|
-
import { usePageTitle as
|
|
13
|
-
import { usePeople as
|
|
14
|
-
import { useCan as
|
|
15
|
-
import { Link as w, useNavigate as
|
|
16
|
-
import { useTime as
|
|
17
|
-
import { Route as
|
|
18
|
-
import { Button as
|
|
19
|
-
import { Suspense as
|
|
20
|
-
import { useErrorMessage as
|
|
21
|
-
import { useTranslations as
|
|
22
|
-
import { Fragment as
|
|
23
|
-
import { useQuery as
|
|
24
|
-
import { MoreButton as
|
|
11
|
+
import { usePageTitle as S } from "../../../lib/pageTitle.js";
|
|
12
|
+
import { usePeople as C } from "../../../lib/people.js";
|
|
13
|
+
import { useCan as ee } from "../../../lib/roles.js";
|
|
14
|
+
import { Link as w, useNavigate as te } from "../../../lib/router.js";
|
|
15
|
+
import { useTime as T } from "../../../lib/time.js";
|
|
16
|
+
import { Route as E } from "./_term.js";
|
|
17
|
+
import { Button as D, ErrorText as O, PageHeader as ne, Section as k, TitleInput as A, Tooltip as j, useOpenMenu as M } from "@parallelworks/ui";
|
|
18
|
+
import { Suspense as N, useCallback as P, useMemo as F, useRef as I, useState as L } from "react";
|
|
19
|
+
import { useErrorMessage as R } from "@parallelworks/problem/react";
|
|
20
|
+
import { useTranslations as z } from "use-intl";
|
|
21
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
22
|
+
import { useQuery as U, useSuspenseQuery as W } from "@tanstack/react-query";
|
|
23
|
+
import { MoreButton as G } from "@parallelworks/ui/list";
|
|
25
24
|
// src/routes/$workspace/knowledge/$term.tsx?tsr-split=component
|
|
26
|
-
function
|
|
27
|
-
let { workspace: e, term: n } =
|
|
28
|
-
|
|
29
|
-
let Q =
|
|
30
|
-
id:
|
|
25
|
+
function K() {
|
|
26
|
+
let { workspace: e, term: n } = E.useParams(), r = z("knowledge"), a = z("common"), o = te(), s = M(), f = R(), { data: m } = W(t(e, n)), { data: g } = W(i(e)), _ = y(e), C = ee(e, "edit_docs"), T = C && !m.archivedAt, [k, j] = L(null), U = P((e) => j(e), []), K = b(e, U), X = I(null), Z = u((t) => h(e, m.id, t));
|
|
27
|
+
S(m.name);
|
|
28
|
+
let Q = F(() => g.filter((e) => e.supersededBy === m.id), [g, m.id]), $ = (e) => _.update.mutate({
|
|
29
|
+
id: m.id,
|
|
31
30
|
...e,
|
|
32
|
-
ifVersion:
|
|
33
|
-
}), re =
|
|
34
|
-
return /* @__PURE__ */
|
|
31
|
+
ifVersion: m.version
|
|
32
|
+
}), re = m.status === "superseded";
|
|
33
|
+
return /* @__PURE__ */ H("div", {
|
|
35
34
|
className: "flex h-full min-h-0 flex-col",
|
|
36
35
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ V(ne, {
|
|
38
37
|
heading: !1,
|
|
39
38
|
breadcrumbs: [{
|
|
40
39
|
label: r("title"),
|
|
41
40
|
href: `/${e}/knowledge`
|
|
42
41
|
}, {
|
|
43
|
-
label:
|
|
44
|
-
icon: /* @__PURE__ */
|
|
42
|
+
label: m.name,
|
|
43
|
+
icon: /* @__PURE__ */ V(p, { className: "size-4 text-muted-foreground" })
|
|
45
44
|
}],
|
|
46
|
-
titleActions: /* @__PURE__ */
|
|
47
|
-
items: () =>
|
|
48
|
-
label: a("moreActionsFor", { name:
|
|
45
|
+
titleActions: /* @__PURE__ */ V(G, {
|
|
46
|
+
items: () => K(m),
|
|
47
|
+
label: a("moreActionsFor", { name: m.name }),
|
|
49
48
|
visible: !0
|
|
50
49
|
}),
|
|
51
|
-
actions: /* @__PURE__ */
|
|
50
|
+
actions: /* @__PURE__ */ H(B, { children: [_.update.isPending && /* @__PURE__ */ V("span", {
|
|
52
51
|
className: "text-xs text-muted-foreground",
|
|
53
52
|
role: "status",
|
|
54
53
|
children: a("saving")
|
|
55
|
-
}),
|
|
54
|
+
}), T && /* @__PURE__ */ V(D, {
|
|
56
55
|
type: "button",
|
|
57
56
|
size: "sm",
|
|
58
|
-
onClick: () =>
|
|
57
|
+
onClick: () => U({
|
|
59
58
|
kind: "edit",
|
|
60
|
-
entry:
|
|
59
|
+
entry: m
|
|
61
60
|
}),
|
|
62
61
|
children: r("editDetails")
|
|
63
62
|
})] })
|
|
64
63
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ V("div", {
|
|
66
65
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
67
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ H("article", {
|
|
68
67
|
className: "mx-auto w-full max-w-3xl px-4 pt-6 pb-20 md:px-8 md:pt-10",
|
|
69
68
|
onContextMenu: (e) => {
|
|
70
|
-
e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || s(e,
|
|
69
|
+
e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || s(e, K(m));
|
|
71
70
|
},
|
|
72
71
|
children: [
|
|
73
|
-
|
|
72
|
+
m.archivedAt && /* @__PURE__ */ H("div", {
|
|
74
73
|
className: "mb-6 flex items-center gap-3 rounded-xl border border-border bg-muted px-3 py-2 text-sm",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ V("span", {
|
|
76
75
|
className: "min-w-0 flex-1",
|
|
77
76
|
children: r("archivedNotice")
|
|
78
|
-
}),
|
|
77
|
+
}), C && /* @__PURE__ */ V(D, {
|
|
79
78
|
type: "button",
|
|
80
79
|
size: "sm",
|
|
81
|
-
onClick: () => _.restore.mutate(
|
|
80
|
+
onClick: () => _.restore.mutate(m.id),
|
|
82
81
|
children: r("restore")
|
|
83
82
|
})]
|
|
84
83
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ V(q, {
|
|
86
85
|
workspace: e,
|
|
87
|
-
entry:
|
|
86
|
+
entry: m
|
|
88
87
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ V("h1", {
|
|
90
89
|
className: "sr-only",
|
|
91
|
-
children:
|
|
90
|
+
children: m.name
|
|
92
91
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
value:
|
|
92
|
+
/* @__PURE__ */ V(A, {
|
|
93
|
+
value: m.name,
|
|
95
94
|
onCommit: (e) => $({ name: e }),
|
|
96
|
-
readOnly: !
|
|
95
|
+
readOnly: !T,
|
|
97
96
|
"aria-label": r("name"),
|
|
98
97
|
maxLength: 100,
|
|
99
98
|
className: re ? "mt-2 text-muted-foreground line-through" : "mt-2"
|
|
100
99
|
}),
|
|
101
|
-
|
|
100
|
+
m.aliases.length > 0 && /* @__PURE__ */ V("p", {
|
|
102
101
|
className: "mt-1 text-sm text-muted-foreground",
|
|
103
|
-
children: r("alsoCalled", { names:
|
|
102
|
+
children: r("alsoCalled", { names: m.aliases.join(", ") })
|
|
104
103
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
value:
|
|
104
|
+
/* @__PURE__ */ V(A, {
|
|
105
|
+
value: m.definition,
|
|
107
106
|
onCommit: (e) => $({ definition: e }),
|
|
108
|
-
readOnly: !
|
|
107
|
+
readOnly: !T,
|
|
109
108
|
"aria-label": r("definition"),
|
|
110
109
|
placeholder: r("definitionPlaceholder"),
|
|
111
110
|
maxLength: 1e3,
|
|
112
111
|
size: "lg",
|
|
113
112
|
className: "mt-3 text-base leading-relaxed font-normal tracking-normal text-muted-foreground"
|
|
114
113
|
}),
|
|
115
|
-
(
|
|
114
|
+
(m.supersededBy || Q.length > 0) && /* @__PURE__ */ H("div", {
|
|
116
115
|
className: "mt-3 space-y-1 text-sm",
|
|
117
|
-
children: [
|
|
116
|
+
children: [m.supersededBy && /* @__PURE__ */ V(w, {
|
|
118
117
|
to: "/$workspace/knowledge/$term",
|
|
119
118
|
params: {
|
|
120
119
|
workspace: e,
|
|
121
|
-
term: x(
|
|
120
|
+
term: x(g.find((e) => e.id === m.supersededBy) ?? { id: m.supersededBy })
|
|
122
121
|
},
|
|
123
122
|
className: "block text-primary hover:underline",
|
|
124
|
-
children: r("supersededBy", { name:
|
|
125
|
-
}), Q.map((t) => /* @__PURE__ */
|
|
123
|
+
children: r("supersededBy", { name: m.supersededByName ?? "" })
|
|
124
|
+
}), Q.map((t) => /* @__PURE__ */ V(w, {
|
|
126
125
|
to: "/$workspace/knowledge/$term",
|
|
127
126
|
params: {
|
|
128
127
|
workspace: e,
|
|
@@ -132,120 +131,120 @@ function q() {
|
|
|
132
131
|
children: r("replaces", { name: t.name })
|
|
133
132
|
}, t.id))]
|
|
134
133
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ H("section", {
|
|
136
135
|
"aria-label": r("page"),
|
|
137
136
|
className: "mt-8 border-t border-border pt-6",
|
|
138
137
|
children: [
|
|
139
|
-
|
|
140
|
-
value:
|
|
141
|
-
editable:
|
|
138
|
+
T || m.body ? /* @__PURE__ */ V(d, {
|
|
139
|
+
value: m.body ?? "",
|
|
140
|
+
editable: T,
|
|
142
141
|
placeholder: r("pagePlaceholder"),
|
|
143
142
|
label: r("page"),
|
|
144
|
-
onBlur: (e) => e !== (
|
|
145
|
-
onFiles: (e, t) => Z.upload(
|
|
143
|
+
onBlur: (e) => e !== (m.body ?? "") && $({ body: e }),
|
|
144
|
+
onFiles: (e, t) => Z.upload(X.current, e, t),
|
|
146
145
|
onEditor: (e) => {
|
|
147
|
-
|
|
146
|
+
X.current = e;
|
|
148
147
|
},
|
|
149
148
|
className: "min-h-32 [&>:first-child]:mt-0"
|
|
150
|
-
}) : /* @__PURE__ */
|
|
149
|
+
}) : /* @__PURE__ */ V("p", {
|
|
151
150
|
className: "text-sm text-muted-foreground",
|
|
152
151
|
children: r("noPage")
|
|
153
152
|
}),
|
|
154
|
-
|
|
153
|
+
T && /* @__PURE__ */ H("div", {
|
|
155
154
|
className: "mt-3 flex items-center gap-2",
|
|
156
155
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ V(c, { onFiles: (e) => Z.upload(X.current, e) }),
|
|
157
|
+
/* @__PURE__ */ V("span", {
|
|
159
158
|
className: "text-xs text-muted-foreground",
|
|
160
159
|
children: r("attachHint")
|
|
161
160
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ V("span", {
|
|
163
162
|
className: "ml-auto",
|
|
164
|
-
children: /* @__PURE__ */
|
|
163
|
+
children: /* @__PURE__ */ V(l, {
|
|
165
164
|
pending: Z.pending,
|
|
166
165
|
error: Z.error
|
|
167
166
|
})
|
|
168
167
|
})
|
|
169
168
|
]
|
|
170
169
|
}),
|
|
171
|
-
_.update.isError && /* @__PURE__ */
|
|
170
|
+
_.update.isError && /* @__PURE__ */ V(O, {
|
|
172
171
|
className: "mt-2",
|
|
173
172
|
children: f(_.update.error)
|
|
174
173
|
})
|
|
175
174
|
]
|
|
176
175
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(J, {
|
|
178
177
|
workspace: e,
|
|
179
|
-
entryId:
|
|
178
|
+
entryId: m.id
|
|
180
179
|
}) }),
|
|
181
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(Y, {
|
|
182
181
|
workspace: e,
|
|
183
|
-
entryId:
|
|
182
|
+
entryId: m.id
|
|
184
183
|
}) })
|
|
185
184
|
]
|
|
186
185
|
})
|
|
187
186
|
}),
|
|
188
|
-
|
|
187
|
+
k && /* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(v, {
|
|
189
188
|
workspace: e,
|
|
190
|
-
mode:
|
|
191
|
-
onClose: () =>
|
|
189
|
+
mode: k,
|
|
190
|
+
onClose: () => j(null),
|
|
192
191
|
onSaved: (t) => o({
|
|
193
192
|
to: "/$workspace/knowledge/$term",
|
|
194
193
|
params: {
|
|
195
194
|
workspace: e,
|
|
196
195
|
term: x(t)
|
|
197
196
|
},
|
|
198
|
-
replace: t.id ===
|
|
197
|
+
replace: t.id === m.id
|
|
199
198
|
})
|
|
200
199
|
}) })
|
|
201
200
|
]
|
|
202
201
|
});
|
|
203
202
|
}
|
|
204
|
-
function
|
|
205
|
-
let r =
|
|
203
|
+
function q({ workspace: t, entry: n }) {
|
|
204
|
+
let r = z("knowledge"), { actorName: i } = C(t), a = T(), { data: o = [] } = U(e(t)), s = o.find((e) => e.id === n.areaId), c = n.source.doc, l = [
|
|
206
205
|
...n.kind === "term" ? [] : [r(`kind.${n.kind}`)],
|
|
207
206
|
...s ? [s.title] : [],
|
|
208
207
|
r("writtenBy", { name: i(n.creator) }),
|
|
209
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ V(j, {
|
|
210
209
|
content: a.full(n.updatedAt),
|
|
211
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ V("time", {
|
|
212
211
|
dateTime: n.updatedAt,
|
|
213
212
|
children: r("updated", { when: a.relative(n.updatedAt) })
|
|
214
213
|
})
|
|
215
214
|
}, "updated")
|
|
216
215
|
];
|
|
217
|
-
return /* @__PURE__ */
|
|
216
|
+
return /* @__PURE__ */ H("div", {
|
|
218
217
|
className: "space-y-1 text-xs text-muted-foreground",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ V("p", {
|
|
220
219
|
className: "flex flex-wrap items-center gap-x-1.5 gap-y-1",
|
|
221
|
-
children:
|
|
220
|
+
children: l.map((e, t) => /* @__PURE__ */ H("span", {
|
|
222
221
|
className: "inline-flex items-center gap-1.5",
|
|
223
|
-
children: [t > 0 && /* @__PURE__ */
|
|
222
|
+
children: [t > 0 && /* @__PURE__ */ V("span", {
|
|
224
223
|
"aria-hidden": "true",
|
|
225
224
|
children: "·"
|
|
226
225
|
}), e]
|
|
227
|
-
}, t))
|
|
228
|
-
}), (c || n.source.identifier) && /* @__PURE__ */
|
|
226
|
+
}, t))
|
|
227
|
+
}), (c || n.source.identifier) && /* @__PURE__ */ H("p", {
|
|
229
228
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
230
229
|
children: [
|
|
231
|
-
c && /* @__PURE__ */
|
|
230
|
+
c && /* @__PURE__ */ H(w, {
|
|
232
231
|
to: "/$workspace/docs/$doc",
|
|
233
232
|
params: {
|
|
234
233
|
workspace: t,
|
|
235
|
-
doc:
|
|
234
|
+
doc: g(c)
|
|
236
235
|
},
|
|
237
|
-
...n.source.section && { hash:
|
|
236
|
+
...n.source.section && { hash: _(n.source.section) },
|
|
238
237
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ V(f, { className: "size-3" }), n.source.section ? r("sourceSection", {
|
|
240
239
|
doc: c.title,
|
|
241
240
|
section: n.source.section
|
|
242
241
|
}) : c.title]
|
|
243
242
|
}),
|
|
244
|
-
n.source.missing && /* @__PURE__ */
|
|
243
|
+
n.source.missing && /* @__PURE__ */ V("span", {
|
|
245
244
|
className: "text-warning",
|
|
246
245
|
children: r("sourceMissing", { section: n.source.section ?? "" })
|
|
247
246
|
}),
|
|
248
|
-
n.source.identifier && /* @__PURE__ */
|
|
247
|
+
n.source.identifier && /* @__PURE__ */ H(w, {
|
|
249
248
|
to: "/$workspace/issues/$identifier",
|
|
250
249
|
params: {
|
|
251
250
|
workspace: t,
|
|
@@ -262,25 +261,25 @@ function J({ workspace: t, entry: n }) {
|
|
|
262
261
|
})]
|
|
263
262
|
});
|
|
264
263
|
}
|
|
265
|
-
function
|
|
266
|
-
let n =
|
|
264
|
+
function J({ workspace: e, entryId: t }) {
|
|
265
|
+
let n = z("knowledge"), { data: i } = U(r(e, t));
|
|
267
266
|
if (!i) return null;
|
|
268
267
|
let a = i.issues.length + i.docs.length, o = "flex min-h-10 items-center gap-2.5 px-3 py-2 text-sm hover:bg-muted focus-visible:outline-offset-[-2px]";
|
|
269
|
-
return /* @__PURE__ */
|
|
268
|
+
return /* @__PURE__ */ H("section", {
|
|
270
269
|
"aria-label": n("mentionedIn"),
|
|
271
270
|
className: "mt-12",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
273
272
|
className: "mb-3 flex items-baseline gap-2 text-base font-semibold",
|
|
274
|
-
children: [n("mentionedIn"), a > 0 && /* @__PURE__ */
|
|
273
|
+
children: [n("mentionedIn"), a > 0 && /* @__PURE__ */ V("span", {
|
|
275
274
|
className: "text-xs font-normal text-muted-foreground tabular-nums",
|
|
276
275
|
children: a
|
|
277
276
|
})]
|
|
278
|
-
}), a === 0 ? /* @__PURE__ */
|
|
277
|
+
}), a === 0 ? /* @__PURE__ */ V("p", {
|
|
279
278
|
className: "text-sm text-muted-foreground",
|
|
280
279
|
children: n("mentionedNone")
|
|
281
|
-
}) : /* @__PURE__ */
|
|
280
|
+
}) : /* @__PURE__ */ H("ul", {
|
|
282
281
|
className: "divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
|
|
283
|
-
children: [i.issues.map((t) => /* @__PURE__ */
|
|
282
|
+
children: [i.issues.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(w, {
|
|
284
283
|
to: "/$workspace/issues/$identifier",
|
|
285
284
|
params: {
|
|
286
285
|
workspace: e,
|
|
@@ -288,33 +287,33 @@ function Y({ workspace: e, entryId: t }) {
|
|
|
288
287
|
},
|
|
289
288
|
className: o,
|
|
290
289
|
children: [
|
|
291
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ V(m, {
|
|
292
291
|
category: t.statusCategory,
|
|
293
292
|
className: "size-3.5 shrink-0"
|
|
294
293
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ V("span", {
|
|
296
295
|
className: "min-w-24 shrink-0 text-xs whitespace-nowrap text-muted-foreground tabular-nums",
|
|
297
296
|
children: t.identifier
|
|
298
297
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ V("span", {
|
|
300
299
|
className: "min-w-0 truncate",
|
|
301
300
|
children: t.title
|
|
302
301
|
})
|
|
303
302
|
]
|
|
304
|
-
}) }, t.identifier)), i.docs.map((t) => /* @__PURE__ */
|
|
303
|
+
}) }, t.identifier)), i.docs.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(w, {
|
|
305
304
|
to: "/$workspace/docs/$doc",
|
|
306
305
|
params: {
|
|
307
306
|
workspace: e,
|
|
308
|
-
doc:
|
|
307
|
+
doc: g(t)
|
|
309
308
|
},
|
|
310
309
|
className: o,
|
|
311
310
|
children: [
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ V(f, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
312
|
+
/* @__PURE__ */ V("span", {
|
|
314
313
|
className: "w-16 shrink-0 text-xs text-muted-foreground",
|
|
315
314
|
children: n("doc")
|
|
316
315
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ V("span", {
|
|
318
317
|
className: "min-w-0 truncate",
|
|
319
318
|
children: t.title
|
|
320
319
|
})
|
|
@@ -323,27 +322,27 @@ function Y({ workspace: e, entryId: t }) {
|
|
|
323
322
|
})]
|
|
324
323
|
});
|
|
325
324
|
}
|
|
326
|
-
function
|
|
327
|
-
let r =
|
|
328
|
-
return i.length === 0 ? null : /* @__PURE__ */
|
|
325
|
+
function Y({ workspace: e, entryId: t }) {
|
|
326
|
+
let r = z("knowledge.history"), { data: i = [] } = U(n(e, t)), { actorName: c } = C(e);
|
|
327
|
+
return i.length === 0 ? null : /* @__PURE__ */ V(k, {
|
|
329
328
|
title: r("title"),
|
|
330
329
|
variant: "bare",
|
|
331
330
|
defaultOpen: !1,
|
|
332
331
|
headingLevel: 2,
|
|
333
332
|
className: "mt-10",
|
|
334
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ V(a, { children: i.map((t) => /* @__PURE__ */ V(o, {
|
|
335
334
|
workspace: e,
|
|
336
335
|
icon: s(t.type, t.data),
|
|
337
336
|
actor: t.actor,
|
|
338
337
|
at: t.createdAt,
|
|
339
|
-
children:
|
|
338
|
+
children: X(r, t, c(t.actor))
|
|
340
339
|
}, t.id)) })
|
|
341
340
|
});
|
|
342
341
|
}
|
|
343
|
-
function
|
|
342
|
+
function X(e, t, n) {
|
|
344
343
|
let r = t.data ?? {}, i = {
|
|
345
344
|
name: n,
|
|
346
|
-
actor: (e) => /* @__PURE__ */
|
|
345
|
+
actor: (e) => /* @__PURE__ */ V("span", {
|
|
347
346
|
className: "font-medium text-foreground",
|
|
348
347
|
children: e
|
|
349
348
|
})
|
|
@@ -356,13 +355,10 @@ function Z(e, t, n) {
|
|
|
356
355
|
});
|
|
357
356
|
case "knowledge.archived": return e.rich("archived", i);
|
|
358
357
|
case "knowledge.restored": return e.rich("restored", i);
|
|
359
|
-
default: {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
fields: Object.keys(r).length
|
|
364
|
-
});
|
|
365
|
-
}
|
|
358
|
+
default: return e.rich("revised", {
|
|
359
|
+
...i,
|
|
360
|
+
fields: Object.keys(r).length
|
|
361
|
+
});
|
|
366
362
|
}
|
|
367
363
|
}
|
|
368
|
-
export {
|
|
364
|
+
export { K as component };
|