@parallelworks/tandem-web 0.178.1 → 0.179.0
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 +88 -111
- 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/components/AreaWork.js
CHANGED
|
@@ -1,106 +1,101 @@
|
|
|
1
1
|
import { termRef as e } from "../lib/knowledgeKinds.js";
|
|
2
2
|
import { Link as t } from "../lib/router.js";
|
|
3
3
|
import { AnsweredDecision as n } from "./AgentWork.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { ChevronRightIcon as r } from "./icons.js";
|
|
5
|
+
import { useState as i } from "react";
|
|
6
|
+
import { useTranslations as a } from "use-intl";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
9
8
|
// src/components/AreaWork.tsx
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
let
|
|
13
|
-
return /* @__PURE__ */
|
|
9
|
+
var c = (...e) => e.filter(Boolean).join(" ");
|
|
10
|
+
function l({ workspace: n, entry: r, isNew: i }) {
|
|
11
|
+
let c = a("knowledge"), l = a("areaPage");
|
|
12
|
+
return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ s(t, {
|
|
14
13
|
to: "/$workspace/knowledge/$term",
|
|
15
14
|
params: {
|
|
16
15
|
workspace: n,
|
|
17
|
-
term: e(
|
|
16
|
+
term: e(r)
|
|
18
17
|
},
|
|
19
18
|
className: "flex min-w-0 items-baseline gap-2 px-3 py-2 text-sm hover:bg-muted",
|
|
20
19
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ o("span", {
|
|
22
21
|
className: "shrink-0 font-medium",
|
|
23
|
-
children:
|
|
22
|
+
children: r.name
|
|
24
23
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ o("span", {
|
|
26
25
|
className: "shrink-0 text-xs text-muted-foreground",
|
|
27
|
-
children:
|
|
26
|
+
children: c(`kind.${r.kind}`)
|
|
28
27
|
}),
|
|
29
|
-
|
|
28
|
+
r.definition !== r.name && /* @__PURE__ */ o("span", {
|
|
30
29
|
className: "min-w-0 truncate text-muted-foreground",
|
|
31
|
-
children:
|
|
32
|
-
}),
|
|
33
|
-
i.status === "added" && /* @__PURE__ */ s("span", {
|
|
34
|
-
className: "ml-auto shrink-0",
|
|
35
|
-
children: /* @__PURE__ */ s(r, { status: i.status })
|
|
30
|
+
children: r.definition
|
|
36
31
|
}),
|
|
37
|
-
|
|
32
|
+
i && /* @__PURE__ */ o("span", {
|
|
38
33
|
className: "ml-auto shrink-0 text-[11px] font-medium text-primary",
|
|
39
|
-
children:
|
|
34
|
+
children: l("new")
|
|
40
35
|
})
|
|
41
36
|
]
|
|
42
37
|
}) });
|
|
43
38
|
}
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
let f =
|
|
47
|
-
return /* @__PURE__ */
|
|
39
|
+
var u = (e) => e.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
|
|
40
|
+
function d({ workspace: e, decision: t, isNew: l, notInDocs: d }) {
|
|
41
|
+
let f = a("areaPage"), [p, m] = i(!1), h = [t.options.find((e) => e.id === t.answer?.optionId)?.label, t.answer?.text && u(t.answer.text)].filter(Boolean).join(". ");
|
|
42
|
+
return /* @__PURE__ */ s("li", { children: [/* @__PURE__ */ s("button", {
|
|
48
43
|
type: "button",
|
|
49
44
|
"aria-expanded": p,
|
|
50
45
|
onClick: () => m((e) => !e),
|
|
51
46
|
className: "flex w-full min-w-0 items-baseline gap-2 px-3 py-2 text-left text-sm hover:bg-muted",
|
|
52
47
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ o(r, { className: c("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
|
|
49
|
+
/* @__PURE__ */ o("span", {
|
|
55
50
|
className: "min-w-0 truncate text-muted-foreground",
|
|
56
|
-
children:
|
|
51
|
+
children: u(t.prompt)
|
|
57
52
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ o("span", {
|
|
59
54
|
className: "min-w-0 shrink-0 truncate font-medium max-sm:hidden",
|
|
60
55
|
children: h
|
|
61
56
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ s("span", {
|
|
63
58
|
className: "ml-auto flex shrink-0 items-center gap-2",
|
|
64
|
-
children: [
|
|
59
|
+
children: [d && /* @__PURE__ */ o("span", {
|
|
65
60
|
className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
|
|
66
61
|
children: f("notInDocs")
|
|
67
|
-
}),
|
|
62
|
+
}), l && /* @__PURE__ */ o("span", {
|
|
68
63
|
className: "text-[11px] font-medium text-primary",
|
|
69
64
|
children: f("new")
|
|
70
65
|
})]
|
|
71
66
|
})
|
|
72
67
|
]
|
|
73
|
-
}), p && /* @__PURE__ */
|
|
68
|
+
}), p && /* @__PURE__ */ o("div", {
|
|
74
69
|
className: "px-3 pb-3",
|
|
75
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ o(n, {
|
|
76
71
|
workspace: e,
|
|
77
72
|
decision: t,
|
|
78
73
|
showIssue: !0
|
|
79
74
|
})
|
|
80
75
|
})] });
|
|
81
76
|
}
|
|
82
|
-
function
|
|
83
|
-
return /* @__PURE__ */
|
|
77
|
+
function f({ title: e, count: t, icon: n, extra: r, action: i, bare: a = !1, children: c }) {
|
|
78
|
+
return /* @__PURE__ */ s("section", {
|
|
84
79
|
"aria-label": e,
|
|
85
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ s("h2", {
|
|
86
81
|
className: "sticky top-0 z-10 flex h-9 items-center gap-2 border-b border-border bg-background px-4 text-xs font-medium md:px-5",
|
|
87
82
|
children: [
|
|
88
83
|
n,
|
|
89
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ o("span", {
|
|
90
85
|
className: "truncate",
|
|
91
86
|
children: e
|
|
92
87
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ o("span", {
|
|
94
89
|
className: "text-muted-foreground tabular-nums",
|
|
95
90
|
children: t
|
|
96
91
|
}),
|
|
97
92
|
r,
|
|
98
|
-
i && /* @__PURE__ */
|
|
93
|
+
i && /* @__PURE__ */ o("span", {
|
|
99
94
|
className: "ml-auto flex",
|
|
100
95
|
children: i
|
|
101
96
|
})
|
|
102
97
|
]
|
|
103
|
-
}), t > 0 && (a ?
|
|
98
|
+
}), t > 0 && (a ? c : /* @__PURE__ */ o("ul", { children: c }))]
|
|
104
99
|
});
|
|
105
100
|
}
|
|
106
|
-
export {
|
|
101
|
+
export { f as AreaGroup, d as FoldedAnswer, l as KnowledgeRow };
|
package/components/Graph.js
CHANGED
|
@@ -13,7 +13,7 @@ import w from "@dagrejs/dagre";
|
|
|
13
13
|
import { Handle as T, MarkerType as E, Position as D, ReactFlow as O, ReactFlowProvider as k, useReactFlow as A } from "@xyflow/react";
|
|
14
14
|
import "@xyflow/react/dist/style.css";
|
|
15
15
|
// src/components/Graph.tsx
|
|
16
|
-
var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "
|
|
16
|
+
var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "superseded" ? "bg-muted-foreground/50" : "bg-success", F = {
|
|
17
17
|
doc: c,
|
|
18
18
|
issue: u,
|
|
19
19
|
entry: l
|
package/components/HoverCards.js
CHANGED
|
@@ -13,15 +13,15 @@ import { DocIcon as y } from "./DocIcon.js";
|
|
|
13
13
|
import { termCaretEvent as b } from "./editorPlugins.js";
|
|
14
14
|
import { FileTextIcon as x } from "./icons.js";
|
|
15
15
|
import { PersonCard as S } from "./PersonHoverCard.js";
|
|
16
|
-
import { HoverCard as C, Loader as w
|
|
17
|
-
import { useEffect as
|
|
18
|
-
import { useTranslations as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { useQuery as
|
|
16
|
+
import { HoverCard as C, Loader as w } from "@parallelworks/ui";
|
|
17
|
+
import { useEffect as T, useRef as E, useState as D } from "react";
|
|
18
|
+
import { useTranslations as O } from "use-intl";
|
|
19
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
20
|
+
import { useQuery as M, useQueryClient as N } from "@tanstack/react-query";
|
|
21
21
|
// src/components/HoverCards.tsx
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
let t = e?.closest(
|
|
22
|
+
var P = ".kb-term, .person-mention, .prose-issue a[href*=\"/docs/\"]", F = 300, I = 200;
|
|
23
|
+
function L(e) {
|
|
24
|
+
let t = e?.closest(P);
|
|
25
25
|
if (!t) return null;
|
|
26
26
|
if (t.classList.contains("kb-term")) {
|
|
27
27
|
let e = t.dataset.term;
|
|
@@ -46,8 +46,8 @@ function R(e) {
|
|
|
46
46
|
key: c(r[1])
|
|
47
47
|
} : null;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
let [c, l] =
|
|
49
|
+
function R({ workspace: n }) {
|
|
50
|
+
let [c, l] = D(null), d = E(null), p = E(void 0), { data: g } = M(i(n)), y = _(), x = E((e) => {});
|
|
51
51
|
x.current = (e) => {
|
|
52
52
|
let t = g?.find((t) => t.id === e);
|
|
53
53
|
y({
|
|
@@ -57,23 +57,23 @@ function z({ workspace: n }) {
|
|
|
57
57
|
term: t ? m(t) : e
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
},
|
|
60
|
+
}, T(() => {
|
|
61
61
|
u.set(g ?? []);
|
|
62
|
-
}, [g]),
|
|
63
|
-
let { data: w } =
|
|
64
|
-
|
|
62
|
+
}, [g]), T(() => () => u.set([]), []);
|
|
63
|
+
let { data: w } = M(r(n));
|
|
64
|
+
T(() => {
|
|
65
65
|
s.set(w ?? []);
|
|
66
|
-
}, [w]),
|
|
67
|
-
let { data:
|
|
68
|
-
|
|
69
|
-
h.set((
|
|
70
|
-
}, [
|
|
71
|
-
let { data: k } =
|
|
72
|
-
|
|
66
|
+
}, [w]), T(() => () => s.set([]), []);
|
|
67
|
+
let { data: O } = M(a(n));
|
|
68
|
+
T(() => {
|
|
69
|
+
h.set((O ?? []).map((e) => e.user.username));
|
|
70
|
+
}, [O]), T(() => () => h.set([]), []);
|
|
71
|
+
let { data: k } = M(o(n));
|
|
72
|
+
T(() => {
|
|
73
73
|
v.set(k ?? []);
|
|
74
|
-
}, [k]),
|
|
75
|
-
let
|
|
76
|
-
|
|
74
|
+
}, [k]), T(() => () => v.set([]), []);
|
|
75
|
+
let j = N();
|
|
76
|
+
T(() => {
|
|
77
77
|
f.set(n, async (r) => {
|
|
78
78
|
let { issues: i } = t(await e.POST("/api/v1/workspaces/{workspace}/issue-refs", {
|
|
79
79
|
params: { path: { workspace: n } },
|
|
@@ -81,52 +81,52 @@ function z({ workspace: n }) {
|
|
|
81
81
|
}));
|
|
82
82
|
return new Map(i.map((e) => [e.identifier, e.issue]));
|
|
83
83
|
});
|
|
84
|
-
let r, i =
|
|
84
|
+
let r, i = j.getQueryCache().subscribe((e) => {
|
|
85
85
|
e.type === "updated" && e.query.queryKey[2] === "issues" && (clearTimeout(r), r = setTimeout(() => f.refresh(), 1e3));
|
|
86
86
|
});
|
|
87
87
|
return () => {
|
|
88
88
|
clearTimeout(r), i(), f.set("", void 0);
|
|
89
89
|
};
|
|
90
|
-
}, [n,
|
|
91
|
-
let
|
|
92
|
-
|
|
90
|
+
}, [n, j]);
|
|
91
|
+
let P = E((e) => {});
|
|
92
|
+
P.current = (e) => y({
|
|
93
93
|
to: "/$workspace/issues/$identifier",
|
|
94
94
|
params: {
|
|
95
95
|
workspace: n,
|
|
96
96
|
identifier: e
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
let
|
|
100
|
-
|
|
99
|
+
let R = E((e) => {});
|
|
100
|
+
R.current = (e) => y({
|
|
101
101
|
to: "/$workspace/teams/$key/issues",
|
|
102
102
|
params: {
|
|
103
103
|
workspace: n,
|
|
104
104
|
key: e
|
|
105
105
|
}
|
|
106
|
-
}),
|
|
106
|
+
}), T(() => {
|
|
107
107
|
let e = (e, t) => {
|
|
108
108
|
clearTimeout(p.current), p.current = setTimeout(e, t);
|
|
109
109
|
}, t = (t) => {
|
|
110
110
|
if (t.pointerType === "touch") return;
|
|
111
|
-
let n =
|
|
112
|
-
n && e(() => l(n),
|
|
111
|
+
let n = L(t.target);
|
|
112
|
+
n && e(() => l(n), F);
|
|
113
113
|
}, n = (t) => {
|
|
114
114
|
let n = t.relatedTarget;
|
|
115
|
-
n && d.current?.contains(n) ||
|
|
115
|
+
n && d.current?.contains(n) || L(t.target) && e(() => l(null), I);
|
|
116
116
|
}, r = (e) => {
|
|
117
|
-
let t =
|
|
117
|
+
let t = L(e.target);
|
|
118
118
|
t && (clearTimeout(p.current), l(t));
|
|
119
119
|
}, i = (e) => {
|
|
120
120
|
e.target.matches?.(".kb-term[tabindex], .prose-issue a[href*=\"/docs/\"]") && r(e);
|
|
121
121
|
}, a = (e) => {
|
|
122
122
|
let t = e.target.closest?.(".issue-mention"), n = t?.dataset.issue;
|
|
123
123
|
if (t && n && !t.closest("a[href]") && (!t.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey)) {
|
|
124
|
-
e.preventDefault(),
|
|
124
|
+
e.preventDefault(), P.current(n);
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
let i = e.target.closest?.(".team-mention"), a = i?.dataset.team;
|
|
128
128
|
if (i && a && (!i.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey)) {
|
|
129
|
-
e.preventDefault(),
|
|
129
|
+
e.preventDefault(), R.current(a);
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
132
|
let o = e.target.closest?.(".kb-term");
|
|
@@ -139,7 +139,7 @@ function z({ workspace: n }) {
|
|
|
139
139
|
return document.addEventListener("pointerover", t), document.addEventListener("pointerout", n), document.addEventListener("focusin", i), document.addEventListener("click", a), document.addEventListener(b, r), document.addEventListener("keydown", o, !0), () => {
|
|
140
140
|
clearTimeout(p.current), document.removeEventListener("pointerover", t), document.removeEventListener("pointerout", n), document.removeEventListener("focusin", i), document.removeEventListener("click", a), document.removeEventListener(b, r), document.removeEventListener("keydown", o, !0);
|
|
141
141
|
};
|
|
142
|
-
}, []),
|
|
142
|
+
}, []), T(() => {
|
|
143
143
|
if (!c) return;
|
|
144
144
|
let e = (e) => {
|
|
145
145
|
let t = e.target;
|
|
@@ -147,88 +147,65 @@ function z({ workspace: n }) {
|
|
|
147
147
|
};
|
|
148
148
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
149
149
|
}, [c]);
|
|
150
|
-
let
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
at:
|
|
153
|
-
open: !!
|
|
150
|
+
let B = c?.el.isConnected ? c : null;
|
|
151
|
+
return /* @__PURE__ */ A(C, {
|
|
152
|
+
at: B?.el ?? null,
|
|
153
|
+
open: !!B,
|
|
154
154
|
onOpenChange: (e) => {
|
|
155
155
|
e || l(null);
|
|
156
156
|
},
|
|
157
157
|
onPointerEnter: () => clearTimeout(p.current),
|
|
158
158
|
onPointerLeave: () => {
|
|
159
|
-
clearTimeout(p.current), p.current = setTimeout(() => l(null),
|
|
159
|
+
clearTimeout(p.current), p.current = setTimeout(() => l(null), I);
|
|
160
160
|
},
|
|
161
|
-
card:
|
|
161
|
+
card: B && /* @__PURE__ */ A("div", {
|
|
162
162
|
ref: d,
|
|
163
163
|
role: "dialog",
|
|
164
|
-
"aria-label":
|
|
165
|
-
className:
|
|
166
|
-
children:
|
|
164
|
+
"aria-label": B.kind === "doc" ? B.key : B.kind === "person" ? B.username : void 0,
|
|
165
|
+
className: B.kind === "person" ? "" : "w-80 max-w-[calc(100vw-16px)] p-3 text-sm",
|
|
166
|
+
children: B.kind === "term" ? /* @__PURE__ */ A(z, {
|
|
167
167
|
workspace: n,
|
|
168
|
-
entry: g?.find((e) => e.id ===
|
|
169
|
-
}) :
|
|
168
|
+
entry: g?.find((e) => e.id === B.id)
|
|
169
|
+
}) : B.kind === "person" ? /* @__PURE__ */ A(S, {
|
|
170
170
|
workspace: n,
|
|
171
|
-
handle:
|
|
172
|
-
}) : /* @__PURE__ */
|
|
171
|
+
handle: B.username
|
|
172
|
+
}) : /* @__PURE__ */ A(V, {
|
|
173
173
|
workspace: n,
|
|
174
|
-
docKey:
|
|
174
|
+
docKey: B.key
|
|
175
175
|
})
|
|
176
176
|
})
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
};
|
|
183
|
-
function V({ status: e }) {
|
|
184
|
-
let t = k("knowledge.status");
|
|
185
|
-
return e === "superseded" ? /* @__PURE__ */ j(T, {
|
|
186
|
-
off: !0,
|
|
187
|
-
className: "text-xs",
|
|
188
|
-
children: t(e)
|
|
189
|
-
}) : /* @__PURE__ */ j(T, {
|
|
190
|
-
variant: B[e],
|
|
191
|
-
className: "text-xs",
|
|
192
|
-
children: t(e)
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
function H({ workspace: e, entry: t }) {
|
|
196
|
-
let n = k("knowledge"), r = p(e);
|
|
197
|
-
if (!t) return /* @__PURE__ */ j("p", {
|
|
179
|
+
function z({ workspace: e, entry: t }) {
|
|
180
|
+
let n = O("knowledge"), r = p(e);
|
|
181
|
+
if (!t) return /* @__PURE__ */ A("p", {
|
|
198
182
|
className: "text-muted-foreground",
|
|
199
183
|
children: n("gone")
|
|
200
184
|
});
|
|
201
185
|
let i = t.source.doc;
|
|
202
|
-
return /* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ j(k, { children: [
|
|
187
|
+
/* @__PURE__ */ j("p", {
|
|
204
188
|
className: "flex items-center gap-2",
|
|
205
|
-
children: [
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
children: n(`kind.${t.kind}`)
|
|
218
|
-
}),
|
|
219
|
-
(t.kind !== "term" || t.status !== "decided") && /* @__PURE__ */ j("span", {
|
|
220
|
-
className: "ml-auto",
|
|
221
|
-
children: /* @__PURE__ */ j(V, { status: t.status })
|
|
222
|
-
})
|
|
223
|
-
]
|
|
189
|
+
children: [/* @__PURE__ */ A(g, {
|
|
190
|
+
to: "/$workspace/knowledge/$term",
|
|
191
|
+
params: {
|
|
192
|
+
workspace: e,
|
|
193
|
+
term: m(t)
|
|
194
|
+
},
|
|
195
|
+
className: "font-semibold hover:underline",
|
|
196
|
+
children: t.name
|
|
197
|
+
}), /* @__PURE__ */ A("span", {
|
|
198
|
+
className: "text-xs text-muted-foreground",
|
|
199
|
+
children: n(`kind.${t.kind}`)
|
|
200
|
+
})]
|
|
224
201
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ A("p", {
|
|
226
203
|
className: "mt-1.5 text-foreground",
|
|
227
204
|
children: t.definition
|
|
228
205
|
}),
|
|
229
|
-
t.supersededBy && /* @__PURE__ */
|
|
206
|
+
t.supersededBy && /* @__PURE__ */ A("p", {
|
|
230
207
|
className: "mt-1.5 text-xs",
|
|
231
|
-
children: /* @__PURE__ */
|
|
208
|
+
children: /* @__PURE__ */ A(g, {
|
|
232
209
|
to: "/$workspace/knowledge/$term",
|
|
233
210
|
params: {
|
|
234
211
|
workspace: e,
|
|
@@ -238,9 +215,9 @@ function H({ workspace: e, entry: t }) {
|
|
|
238
215
|
children: n("supersededBy", { name: t.supersededByName ?? "" })
|
|
239
216
|
})
|
|
240
217
|
}),
|
|
241
|
-
(i || t.source.identifier) && /* @__PURE__ */
|
|
218
|
+
(i || t.source.identifier) && /* @__PURE__ */ j("p", {
|
|
242
219
|
className: "mt-2 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",
|
|
243
|
-
children: [i && /* @__PURE__ */
|
|
220
|
+
children: [i && /* @__PURE__ */ j(g, {
|
|
244
221
|
to: "/$workspace/docs/$doc",
|
|
245
222
|
params: {
|
|
246
223
|
workspace: e,
|
|
@@ -248,11 +225,11 @@ function H({ workspace: e, entry: t }) {
|
|
|
248
225
|
},
|
|
249
226
|
...t.source.section && { hash: d(t.source.section) },
|
|
250
227
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
251
|
-
children: [/* @__PURE__ */
|
|
228
|
+
children: [/* @__PURE__ */ A(x, { className: "size-3" }), t.source.section ? n("sourceSection", {
|
|
252
229
|
doc: i.title,
|
|
253
230
|
section: t.source.section
|
|
254
231
|
}) : i.title]
|
|
255
|
-
}), t.source.identifier && /* @__PURE__ */
|
|
232
|
+
}), t.source.identifier && /* @__PURE__ */ A(g, {
|
|
256
233
|
to: "/$workspace/issues/$identifier",
|
|
257
234
|
params: {
|
|
258
235
|
workspace: e,
|
|
@@ -262,7 +239,7 @@ function H({ workspace: e, entry: t }) {
|
|
|
262
239
|
children: t.source.identifier
|
|
263
240
|
})]
|
|
264
241
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ A(g, {
|
|
266
243
|
to: "/$workspace/knowledge/$term",
|
|
267
244
|
params: {
|
|
268
245
|
workspace: e,
|
|
@@ -273,30 +250,30 @@ function H({ workspace: e, entry: t }) {
|
|
|
273
250
|
})
|
|
274
251
|
] });
|
|
275
252
|
}
|
|
276
|
-
function
|
|
253
|
+
function B(e) {
|
|
277
254
|
return e.split("\n").map((e) => e.replace(/^#{1,6}\s+|^[-*>]\s+|^\d+\.\s+|\[[ x]\]\s*/g, "").replace(/[*_`]/g, "")).filter((e) => e.trim()).slice(0, 4).join(" ").slice(0, 280);
|
|
278
255
|
}
|
|
279
|
-
function
|
|
280
|
-
let r =
|
|
256
|
+
function V({ workspace: e, docKey: t }) {
|
|
257
|
+
let r = O("docLinks"), { data: i, isError: a } = M({
|
|
281
258
|
...n(e, t),
|
|
282
259
|
retry: !1
|
|
283
260
|
});
|
|
284
|
-
return a ? /* @__PURE__ */
|
|
261
|
+
return a ? /* @__PURE__ */ A("p", {
|
|
285
262
|
className: "text-muted-foreground",
|
|
286
263
|
children: r("unavailable")
|
|
287
|
-
}) : i ? /* @__PURE__ */
|
|
264
|
+
}) : i ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("p", {
|
|
288
265
|
className: "flex items-center gap-2 font-semibold",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ A(y, {
|
|
290
267
|
icon: i.icon,
|
|
291
268
|
className: "size-3.5",
|
|
292
269
|
emojiClassName: "text-xs"
|
|
293
|
-
}), /* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ A("span", {
|
|
294
271
|
className: "truncate",
|
|
295
272
|
children: i.title
|
|
296
273
|
})]
|
|
297
|
-
}), /* @__PURE__ */
|
|
274
|
+
}), /* @__PURE__ */ A("p", {
|
|
298
275
|
className: "mt-1.5 line-clamp-4 text-muted-foreground",
|
|
299
|
-
children:
|
|
300
|
-
})] }) : /* @__PURE__ */
|
|
276
|
+
children: B(i.body ?? "") || r("empty")
|
|
277
|
+
})] }) : /* @__PURE__ */ A(w, { size: 16 });
|
|
301
278
|
}
|
|
302
|
-
export {
|
|
279
|
+
export { R as HoverCards };
|
package/lib/knowledge.js
CHANGED
|
@@ -107,12 +107,6 @@ function N(e, t) {
|
|
|
107
107
|
id: s.id,
|
|
108
108
|
status: "decided"
|
|
109
109
|
})
|
|
110
|
-
}] : s.status === "added" ? [{
|
|
111
|
-
label: n("confirm"),
|
|
112
|
-
onClick: () => i.update.mutate({
|
|
113
|
-
id: s.id,
|
|
114
|
-
status: "decided"
|
|
115
|
-
})
|
|
116
110
|
}] : [],
|
|
117
111
|
...s.status === "superseded" ? [] : [{
|
|
118
112
|
label: n("supersede"),
|
package/lib/permissionModes.js
CHANGED
|
@@ -4,4 +4,10 @@ function t() {
|
|
|
4
4
|
let t = e("agent");
|
|
5
5
|
return (e) => t(e === "default" ? "permissionDefault" : e === "accept-edits" ? "permissionAcceptEdits" : e === "auto" ? "permissionAuto" : "permissionBypass");
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
var n = [
|
|
8
|
+
"default",
|
|
9
|
+
"accept-edits",
|
|
10
|
+
"auto",
|
|
11
|
+
"bypass"
|
|
12
|
+
], r = (e, t) => n.indexOf(e) < n.indexOf(t), i = (e) => `tandem runner --permission-mode ${e}${e === "bypass" ? " --allow-bypass" : ""}`;
|
|
13
|
+
export { r as modeBelow, i as runnerModeCommand, t as usePermissionModeName };
|