@parallelworks/tandem-web 0.163.0 → 0.164.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 +6 -10
- package/_virtual/_virtual_i18n/es/common.js +6 -10
- package/_virtual/_virtual_i18n/ja/common.js +6 -10
- package/_virtual/_virtual_i18n/ko/common.js +6 -10
- package/_virtual/_virtual_i18n/zh/common.js +6 -10
- package/components/AgentWork.js +358 -396
- package/components/AreaWork.js +37 -36
- package/components/Editor.js +81 -77
- package/components/Graph.js +1 -1
- package/components/HoverCards.js +3 -3
- package/components/WorkCounts.js +1 -1
- package/components/editorPlugins.js +162 -126
- package/components/video.js +51 -0
- package/lib/attachments.js +30 -7
- package/lib/githubLink.js +13 -0
- package/lib/knowledge.js +97 -119
- package/lib/videoMarkdown.js +15 -0
- package/package.json +1 -1
- package/pages/areas.js +115 -119
- package/routes/_workspace/graph.js +1 -1
- package/routes/_workspace/knowledge/_term2.js +9 -9
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace2.js +12 -12
- package/styles.css +12 -0
- package/lib/decisionEntry.js +0 -23
|
@@ -12,8 +12,8 @@ import { uploadKnowledgeAttachment as _ } from "../../../lib/attachments.js";
|
|
|
12
12
|
import { useCan as v } from "../../../lib/roles.js";
|
|
13
13
|
import { AttachButton as y, UploadStatus as b, useFileUpload as x } from "../../../components/Attachments.js";
|
|
14
14
|
import { Editor as S } from "../../../components/Editor.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { KnowledgeStatus as C } from "../../../components/HoverCards.js";
|
|
16
|
+
import { Route as w } from "./_term.js";
|
|
17
17
|
import { Timeline as T, TimelineItem as E, activityIcon as D } from "../../../components/ActivityTimeline.js";
|
|
18
18
|
import { Button as O, ErrorText as k, PageHeader as A, Section as j, TitleInput as M, useOpenMenu as N } from "@parallelworks/ui";
|
|
19
19
|
import { Suspense as P, useCallback as F, useMemo as I, useRef as L, useState as R } from "react";
|
|
@@ -24,9 +24,9 @@ import { useQuery as W, useSuspenseQuery as G } from "@tanstack/react-query";
|
|
|
24
24
|
import { MoreButton as K } from "@parallelworks/ui/list";
|
|
25
25
|
// src/routes/$workspace/knowledge/$term.tsx?tsr-split=component
|
|
26
26
|
function q() {
|
|
27
|
-
let { workspace: r, term: a } =
|
|
27
|
+
let { workspace: r, term: a } = w.useParams(), o = B("knowledge"), c = B("common"), l = n(), d = N(), f = z(), { data: h } = G(i(r, a)), { data: g } = G(s(r)), C = m(r), T = v(r, "edit_docs"), E = T && !h.archivedAt, [D, j] = R(null), W = F((e) => j(e), []), q = te(r, W), X = L(null), Z = x((e) => _(r, h.id, e));
|
|
28
28
|
e(h.name);
|
|
29
|
-
let Q = I(() => g.filter((e) => e.supersededBy === h.id), [g, h.id]), $ = (e) =>
|
|
29
|
+
let Q = I(() => g.filter((e) => e.supersededBy === h.id), [g, h.id]), $ = (e) => C.update.mutate({
|
|
30
30
|
id: h.id,
|
|
31
31
|
...e,
|
|
32
32
|
ifVersion: h.version
|
|
@@ -48,7 +48,7 @@ function q() {
|
|
|
48
48
|
label: c("moreActionsFor", { name: h.name }),
|
|
49
49
|
visible: !0
|
|
50
50
|
}),
|
|
51
|
-
actions: /* @__PURE__ */ U(V, { children: [
|
|
51
|
+
actions: /* @__PURE__ */ U(V, { children: [C.update.isPending && /* @__PURE__ */ H("span", {
|
|
52
52
|
className: "text-xs text-muted-foreground",
|
|
53
53
|
role: "status",
|
|
54
54
|
children: c("saving")
|
|
@@ -78,7 +78,7 @@ function q() {
|
|
|
78
78
|
}), T && /* @__PURE__ */ H(O, {
|
|
79
79
|
type: "button",
|
|
80
80
|
size: "sm",
|
|
81
|
-
onClick: () =>
|
|
81
|
+
onClick: () => C.restore.mutate(h.id),
|
|
82
82
|
children: o("restore")
|
|
83
83
|
})]
|
|
84
84
|
}),
|
|
@@ -168,9 +168,9 @@ function q() {
|
|
|
168
168
|
})
|
|
169
169
|
]
|
|
170
170
|
}),
|
|
171
|
-
|
|
171
|
+
C.update.isError && /* @__PURE__ */ H(k, {
|
|
172
172
|
className: "mt-2",
|
|
173
|
-
children: f(
|
|
173
|
+
children: f(C.update.error)
|
|
174
174
|
})
|
|
175
175
|
]
|
|
176
176
|
}),
|
|
@@ -216,7 +216,7 @@ function J({ workspace: e, entry: n }) {
|
|
|
216
216
|
className: "space-y-1 text-xs text-muted-foreground",
|
|
217
217
|
children: [/* @__PURE__ */ U("p", {
|
|
218
218
|
className: "flex flex-wrap items-center gap-x-1.5 gap-y-1",
|
|
219
|
-
children: [(n.kind !== "term" || n.status
|
|
219
|
+
children: [(n.kind !== "term" || n.status !== "decided") && /* @__PURE__ */ H(C, { status: n.status }), p.map((e, t) => /* @__PURE__ */ U("span", {
|
|
220
220
|
className: "inline-flex items-center gap-1.5",
|
|
221
221
|
children: [t > 0 && /* @__PURE__ */ H("span", {
|
|
222
222
|
"aria-hidden": "true",
|
|
@@ -5,8 +5,8 @@ import { AddIcon as a, LibraryIcon as o } from "../../../components/icons.js";
|
|
|
5
5
|
import { kinds as s, termRef as c } from "../../../lib/knowledgeKinds.js";
|
|
6
6
|
import { EntryDialog as l, useKnowledgeMenu as u } from "../../../lib/knowledge.js";
|
|
7
7
|
import { useTime as d } from "../../../lib/time.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { KnowledgeStatus as f } from "../../../components/HoverCards.js";
|
|
9
|
+
import { Route as p } from "./index.js";
|
|
10
10
|
import { FavoriteStar as m } from "../../../components/FavoriteStar.js";
|
|
11
11
|
import { Button as h, EmptyState as g, SearchInput as _, SegmentedControl as v, buttonClasses as y, useOpenMenu as b } from "@parallelworks/ui";
|
|
12
12
|
import { Suspense as x, useCallback as S, useEffect as C, useMemo as w, useState as T } from "react";
|
|
@@ -16,7 +16,7 @@ import { useQuery as j, useSuspenseQuery as M } from "@tanstack/react-query";
|
|
|
16
16
|
// src/routes/$workspace/knowledge/index.tsx?tsr-split=component
|
|
17
17
|
var N = 5, P = 8;
|
|
18
18
|
function F() {
|
|
19
|
-
let { workspace: u } =
|
|
19
|
+
let { workspace: u } = p.useParams(), { archived: d, kind: f = "all" } = p.useSearch(), b = D("knowledge"), F = E();
|
|
20
20
|
e(b("title"));
|
|
21
21
|
let L = n(), [R, z] = T(""), [B, V] = T(""), [H, U] = T(null);
|
|
22
22
|
C(() => {
|
|
@@ -29,7 +29,7 @@ function F() {
|
|
|
29
29
|
}, { data: q } = j({
|
|
30
30
|
...i(u, K),
|
|
31
31
|
enabled: !!B || !!d
|
|
32
|
-
}), J = !!B || !!d, Y = J ? q ?? [] : W, X =
|
|
32
|
+
}), J = !!B || !!d, Y = J ? q ?? [] : W, X = f === "all" ? Y : Y.filter((e) => e.kind === f), Z = S((e) => U(e), []), Q = w(() => {
|
|
33
33
|
let e = /* @__PURE__ */ new Map();
|
|
34
34
|
for (let t of Y) e.set(t.kind, (e.get(t.kind) ?? 0) + 1);
|
|
35
35
|
return e;
|
|
@@ -57,7 +57,7 @@ function F() {
|
|
|
57
57
|
...e !== "all" && { kind: e }
|
|
58
58
|
},
|
|
59
59
|
replace: !0
|
|
60
|
-
}), $ = s.filter((e) => Q.has(e) || e ===
|
|
60
|
+
}), $ = s.filter((e) => Q.has(e) || e === f);
|
|
61
61
|
return /* @__PURE__ */ A("div", {
|
|
62
62
|
className: "flex h-full flex-col",
|
|
63
63
|
children: [
|
|
@@ -112,7 +112,7 @@ function F() {
|
|
|
112
112
|
children: [$.length > 1 && /* @__PURE__ */ k(v, {
|
|
113
113
|
label: b("kindLabel"),
|
|
114
114
|
size: "sm",
|
|
115
|
-
value:
|
|
115
|
+
value: f,
|
|
116
116
|
onValueChange: ne,
|
|
117
117
|
options: [{
|
|
118
118
|
value: "all",
|
|
@@ -128,7 +128,7 @@ function F() {
|
|
|
128
128
|
params: { workspace: u },
|
|
129
129
|
search: {
|
|
130
130
|
...!d && { archived: !0 },
|
|
131
|
-
...
|
|
131
|
+
...f !== "all" && { kind: f }
|
|
132
132
|
},
|
|
133
133
|
"aria-current": d || void 0,
|
|
134
134
|
className: `${y({
|
|
@@ -140,9 +140,9 @@ function F() {
|
|
|
140
140
|
}),
|
|
141
141
|
X.length === 0 ? /* @__PURE__ */ k(g, {
|
|
142
142
|
icon: /* @__PURE__ */ k(o, {}),
|
|
143
|
-
title: b(J ||
|
|
144
|
-
description: J ||
|
|
145
|
-
action: !J &&
|
|
143
|
+
title: b(J || f !== "all" ? "noMatches" : "emptyTitle"),
|
|
144
|
+
description: J || f !== "all" ? void 0 : b("empty"),
|
|
145
|
+
action: !J && f === "all" ? /* @__PURE__ */ k(h, {
|
|
146
146
|
type: "button",
|
|
147
147
|
variant: "primary",
|
|
148
148
|
onClick: () => Z({ kind: "create" }),
|
|
@@ -185,7 +185,7 @@ function F() {
|
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
function I({ workspace: e, title: n, entries: r, onOpen: i, showTime: a = !1 }) {
|
|
188
|
-
let o = D("knowledge"), s = b(), l = u(e, i),
|
|
188
|
+
let o = D("knowledge"), s = b(), l = u(e, i), p = d();
|
|
189
189
|
return /* @__PURE__ */ A("section", {
|
|
190
190
|
"aria-label": n,
|
|
191
191
|
className: "mt-10",
|
|
@@ -214,16 +214,16 @@ function I({ workspace: e, title: n, entries: r, onOpen: i, showTime: a = !1 })
|
|
|
214
214
|
className: "mt-0.5 line-clamp-2 text-xs leading-5 text-muted-foreground",
|
|
215
215
|
children: n.definition
|
|
216
216
|
})]
|
|
217
|
-
}), (n.kind !== "term" || a) && /* @__PURE__ */ A("span", {
|
|
217
|
+
}), (n.kind !== "term" || n.status === "added" || a) && /* @__PURE__ */ A("span", {
|
|
218
218
|
className: "flex items-center gap-2 text-xs text-muted-foreground sm:shrink-0 sm:pt-0.5",
|
|
219
219
|
children: [
|
|
220
220
|
n.kind !== "term" && /* @__PURE__ */ k("span", { children: o(`kind.${n.kind}`) }),
|
|
221
|
-
n.
|
|
221
|
+
n.status === "added" && /* @__PURE__ */ k(f, { status: n.status }),
|
|
222
222
|
a && /* @__PURE__ */ k("time", {
|
|
223
223
|
dateTime: n.updatedAt,
|
|
224
|
-
title:
|
|
224
|
+
title: p.full(n.updatedAt),
|
|
225
225
|
className: "tabular-nums",
|
|
226
|
-
children:
|
|
226
|
+
children: p.relative(n.updatedAt)
|
|
227
227
|
})
|
|
228
228
|
]
|
|
229
229
|
})]
|
package/routes/_workspace2.js
CHANGED
|
@@ -17,15 +17,15 @@ import { teamPageOf as ye, teamPath as be } from "../lib/teamPaths.js";
|
|
|
17
17
|
import { SettingsNav as xe } from "../components/SettingsNav.js";
|
|
18
18
|
import { useSavedViews as y, useViewMenu as b, viewHref as Se } from "../lib/views.js";
|
|
19
19
|
import { PersonHoverCard as x } from "../components/PersonHoverCard.js";
|
|
20
|
-
import {
|
|
20
|
+
import { HoverCards as Ce } from "../components/HoverCards.js";
|
|
21
|
+
import { useShortcuts as we } from "../lib/shortcuts.js";
|
|
21
22
|
import { AppLauncher as S } from "../components/AppLauncher.js";
|
|
22
|
-
import { PaletteSelectionContext as
|
|
23
|
-
import { CommandPalette as
|
|
24
|
-
import { DocsTree as
|
|
25
|
-
import { FavoritesNav as
|
|
23
|
+
import { PaletteSelectionContext as Te } from "../lib/palette.js";
|
|
24
|
+
import { CommandPalette as Ee } from "../components/CommandPalette.js";
|
|
25
|
+
import { DocsTree as De } from "../components/DocsTree.js";
|
|
26
|
+
import { FavoritesNav as Oe } from "../components/FavoritesNav.js";
|
|
26
27
|
import { HostActions as C } from "../components/HostActions.js";
|
|
27
28
|
import { HostPanel as w } from "../components/HostPanel.js";
|
|
28
|
-
import { HoverCards as Oe } from "../components/HoverCards.js";
|
|
29
29
|
import { Logo as ke } from "../components/Logo.js";
|
|
30
30
|
import { CreateTeamDialog as Ae } from "../components/TeamForm.js";
|
|
31
31
|
import { NewIssueDialog as je } from "../components/NewIssueDialog.js";
|
|
@@ -123,7 +123,7 @@ function U() {
|
|
|
123
123
|
...Nt && { team: Nt },
|
|
124
124
|
...e
|
|
125
125
|
}), [Nt]);
|
|
126
|
-
|
|
126
|
+
we({ c: () => Z() }, y === null);
|
|
127
127
|
let [Pt, Q] = A(!1), [Ft, It] = A([]);
|
|
128
128
|
if (k(() => {
|
|
129
129
|
let e = (e) => {
|
|
@@ -343,7 +343,7 @@ function U() {
|
|
|
343
343
|
className: "bg-agent! text-agent-foreground!"
|
|
344
344
|
})
|
|
345
345
|
}),
|
|
346
|
-
!n && /* @__PURE__ */ N(
|
|
346
|
+
!n && /* @__PURE__ */ N(De, {
|
|
347
347
|
workspace: f,
|
|
348
348
|
team: e,
|
|
349
349
|
current: et(J.pathname, f)
|
|
@@ -414,7 +414,7 @@ function U() {
|
|
|
414
414
|
workspace: f,
|
|
415
415
|
current: Ct.saved
|
|
416
416
|
}),
|
|
417
|
-
/* @__PURE__ */ N(
|
|
417
|
+
/* @__PURE__ */ N(Oe, {
|
|
418
418
|
workspace: f,
|
|
419
419
|
myUsername: p.user.username,
|
|
420
420
|
currentHref: J.pathname + J.searchStr
|
|
@@ -516,7 +516,7 @@ function U() {
|
|
|
516
516
|
actions: p.actions ?? [],
|
|
517
517
|
children: /* @__PURE__ */ N(he.Provider, {
|
|
518
518
|
value: Z,
|
|
519
|
-
children: /* @__PURE__ */ P(
|
|
519
|
+
children: /* @__PURE__ */ P(Te.Provider, {
|
|
520
520
|
value: It,
|
|
521
521
|
children: [
|
|
522
522
|
v ? /* @__PURE__ */ N(it, {
|
|
@@ -562,9 +562,9 @@ function U() {
|
|
|
562
562
|
footer: Ut,
|
|
563
563
|
children: /* @__PURE__ */ N(at, { children: /* @__PURE__ */ N(We, {}) })
|
|
564
564
|
}),
|
|
565
|
-
/* @__PURE__ */ N(
|
|
565
|
+
/* @__PURE__ */ N(Ce, { workspace: f }),
|
|
566
566
|
!Lt && /* @__PURE__ */ N(pt, {}),
|
|
567
|
-
/* @__PURE__ */ N(
|
|
567
|
+
/* @__PURE__ */ N(Ee, {
|
|
568
568
|
workspace: f,
|
|
569
569
|
open: Pt,
|
|
570
570
|
onClose: () => Q(!1),
|
package/styles.css
CHANGED
|
@@ -653,6 +653,18 @@ body[data-tandem] > :not(:has(.tandem)) {
|
|
|
653
653
|
border-radius: 0.375rem;
|
|
654
654
|
background: var(--color-muted);
|
|
655
655
|
}
|
|
656
|
+
/* Where a recording that won't play was: its link, and where to link
|
|
657
|
+
GitHub when that would let it play (unplayable). */
|
|
658
|
+
.prose-issue .recording-box,
|
|
659
|
+
.prose-issue .recording-unplayable {
|
|
660
|
+
display: block;
|
|
661
|
+
}
|
|
662
|
+
.prose-issue .recording-unplayable a.recording-hint {
|
|
663
|
+
display: block;
|
|
664
|
+
margin: 0.2em 0 0.4em;
|
|
665
|
+
font-size: 0.8125rem;
|
|
666
|
+
color: var(--color-muted-foreground);
|
|
667
|
+
}
|
|
656
668
|
/* An attached file reads as a chip with its size, and downloads. */
|
|
657
669
|
.prose-issue a[href*="/api/v1/attachments/"] {
|
|
658
670
|
display: inline-flex;
|
package/lib/decisionEntry.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
function e(e, t) {
|
|
2
|
-
if (e.length <= t) return e;
|
|
3
|
-
let n = e.slice(0, t + 1), r = n.lastIndexOf(" ");
|
|
4
|
-
return `${n.slice(0, r > t / 2 ? r : t).trimEnd()}…`;
|
|
5
|
-
}
|
|
6
|
-
function t(t, n) {
|
|
7
|
-
let r = t.options.find((e) => e.id === t.answer?.optionId), i = [r?.label, t.answer?.text?.trim()].filter(Boolean).join(". "), a = (t.prompt.split("\n").find((e) => e.trim()) ?? "").replace(/^#+\s*/, "").trim(), o = r?.label.trim() ?? "";
|
|
8
|
-
return {
|
|
9
|
-
kind: "decision",
|
|
10
|
-
status: "decided",
|
|
11
|
-
name: e(o.split(/\s+/).length >= 2 ? o : a.replace(/[?.!:]+$/, ""), 60),
|
|
12
|
-
definition: n({
|
|
13
|
-
question: a,
|
|
14
|
-
answer: i
|
|
15
|
-
}).slice(0, 1e3),
|
|
16
|
-
team: t.identifier.split("-")[0] ?? "",
|
|
17
|
-
source: {
|
|
18
|
-
issue: t.identifier,
|
|
19
|
-
decision: t.id
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export { e as clip, t as decisionDefaults };
|