@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
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { kinds as e
|
|
2
|
-
import { rememberSearch as
|
|
3
|
-
import { redirect as
|
|
4
|
-
import { createFileRoute as
|
|
1
|
+
import { kinds as e } from "./graph.js";
|
|
2
|
+
import { rememberSearch as t } from "../../lib/listSearch.js";
|
|
3
|
+
import { redirect as n } from "../../lib/router.js";
|
|
4
|
+
import { createFileRoute as r, lazyFn as i, lazyRouteComponent as a } from "@tanstack/react-router";
|
|
5
5
|
// src/routes/$workspace/graph.tsx
|
|
6
|
-
var
|
|
6
|
+
var o = () => import("./graph3.js"), s = () => import("./graph4.js"), c = (e, t) => {
|
|
7
7
|
let n = (Array.isArray(e) ? e : typeof e == "string" ? e.split(",") : []).filter((e) => t.includes(e));
|
|
8
8
|
return n.length ? n : void 0;
|
|
9
|
-
},
|
|
10
|
-
validateSearch: (
|
|
11
|
-
let
|
|
9
|
+
}, l = r("/$workspace/graph")({
|
|
10
|
+
validateSearch: (t) => {
|
|
11
|
+
let n = c(t.kind, e);
|
|
12
12
|
return {
|
|
13
|
-
...typeof
|
|
14
|
-
...
|
|
15
|
-
...i && { status: i }
|
|
13
|
+
...typeof t.space == "string" && { space: t.space },
|
|
14
|
+
...n && { kind: n }
|
|
16
15
|
};
|
|
17
16
|
},
|
|
18
|
-
beforeLoad: ({ params: e, search:
|
|
19
|
-
let o =
|
|
20
|
-
if (o) throw
|
|
17
|
+
beforeLoad: ({ params: e, search: r, location: i, preload: a }) => {
|
|
18
|
+
let o = t(i.pathname, r, a);
|
|
19
|
+
if (o) throw n({
|
|
21
20
|
to: "/$workspace/graph",
|
|
22
21
|
params: e,
|
|
23
22
|
search: o,
|
|
@@ -25,7 +24,7 @@ var s = () => import("./graph3.js"), c = () => import("./graph4.js"), l = (e, t)
|
|
|
25
24
|
});
|
|
26
25
|
},
|
|
27
26
|
loaderDeps: ({ search: e }) => e,
|
|
28
|
-
loader:
|
|
29
|
-
component: o
|
|
27
|
+
loader: i(s, "loader"),
|
|
28
|
+
component: a(o, "component")
|
|
30
29
|
});
|
|
31
|
-
export {
|
|
30
|
+
export { l as Route };
|
|
@@ -1,113 +1,101 @@
|
|
|
1
|
-
import { kinds as e
|
|
2
|
-
import { teamsQuery as
|
|
3
|
-
import { GraphDrawing as
|
|
4
|
-
import { usePageTitle as
|
|
5
|
-
import { Route as
|
|
6
|
-
import { Disclosure as
|
|
7
|
-
import { useEffect as
|
|
8
|
-
import { useTranslations as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { useQuery as
|
|
1
|
+
import { kinds as e } from "./graph.js";
|
|
2
|
+
import { teamsQuery as t, workspaceGraphQuery as n, workspaceQuery as r } from "../../api/queries.js";
|
|
3
|
+
import { GraphDrawing as i, GraphList as a } from "../../components/Graph.js";
|
|
4
|
+
import { usePageTitle as o } from "../../lib/pageTitle.js";
|
|
5
|
+
import { Route as s } from "./graph2.js";
|
|
6
|
+
import { Disclosure as c, EmptyState as l, ToggleGroup as u } from "@parallelworks/ui";
|
|
7
|
+
import { useEffect as d, useRef as f, useState as p } from "react";
|
|
8
|
+
import { useTranslations as m } from "use-intl";
|
|
9
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
10
|
+
import { useQuery as _, useSuspenseQuery as v } from "@tanstack/react-query";
|
|
11
11
|
// src/routes/$workspace/graph.tsx?tsr-split=component
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let
|
|
12
|
+
function y() {
|
|
13
|
+
let y = m("graphPage");
|
|
14
|
+
o(y("title"));
|
|
15
|
+
let b = m("graph"), { workspace: x } = s.useParams(), S = s.useSearch(), C = s.useNavigate(), { data: w } = v(t(x)), { data: T } = v(r(x)), { data: E } = _(n(x, S)), D = (e) => C({
|
|
16
16
|
search: (t) => ({
|
|
17
17
|
...t,
|
|
18
18
|
...e
|
|
19
19
|
}),
|
|
20
20
|
replace: !0
|
|
21
|
-
}),
|
|
22
|
-
|
|
23
|
-
let e =
|
|
21
|
+
}), O = f(null), [k, A] = p(800);
|
|
22
|
+
d(() => {
|
|
23
|
+
let e = O.current;
|
|
24
24
|
if (!e) return;
|
|
25
|
-
let t = new ResizeObserver(([e]) => e &&
|
|
25
|
+
let t = new ResizeObserver(([e]) => e && A(Math.floor(e.contentRect.width)));
|
|
26
26
|
return t.observe(e), () => t.disconnect();
|
|
27
27
|
}, []);
|
|
28
|
-
let
|
|
29
|
-
doc:
|
|
30
|
-
issue:
|
|
31
|
-
entry:
|
|
28
|
+
let j = E?.nodes ?? [], M = {
|
|
29
|
+
doc: b("docs"),
|
|
30
|
+
issue: b("issues"),
|
|
31
|
+
entry: b("entries")
|
|
32
32
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ g("div", {
|
|
34
34
|
className: "flex h-full flex-col",
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ g("header", {
|
|
37
37
|
className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
|
|
38
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ h("h1", {
|
|
39
39
|
className: "text-sm font-semibold",
|
|
40
|
-
children:
|
|
41
|
-
}), /* @__PURE__ */
|
|
40
|
+
children: y("title")
|
|
41
|
+
}), /* @__PURE__ */ h("span", {
|
|
42
42
|
className: "text-xs text-muted-foreground",
|
|
43
|
-
children:
|
|
43
|
+
children: y("count", { count: j.length })
|
|
44
44
|
})]
|
|
45
45
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ g("div", {
|
|
47
47
|
className: "flex shrink-0 flex-wrap gap-x-4 gap-y-2 border-b border-border px-4 py-2 md:px-5",
|
|
48
|
-
children: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
onValueChange: (e) => k({ kind: e.length ? e : void 0 })
|
|
71
|
-
}),
|
|
72
|
-
(!w.kind || w.kind.includes("entry")) && /* @__PURE__ */ g(d, {
|
|
73
|
-
label: b("status"),
|
|
74
|
-
options: t.map((e) => ({
|
|
75
|
-
value: e,
|
|
76
|
-
label: S(e)
|
|
77
|
-
})),
|
|
78
|
-
value: w.status ?? [],
|
|
79
|
-
onValueChange: (e) => k({ status: e.length ? e : void 0 })
|
|
80
|
-
})
|
|
81
|
-
]
|
|
48
|
+
children: [/* @__PURE__ */ h(u, {
|
|
49
|
+
label: y("space"),
|
|
50
|
+
multiple: !1,
|
|
51
|
+
all: !0,
|
|
52
|
+
options: [{
|
|
53
|
+
value: "workspace",
|
|
54
|
+
label: T.name
|
|
55
|
+
}, ...w.filter((e) => !e.archivedAt).map((e) => ({
|
|
56
|
+
value: e.key,
|
|
57
|
+
label: e.name
|
|
58
|
+
}))],
|
|
59
|
+
value: S.space ? [S.space] : [],
|
|
60
|
+
onValueChange: ([e]) => D({ space: e })
|
|
61
|
+
}), /* @__PURE__ */ h(u, {
|
|
62
|
+
label: y("kind"),
|
|
63
|
+
options: e.map((e) => ({
|
|
64
|
+
value: e,
|
|
65
|
+
label: M[e]
|
|
66
|
+
})),
|
|
67
|
+
value: S.kind ?? [],
|
|
68
|
+
onValueChange: (e) => D({ kind: e.length ? e : void 0 })
|
|
69
|
+
})]
|
|
82
70
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ h("div", {
|
|
84
72
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
ref:
|
|
73
|
+
children: /* @__PURE__ */ g("div", {
|
|
74
|
+
ref: O,
|
|
87
75
|
className: "px-4 md:px-5",
|
|
88
76
|
children: [
|
|
89
|
-
|
|
77
|
+
E && j.length === 0 ? /* @__PURE__ */ h(l, {
|
|
90
78
|
variant: "plain",
|
|
91
|
-
title:
|
|
92
|
-
}) :
|
|
93
|
-
workspace:
|
|
94
|
-
nodes:
|
|
95
|
-
edges:
|
|
96
|
-
width:
|
|
79
|
+
title: y("empty")
|
|
80
|
+
}) : E && /* @__PURE__ */ h(i, {
|
|
81
|
+
workspace: x,
|
|
82
|
+
nodes: j,
|
|
83
|
+
edges: E.edges,
|
|
84
|
+
width: k,
|
|
97
85
|
height: "calc(100dvh - 11rem)"
|
|
98
86
|
}),
|
|
99
|
-
|
|
87
|
+
E?.truncated && /* @__PURE__ */ h("p", {
|
|
100
88
|
className: "px-2 pt-2 text-xs text-muted-foreground",
|
|
101
|
-
children:
|
|
89
|
+
children: y("truncated")
|
|
102
90
|
}),
|
|
103
|
-
|
|
91
|
+
j.length > 0 && /* @__PURE__ */ h(c, {
|
|
104
92
|
className: "mt-4 mb-8",
|
|
105
93
|
summaryClassName: "px-2 text-sm text-muted-foreground hover:text-foreground",
|
|
106
|
-
summary:
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
workspace:
|
|
109
|
-
nodes:
|
|
110
|
-
label:
|
|
94
|
+
summary: y("asList", { count: j.length }),
|
|
95
|
+
children: /* @__PURE__ */ h(a, {
|
|
96
|
+
workspace: x,
|
|
97
|
+
nodes: j,
|
|
98
|
+
label: y("title")
|
|
111
99
|
})
|
|
112
100
|
})
|
|
113
101
|
]
|
|
@@ -116,4 +104,4 @@ function b() {
|
|
|
116
104
|
]
|
|
117
105
|
});
|
|
118
106
|
}
|
|
119
|
-
export {
|
|
107
|
+
export { y as component };
|