@nivaro/react 0.3.117 → 0.3.118
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/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +136 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3757 -3695
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4220 -4175
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +54 -53
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +94 -85
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,48 +1,60 @@
|
|
|
1
|
-
import { jsxs as a, jsx as t, Fragment as
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Bot as
|
|
4
|
-
import { useState as v, useRef as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as
|
|
7
|
-
import { userErrorMessage as
|
|
8
|
-
import { cn as y, formatDate as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
1
|
+
import { jsxs as a, jsx as t, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as G, useQuery as H, useInfiniteQuery as X, useMutation as A } from "@tanstack/react-query";
|
|
3
|
+
import { Bot as Y, Plug as J, Loader2 as C, ListChecks as ee, KeyRound as te, ChevronRight as ae, AlertTriangle as ne, Undo2 as se } from "lucide-react";
|
|
4
|
+
import { useState as v, useRef as re, useMemo as D, Fragment as oe } from "react";
|
|
5
|
+
import { useNivaroClient as le, useItemNavigation as O } from "../../context.js";
|
|
6
|
+
import { get as q, del as ie, post as de } from "../../lib/commands.js";
|
|
7
|
+
import { userErrorMessage as M } from "../../lib/safe-error.js";
|
|
8
|
+
import { cn as y, formatDate as _, formatRelative as Q, formatNumber as g, formatDateTime as ce, formatFileSize as j } from "../../lib/utils.js";
|
|
9
|
+
import { useRecordLabels as me } from "../item-edit/useRecordLabels.js";
|
|
10
|
+
import { ScopeBadge as pe, McpScopeSheet as ue } from "../McpConnectionScope.js";
|
|
11
|
+
import { SimpleSelectXs as he } from "../ui/SimpleSelect.js";
|
|
12
|
+
import { Skeleton as xe } from "../ui/skeleton.js";
|
|
13
|
+
import { AgentNameField as be } from "./AgentNameField.js";
|
|
14
|
+
import { ConnectionRollback as fe } from "./ConnectionRollback.js";
|
|
15
|
+
import { SectionCard as T, EmptyLine as N, ConfirmButton as W, Pill as z } from "./primitives.js";
|
|
16
|
+
function w({ collection: e, id: r }) {
|
|
17
|
+
const l = me(e, [r]).get(String(r)), d = e.replace(/[_-]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
18
|
+
return /* @__PURE__ */ a("span", { "data-tip": `${d} · id ${r}`, children: [
|
|
19
|
+
l ?? /* @__PURE__ */ a("span", { className: "text-slate-500 dark:text-slate-400", children: [
|
|
20
|
+
"A ",
|
|
21
|
+
d,
|
|
22
|
+
" record"
|
|
23
|
+
] }),
|
|
24
|
+
l && /* @__PURE__ */ t("span", { className: "ml-1.5 text-[11px] font-normal text-slate-500 dark:text-slate-400", children: d })
|
|
25
|
+
] });
|
|
26
|
+
}
|
|
27
|
+
const U = {
|
|
16
28
|
oauth: "Signed in",
|
|
17
29
|
api_key: "API key",
|
|
18
30
|
token: "Personal token"
|
|
19
|
-
},
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */ t("div", { className: "flex h-6 items-end gap-[2px]", "aria-hidden": !0, children: e.map((
|
|
23
|
-
const l =
|
|
31
|
+
}, K = (e) => ["nvr-mcp-connections", e];
|
|
32
|
+
function ge({ days: e }) {
|
|
33
|
+
const r = Math.max(1, ...e.map((s) => s.calls));
|
|
34
|
+
return /* @__PURE__ */ t("div", { className: "flex h-6 items-end gap-[2px]", "aria-hidden": !0, children: e.map((s) => {
|
|
35
|
+
const l = s.calls ? Math.max(3, Math.round(s.calls / r * 24)) : 2, d = s.errors + s.refused;
|
|
24
36
|
return /* @__PURE__ */ t(
|
|
25
37
|
"span",
|
|
26
38
|
{
|
|
27
|
-
"data-tip": `${
|
|
39
|
+
"data-tip": `${_(`${s.day}T12:00:00Z`, { month: "short", day: "numeric" })}: ${g(s.calls)} call${s.calls === 1 ? "" : "s"}${d ? `, ${d} not ok` : ""}`,
|
|
28
40
|
className: y(
|
|
29
41
|
"relative w-[5px] overflow-hidden rounded-[1px]",
|
|
30
|
-
|
|
42
|
+
s.calls ? "bg-nvr-cyan/50 dark:bg-nvr-cyan/40" : "bg-slate-200 dark:bg-muted"
|
|
31
43
|
),
|
|
32
44
|
style: { height: l },
|
|
33
45
|
children: d > 0 && /* @__PURE__ */ t(
|
|
34
46
|
"span",
|
|
35
47
|
{
|
|
36
48
|
className: "absolute inset-x-0 bottom-0 bg-amber-500 dark:bg-amber-400",
|
|
37
|
-
style: { height: `${Math.round(d /
|
|
49
|
+
style: { height: `${Math.round(d / s.calls * 100)}%` }
|
|
38
50
|
}
|
|
39
51
|
)
|
|
40
52
|
},
|
|
41
|
-
|
|
53
|
+
s.day
|
|
42
54
|
);
|
|
43
55
|
}) });
|
|
44
56
|
}
|
|
45
|
-
function
|
|
57
|
+
function ve({ s: e }) {
|
|
46
58
|
return !e || e.calls === 0 ? /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-500 dark:text-slate-400", children: "No tool calls" }) : /* @__PURE__ */ a("span", { className: "text-[12px] tabular-nums text-slate-600 dark:text-slate-300", children: [
|
|
47
59
|
/* @__PURE__ */ t("b", { className: "font-semibold text-slate-800 dark:text-slate-100", children: g(e.calls) }),
|
|
48
60
|
" ",
|
|
@@ -61,53 +73,53 @@ function fe({ s: e }) {
|
|
|
61
73
|
] }),
|
|
62
74
|
/* @__PURE__ */ a("span", { className: "text-slate-500 dark:text-slate-400", children: [
|
|
63
75
|
" · ",
|
|
64
|
-
|
|
76
|
+
j(e.bytes)
|
|
65
77
|
] })
|
|
66
78
|
] });
|
|
67
79
|
}
|
|
68
|
-
function
|
|
69
|
-
return /* @__PURE__ */ t(
|
|
80
|
+
function ye({ kind: e, name: r }) {
|
|
81
|
+
return r && r.trim().toLowerCase() === U[e].toLowerCase() ? null : /* @__PURE__ */ t(z, { tone: e === "oauth" ? "brand" : "neutral", children: U[e] });
|
|
70
82
|
}
|
|
71
|
-
function
|
|
83
|
+
function Ne({ c: e }) {
|
|
72
84
|
if (!e.idle || e.idle.status === "active") return null;
|
|
73
|
-
const
|
|
85
|
+
const r = _(`${e.idle.revoke_on}T12:00:00Z`, {
|
|
74
86
|
month: "short",
|
|
75
87
|
day: "numeric",
|
|
76
88
|
year: "numeric"
|
|
77
89
|
});
|
|
78
90
|
return /* @__PURE__ */ a("p", { className: "mt-1.5 flex items-center gap-1.5 text-[12px] text-amber-700 dark:text-amber-400", children: [
|
|
79
|
-
/* @__PURE__ */ t(
|
|
91
|
+
/* @__PURE__ */ t(ne, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
80
92
|
"Unused for ",
|
|
81
93
|
e.idle.idle_days,
|
|
82
94
|
" days — it will be disconnected on ",
|
|
83
|
-
|
|
95
|
+
r,
|
|
84
96
|
" unless it is used."
|
|
85
97
|
] });
|
|
86
98
|
}
|
|
87
|
-
const
|
|
99
|
+
const ke = {
|
|
88
100
|
ok: { label: "Done", tone: "green" },
|
|
89
101
|
refused: { label: "Refused", tone: "amber" },
|
|
90
102
|
error: { label: "Failed", tone: "red" }
|
|
91
|
-
},
|
|
103
|
+
}, we = {
|
|
92
104
|
create: "Created",
|
|
93
105
|
update: "Changed",
|
|
94
106
|
delete: "Deleted"
|
|
95
107
|
};
|
|
96
|
-
function
|
|
97
|
-
return /* @__PURE__ */ t("div", { className: "space-y-3", "aria-busy": "true", children: Array.from({ length: e }, (
|
|
108
|
+
function E({ rows: e = 3 }) {
|
|
109
|
+
return /* @__PURE__ */ t("div", { className: "space-y-3", "aria-busy": "true", children: Array.from({ length: e }, (r, s) => /* @__PURE__ */ t(xe, { className: "h-10 rounded-md" }, s)) });
|
|
98
110
|
}
|
|
99
|
-
function
|
|
111
|
+
function Ce({
|
|
100
112
|
c: e,
|
|
101
|
-
onShowCalls:
|
|
102
|
-
onDisconnect:
|
|
113
|
+
onShowCalls: r,
|
|
114
|
+
onDisconnect: s,
|
|
103
115
|
disconnecting: l
|
|
104
116
|
}) {
|
|
105
|
-
var
|
|
106
|
-
const d = ((
|
|
117
|
+
var i, h, o, b;
|
|
118
|
+
const d = ((i = e.stats) == null ? void 0 : i.last_call_at) ?? e.last_used_at, [c, u] = v(!1), [x, p] = v(!1);
|
|
107
119
|
return /* @__PURE__ */ a("li", { className: "flex flex-wrap items-center gap-x-6 gap-y-3 py-3 first:pt-0 last:pb-0", children: [
|
|
108
120
|
/* @__PURE__ */ a("div", { className: "min-w-[220px] flex-1", children: [
|
|
109
121
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ t(
|
|
110
|
-
|
|
122
|
+
be,
|
|
111
123
|
{
|
|
112
124
|
conn: e.conn,
|
|
113
125
|
displayName: e.display_name ?? e.name,
|
|
@@ -115,24 +127,24 @@ function Ne({
|
|
|
115
127
|
appName: e.name,
|
|
116
128
|
forName: "you",
|
|
117
129
|
scope: "mine",
|
|
118
|
-
trailing: /* @__PURE__ */ t(
|
|
130
|
+
trailing: /* @__PURE__ */ t(ye, { kind: e.kind, name: e.display_name ?? e.name })
|
|
119
131
|
}
|
|
120
132
|
) }),
|
|
121
133
|
/* @__PURE__ */ a("p", { className: "mt-0.5 text-[12px] text-slate-500 dark:text-slate-400", children: [
|
|
122
|
-
e.created_at ? `Connected ${
|
|
134
|
+
e.created_at ? `Connected ${_(e.created_at)}` : "Seen in the request log",
|
|
123
135
|
" · ",
|
|
124
|
-
d ? `last used ${
|
|
136
|
+
d ? `last used ${Q(d)}` : "never used"
|
|
125
137
|
] }),
|
|
126
|
-
/* @__PURE__ */ t(
|
|
138
|
+
/* @__PURE__ */ t(Ne, { c: e }),
|
|
127
139
|
e.scope !== void 0 && /* @__PURE__ */ a("p", { className: "mt-1 flex min-w-0 items-center gap-1.5", children: [
|
|
128
140
|
/* @__PURE__ */ t("span", { className: "shrink-0 text-[12px] text-slate-500 dark:text-slate-400", children: "May use:" }),
|
|
129
|
-
/* @__PURE__ */ t(
|
|
130
|
-
((
|
|
141
|
+
/* @__PURE__ */ t(pe, { scope: e.scope ?? null }),
|
|
142
|
+
((h = e.scope) == null ? void 0 : h.locked) && /* @__PURE__ */ t("span", { className: "shrink-0 text-[11.5px] text-slate-500 dark:text-slate-400", children: "· set by an administrator" })
|
|
131
143
|
] })
|
|
132
144
|
] }),
|
|
133
145
|
/* @__PURE__ */ a("div", { className: "flex min-w-[180px] flex-col gap-1", children: [
|
|
134
|
-
e.stats && /* @__PURE__ */ t(
|
|
135
|
-
/* @__PURE__ */ t(
|
|
146
|
+
e.stats && /* @__PURE__ */ t(ge, { days: e.stats.days }),
|
|
147
|
+
/* @__PURE__ */ t(ve, { s: e.stats })
|
|
136
148
|
] }),
|
|
137
149
|
/* @__PURE__ */ t("div", { className: "hidden min-w-[160px] flex-wrap gap-1 lg:flex", children: (((o = e.stats) == null ? void 0 : o.top_tools) ?? []).slice(0, 4).map((f) => /* @__PURE__ */ t(
|
|
138
150
|
"span",
|
|
@@ -143,22 +155,22 @@ function Ne({
|
|
|
143
155
|
},
|
|
144
156
|
f.tool
|
|
145
157
|
)) }),
|
|
146
|
-
/* @__PURE__ */ a("div", { className: "
|
|
147
|
-
e.scope_editable && /* @__PURE__ */ a(
|
|
158
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-1.5 sm:ml-auto", children: [
|
|
159
|
+
e.scope_editable && /* @__PURE__ */ a(B, { children: [
|
|
148
160
|
/* @__PURE__ */ t(
|
|
149
161
|
"button",
|
|
150
162
|
{
|
|
151
163
|
type: "button",
|
|
152
|
-
onClick: () =>
|
|
153
|
-
className: "h-7 rounded-md px-2 text-[12px] font-medium text-slate-600 transition-colors hover:bg-muted hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:text-slate-300 dark:hover:text-white",
|
|
164
|
+
onClick: () => p(!0),
|
|
165
|
+
className: "h-7 whitespace-nowrap rounded-md px-2 text-[12px] font-medium text-slate-600 transition-colors hover:bg-muted hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:text-slate-300 dark:hover:text-white",
|
|
154
166
|
children: "Limits"
|
|
155
167
|
}
|
|
156
168
|
),
|
|
157
169
|
/* @__PURE__ */ t(
|
|
158
|
-
|
|
170
|
+
ue,
|
|
159
171
|
{
|
|
160
|
-
open:
|
|
161
|
-
onClose: () =>
|
|
172
|
+
open: x,
|
|
173
|
+
onClose: () => p(!1),
|
|
162
174
|
conn: e.conn,
|
|
163
175
|
name: e.name,
|
|
164
176
|
scope: e.scope ?? null,
|
|
@@ -170,8 +182,8 @@ function Ne({
|
|
|
170
182
|
"button",
|
|
171
183
|
{
|
|
172
184
|
type: "button",
|
|
173
|
-
onClick:
|
|
174
|
-
className: "h-7 rounded-md px-2 text-[12px] font-medium text-slate-600 transition-colors hover:bg-muted hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:text-slate-300 dark:hover:text-white",
|
|
185
|
+
onClick: r,
|
|
186
|
+
className: "h-7 whitespace-nowrap rounded-md px-2 text-[12px] font-medium text-slate-600 transition-colors hover:bg-muted hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:text-slate-300 dark:hover:text-white",
|
|
175
187
|
children: "View calls"
|
|
176
188
|
}
|
|
177
189
|
),
|
|
@@ -179,23 +191,23 @@ function Ne({
|
|
|
179
191
|
"button",
|
|
180
192
|
{
|
|
181
193
|
type: "button",
|
|
182
|
-
onClick: () =>
|
|
183
|
-
"aria-expanded":
|
|
194
|
+
onClick: () => u((f) => !f),
|
|
195
|
+
"aria-expanded": c,
|
|
184
196
|
"data-tip": "Undo what this app changed in a time window",
|
|
185
|
-
className: "h-7 rounded-md px-2 text-[12px] font-medium text-slate-600 transition-colors hover:bg-muted hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:text-slate-300 dark:hover:text-white",
|
|
197
|
+
className: "h-7 whitespace-nowrap rounded-md px-2 text-[12px] font-medium text-slate-600 transition-colors hover:bg-muted hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:text-slate-300 dark:hover:text-white",
|
|
186
198
|
children: "Roll back…"
|
|
187
199
|
}
|
|
188
200
|
),
|
|
189
201
|
e.kind === "oauth" && e.created_at ? /* @__PURE__ */ t(
|
|
190
|
-
|
|
202
|
+
W,
|
|
191
203
|
{
|
|
192
|
-
onConfirm:
|
|
204
|
+
onConfirm: s,
|
|
193
205
|
disabled: l,
|
|
194
206
|
confirmLabel: "Disconnect now?",
|
|
195
207
|
title: `Disconnect ${e.name}`,
|
|
196
208
|
className: "h-7 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-700 transition-colors hover:border-red-300 hover:text-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-400/40 disabled:opacity-40 dark:border-border dark:text-slate-200 dark:hover:border-red-500/50 dark:hover:text-red-400",
|
|
197
209
|
armedClassName: "border-red-300 bg-red-50 text-red-700 dark:border-red-500/50 dark:bg-red-500/10 dark:text-red-400",
|
|
198
|
-
children: l ? /* @__PURE__ */ t(
|
|
210
|
+
children: l ? /* @__PURE__ */ t(C, { className: "h-3.5 w-3.5 animate-spin" }) : "Disconnect"
|
|
199
211
|
}
|
|
200
212
|
) : e.kind !== "oauth" ? /* @__PURE__ */ a(
|
|
201
213
|
"span",
|
|
@@ -203,87 +215,79 @@ function Ne({
|
|
|
203
215
|
className: "inline-flex items-center gap-1 text-[11.5px] text-slate-500 dark:text-slate-400",
|
|
204
216
|
"data-tip": "Switch it off from API keys (administrators)",
|
|
205
217
|
children: [
|
|
206
|
-
/* @__PURE__ */ t(
|
|
218
|
+
/* @__PURE__ */ t(te, { className: "h-3.5 w-3.5" }),
|
|
207
219
|
" Managed by an administrator"
|
|
208
220
|
]
|
|
209
221
|
}
|
|
210
222
|
) : null
|
|
211
223
|
] }),
|
|
212
|
-
|
|
213
|
-
|
|
224
|
+
c && /* @__PURE__ */ t("div", { className: "basis-full", children: /* @__PURE__ */ t(
|
|
225
|
+
fe,
|
|
214
226
|
{
|
|
215
227
|
conn: e.conn,
|
|
216
228
|
name: e.name,
|
|
217
229
|
scope: "mine",
|
|
218
|
-
onClose: () =>
|
|
230
|
+
onClose: () => u(!1)
|
|
219
231
|
}
|
|
220
232
|
) })
|
|
221
233
|
] });
|
|
222
234
|
}
|
|
223
|
-
function
|
|
235
|
+
function _e({
|
|
224
236
|
w: e,
|
|
225
|
-
onUndo:
|
|
226
|
-
undoing:
|
|
237
|
+
onUndo: r,
|
|
238
|
+
undoing: s
|
|
227
239
|
}) {
|
|
228
|
-
const { urlFor: l, open: d } =
|
|
240
|
+
const { urlFor: l, open: d } = O(), c = e.collection && e.item ? { collection: e.collection, itemId: e.item } : null;
|
|
229
241
|
return /* @__PURE__ */ a("li", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 py-1.5", children: [
|
|
230
242
|
/* @__PURE__ */ a("span", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: [
|
|
231
|
-
|
|
243
|
+
we[e.action] ?? e.action,
|
|
232
244
|
" ",
|
|
233
|
-
|
|
245
|
+
c && e.action !== "delete" ? /* @__PURE__ */ t(
|
|
234
246
|
"a",
|
|
235
247
|
{
|
|
236
|
-
href: l(
|
|
237
|
-
onClick: (
|
|
238
|
-
|
|
248
|
+
href: l(c),
|
|
249
|
+
onClick: (u) => {
|
|
250
|
+
u.metaKey || u.ctrlKey || (u.preventDefault(), d(c));
|
|
239
251
|
},
|
|
240
|
-
className: "font-
|
|
241
|
-
children:
|
|
242
|
-
e.collection,
|
|
243
|
-
" #",
|
|
244
|
-
e.item
|
|
245
|
-
]
|
|
252
|
+
className: "text-[12px] font-medium text-[#007a99] underline-offset-2 hover:underline dark:text-nvr-cyan",
|
|
253
|
+
children: /* @__PURE__ */ t(w, { collection: c.collection, id: String(c.itemId) })
|
|
246
254
|
}
|
|
247
|
-
) : /* @__PURE__ */
|
|
248
|
-
e.collection ?? "",
|
|
249
|
-
" ",
|
|
250
|
-
e.item ? `#${e.item}` : ""
|
|
251
|
-
] })
|
|
255
|
+
) : e.collection && e.item ? /* @__PURE__ */ t("span", { className: "text-[12px]", children: /* @__PURE__ */ t(w, { collection: e.collection, id: String(e.item) }) }) : null
|
|
252
256
|
] }),
|
|
253
257
|
e.undoable ? /* @__PURE__ */ a(
|
|
254
|
-
|
|
258
|
+
W,
|
|
255
259
|
{
|
|
256
|
-
onConfirm:
|
|
257
|
-
disabled:
|
|
260
|
+
onConfirm: r,
|
|
261
|
+
disabled: s,
|
|
258
262
|
confirmLabel: e.action === "create" ? "Delete it?" : "Put it back?",
|
|
259
263
|
title: e.action === "create" ? "Undo: delete the record the agent created" : "Undo: put back the values from before",
|
|
260
264
|
className: "inline-flex h-6 items-center gap-1 rounded-md border border-slate-200 px-2 text-[11.5px] font-medium text-slate-700 transition-colors hover:border-nvr-cyan hover:text-nvr-navy focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 disabled:opacity-40 dark:border-border dark:text-slate-200 dark:hover:text-nvr-cyan",
|
|
261
265
|
armedClassName: "border-amber-300 bg-amber-50 text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300",
|
|
262
266
|
children: [
|
|
263
|
-
|
|
267
|
+
s ? /* @__PURE__ */ t(C, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(se, { className: "h-3 w-3" }),
|
|
264
268
|
"Undo"
|
|
265
269
|
]
|
|
266
270
|
}
|
|
267
271
|
) : /* @__PURE__ */ t("span", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: e.reason })
|
|
268
272
|
] });
|
|
269
273
|
}
|
|
270
|
-
function
|
|
274
|
+
function Se({
|
|
271
275
|
call: e,
|
|
272
|
-
onUndo:
|
|
273
|
-
undoingId:
|
|
276
|
+
onUndo: r,
|
|
277
|
+
undoingId: s
|
|
274
278
|
}) {
|
|
275
|
-
const [l, d] = v(!1), { urlFor:
|
|
276
|
-
return /* @__PURE__ */ a(
|
|
279
|
+
const [l, d] = v(!1), { urlFor: c, open: u } = O(), x = ke[e.outcome], p = e.writes.length > 0 || !!e.message, i = e.record, h = i != null && i.id ? { collection: i.collection, itemId: i.id } : null;
|
|
280
|
+
return /* @__PURE__ */ a(oe, { children: [
|
|
277
281
|
/* @__PURE__ */ a(
|
|
278
282
|
"tr",
|
|
279
283
|
{
|
|
280
284
|
className: y(
|
|
281
285
|
"border-b border-slate-100 align-middle last:border-0 dark:border-border/60",
|
|
282
|
-
|
|
286
|
+
p && "cursor-pointer hover:bg-muted/60"
|
|
283
287
|
),
|
|
284
|
-
onClick: () =>
|
|
288
|
+
onClick: () => p && d((o) => !o),
|
|
285
289
|
children: [
|
|
286
|
-
/* @__PURE__ */ t("td", { className: "w-5 py-2 pl-1 pr-0", children:
|
|
290
|
+
/* @__PURE__ */ t("td", { className: "w-5 py-2 pl-1 pr-0", children: p && /* @__PURE__ */ t(
|
|
287
291
|
"button",
|
|
288
292
|
{
|
|
289
293
|
type: "button",
|
|
@@ -294,7 +298,7 @@ function Ce({
|
|
|
294
298
|
"aria-label": l ? "Hide what this call changed" : "Show what this call changed",
|
|
295
299
|
className: "flex h-5 w-5 items-center justify-center rounded text-slate-400 hover:text-slate-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:hover:text-slate-200",
|
|
296
300
|
children: /* @__PURE__ */ t(
|
|
297
|
-
|
|
301
|
+
ae,
|
|
298
302
|
{
|
|
299
303
|
className: y(
|
|
300
304
|
"h-3.5 w-3.5 transition-transform duration-150",
|
|
@@ -308,36 +312,32 @@ function Ce({
|
|
|
308
312
|
"td",
|
|
309
313
|
{
|
|
310
314
|
className: "whitespace-nowrap py-2 pr-3 text-slate-500 dark:text-slate-400",
|
|
311
|
-
"data-tip":
|
|
312
|
-
children:
|
|
315
|
+
"data-tip": ce(e.at),
|
|
316
|
+
children: Q(e.at)
|
|
313
317
|
}
|
|
314
318
|
),
|
|
315
319
|
/* @__PURE__ */ t("td", { className: "max-w-[160px] truncate py-2 pr-3 text-slate-700 dark:text-slate-200", children: e.app }),
|
|
316
320
|
/* @__PURE__ */ t("td", { className: "py-2 pr-3 font-mono text-[11.5px] text-slate-700 dark:text-slate-200", children: e.tool ?? "—" }),
|
|
317
|
-
/* @__PURE__ */ t("td", { className: "max-w-[220px] truncate py-2 pr-3", children:
|
|
321
|
+
/* @__PURE__ */ t("td", { className: "max-w-[220px] truncate py-2 pr-3", children: h ? /* @__PURE__ */ t(
|
|
318
322
|
"a",
|
|
319
323
|
{
|
|
320
|
-
href:
|
|
324
|
+
href: c(h),
|
|
321
325
|
onClick: (o) => {
|
|
322
|
-
o.stopPropagation(), !(o.metaKey || o.ctrlKey) && (o.preventDefault(),
|
|
326
|
+
o.stopPropagation(), !(o.metaKey || o.ctrlKey) && (o.preventDefault(), u(h));
|
|
323
327
|
},
|
|
324
|
-
className: "font-
|
|
325
|
-
children:
|
|
326
|
-
s == null ? void 0 : s.collection,
|
|
327
|
-
" #",
|
|
328
|
-
s == null ? void 0 : s.id
|
|
329
|
-
]
|
|
328
|
+
className: "text-[12px] font-medium text-[#007a99] underline-offset-2 hover:underline dark:text-nvr-cyan",
|
|
329
|
+
children: /* @__PURE__ */ t(w, { collection: h.collection, id: String(h.itemId) })
|
|
330
330
|
}
|
|
331
|
-
) :
|
|
331
|
+
) : i ? /* @__PURE__ */ t("span", { className: "text-[12px] text-slate-600 dark:text-slate-300", children: i.collection.replace(/[_-]+/g, " ").replace(/\b\w/g, (o) => o.toUpperCase()) }) : /* @__PURE__ */ t("span", { className: "text-slate-400 dark:text-slate-500", children: "—" }) }),
|
|
332
332
|
/* @__PURE__ */ t("td", { className: "py-2 pr-3", children: /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
333
|
-
/* @__PURE__ */ t(
|
|
333
|
+
/* @__PURE__ */ t(z, { tone: x.tone, children: x.label }),
|
|
334
334
|
e.writes.length > 0 && /* @__PURE__ */ a("span", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: [
|
|
335
335
|
e.writes.length,
|
|
336
336
|
" write",
|
|
337
337
|
e.writes.length === 1 ? "" : "s"
|
|
338
338
|
] })
|
|
339
339
|
] }) }),
|
|
340
|
-
/* @__PURE__ */ t("td", { className: "whitespace-nowrap py-2 pr-1 text-right tabular-nums text-slate-500 dark:text-slate-400", children: e.bytes != null ?
|
|
340
|
+
/* @__PURE__ */ t("td", { className: "whitespace-nowrap py-2 pr-1 text-right tabular-nums text-slate-500 dark:text-slate-400", children: e.bytes != null ? j(e.bytes) : "" })
|
|
341
341
|
]
|
|
342
342
|
}
|
|
343
343
|
),
|
|
@@ -349,11 +349,11 @@ function Ce({
|
|
|
349
349
|
e.message
|
|
350
350
|
] }),
|
|
351
351
|
e.writes.length > 0 && /* @__PURE__ */ t("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: e.writes.map((o) => /* @__PURE__ */ t(
|
|
352
|
-
|
|
352
|
+
_e,
|
|
353
353
|
{
|
|
354
354
|
w: o,
|
|
355
|
-
onUndo: () =>
|
|
356
|
-
undoing:
|
|
355
|
+
onUndo: () => r(o),
|
|
356
|
+
undoing: s === o.activity_id
|
|
357
357
|
},
|
|
358
358
|
o.activity_id
|
|
359
359
|
)) }),
|
|
@@ -369,65 +369,65 @@ function Ce({
|
|
|
369
369
|
] })
|
|
370
370
|
] });
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
var P,
|
|
374
|
-
const
|
|
375
|
-
queryKey:
|
|
376
|
-
queryFn: () =>
|
|
377
|
-
}),
|
|
372
|
+
function Oe({ className: e }) {
|
|
373
|
+
var P, L, R, $, F, I;
|
|
374
|
+
const r = le(), s = G(), [l, d] = v(""), c = re(null), [u, x] = v(null), p = H({
|
|
375
|
+
queryKey: K("mine"),
|
|
376
|
+
queryFn: () => r.request(q("/mcp-connections/mine")).then((n) => n.data)
|
|
377
|
+
}), i = X({
|
|
378
378
|
queryKey: ["nvr-mcp-activity", l],
|
|
379
379
|
initialPageParam: null,
|
|
380
|
-
queryFn: ({ pageParam: n }) =>
|
|
381
|
-
|
|
380
|
+
queryFn: ({ pageParam: n }) => r.request(
|
|
381
|
+
q(
|
|
382
382
|
"/mcp-connections/mine/activity",
|
|
383
383
|
{ ...l ? { conn: l } : {}, ...n ? { before: n } : {}, limit: 50 }
|
|
384
384
|
)
|
|
385
|
-
).then((
|
|
385
|
+
).then((m) => m.data),
|
|
386
386
|
getNextPageParam: (n) => n.next_before
|
|
387
|
-
}),
|
|
388
|
-
mutationFn: (n) =>
|
|
387
|
+
}), h = A({
|
|
388
|
+
mutationFn: (n) => r.request(ie(`/mcp-connections/mine/${n}`)),
|
|
389
389
|
onSuccess: () => {
|
|
390
|
-
|
|
390
|
+
x({ tone: "ok", text: "Disconnected. Its tokens stopped working at once." }), s.invalidateQueries({ queryKey: K("mine") });
|
|
391
391
|
},
|
|
392
|
-
onError: (n) =>
|
|
392
|
+
onError: (n) => x({ tone: "bad", text: M(n, "Could not disconnect") })
|
|
393
393
|
}), o = A({
|
|
394
|
-
mutationFn: (n) =>
|
|
395
|
-
onSuccess: (n,
|
|
396
|
-
|
|
394
|
+
mutationFn: (n) => r.request(de(`/mcp-connections/mine/activity/${n.activity_id}/undo`)),
|
|
395
|
+
onSuccess: (n, m) => {
|
|
396
|
+
x({
|
|
397
397
|
tone: "ok",
|
|
398
|
-
text:
|
|
399
|
-
}),
|
|
398
|
+
text: m.action === "create" ? "Undone — the record was deleted." : "Undone — the previous values are back."
|
|
399
|
+
}), s.invalidateQueries({ queryKey: ["nvr-mcp-activity"] });
|
|
400
400
|
},
|
|
401
|
-
onError: (n) =>
|
|
402
|
-
}), b = ((P =
|
|
401
|
+
onError: (n) => x({ tone: "bad", text: M(n, "Could not undo that change") })
|
|
402
|
+
}), b = ((P = p.data) == null ? void 0 : P.connections) ?? [], f = D(() => {
|
|
403
403
|
var n;
|
|
404
|
-
return ((n =
|
|
405
|
-
}, [
|
|
404
|
+
return ((n = i.data) == null ? void 0 : n.pages.flatMap((m) => m.calls)) ?? [];
|
|
405
|
+
}, [i.data]), V = ((L = p.data) == null ? void 0 : L.logged) !== !1 && (($ = (R = i.data) == null ? void 0 : R.pages[0]) == null ? void 0 : $.logged) !== !1, S = D(
|
|
406
406
|
() => [
|
|
407
407
|
{ value: "", label: "Every app" },
|
|
408
408
|
...b.filter((n) => {
|
|
409
|
-
var
|
|
410
|
-
return (((
|
|
409
|
+
var m;
|
|
410
|
+
return (((m = n.stats) == null ? void 0 : m.calls) ?? 0) > 0;
|
|
411
411
|
}).map((n) => ({ value: n.conn, label: n.display_name ?? n.name }))
|
|
412
412
|
],
|
|
413
413
|
[b]
|
|
414
|
-
),
|
|
414
|
+
), k = (F = p.data) == null ? void 0 : F.settings;
|
|
415
415
|
return /* @__PURE__ */ a("div", { className: y("flex flex-col gap-4", e), "data-nvr-agents": !0, children: [
|
|
416
|
-
|
|
416
|
+
u && /* @__PURE__ */ a(
|
|
417
417
|
"div",
|
|
418
418
|
{
|
|
419
419
|
role: "status",
|
|
420
420
|
className: y(
|
|
421
421
|
"flex items-center justify-between gap-3 rounded-md border px-3 py-2 text-[12.5px]",
|
|
422
|
-
|
|
422
|
+
u.tone === "ok" ? "border-emerald-200 bg-emerald-50 text-emerald-800 dark:border-emerald-500/30 dark:bg-emerald-500/10 dark:text-emerald-300" : "border-red-200 bg-red-50 text-red-700 dark:border-red-500/30 dark:bg-red-500/10 dark:text-red-300"
|
|
423
423
|
),
|
|
424
424
|
children: [
|
|
425
|
-
|
|
425
|
+
u.text,
|
|
426
426
|
/* @__PURE__ */ t(
|
|
427
427
|
"button",
|
|
428
428
|
{
|
|
429
429
|
type: "button",
|
|
430
|
-
onClick: () =>
|
|
430
|
+
onClick: () => x(null),
|
|
431
431
|
className: "text-[12px] font-medium underline-offset-2 hover:underline",
|
|
432
432
|
children: "Dismiss"
|
|
433
433
|
}
|
|
@@ -436,57 +436,57 @@ function Ee({ className: e }) {
|
|
|
436
436
|
}
|
|
437
437
|
),
|
|
438
438
|
/* @__PURE__ */ t(
|
|
439
|
-
|
|
439
|
+
T,
|
|
440
440
|
{
|
|
441
|
-
icon: /* @__PURE__ */ t(
|
|
441
|
+
icon: /* @__PURE__ */ t(J, { className: "h-4 w-4" }),
|
|
442
442
|
title: "Connected apps",
|
|
443
443
|
hint: "AI assistants that act as you through Nivaro’s MCP server, with your permissions",
|
|
444
|
-
children:
|
|
445
|
-
/* @__PURE__ */ t(
|
|
444
|
+
children: p.isLoading ? /* @__PURE__ */ t(E, {}) : p.isError ? /* @__PURE__ */ t(N, { children: "Connected apps could not be loaded. Try again in a moment." }) : b.length === 0 ? /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
|
|
445
|
+
/* @__PURE__ */ t(Y, { className: "mt-0.5 h-5 w-5 shrink-0 text-slate-400" }),
|
|
446
446
|
/* @__PURE__ */ t("p", { className: "max-w-[70ch] text-[12.5px] text-slate-600 dark:text-slate-300", children: "No assistant is connected. Add Nivaro as a connector in Claude, ChatGPT, Claude Code or Codex and sign in — the app shows up here with what it did, and you can disconnect it at any time." })
|
|
447
|
-
] }) : /* @__PURE__ */ a(
|
|
447
|
+
] }) : /* @__PURE__ */ a(B, { children: [
|
|
448
448
|
/* @__PURE__ */ t("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: b.map((n) => /* @__PURE__ */ t(
|
|
449
|
-
|
|
449
|
+
Ce,
|
|
450
450
|
{
|
|
451
451
|
c: n,
|
|
452
452
|
onShowCalls: () => {
|
|
453
|
-
var
|
|
454
|
-
d(n.conn), (
|
|
453
|
+
var m;
|
|
454
|
+
d(n.conn), (m = c.current) == null || m.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
455
455
|
},
|
|
456
|
-
onDisconnect: () =>
|
|
457
|
-
disconnecting:
|
|
456
|
+
onDisconnect: () => h.mutate(n.conn),
|
|
457
|
+
disconnecting: h.isPending && h.variables === n.conn
|
|
458
458
|
},
|
|
459
459
|
n.conn
|
|
460
460
|
)) }),
|
|
461
|
-
|
|
461
|
+
k && /* @__PURE__ */ a("p", { className: "mt-3 text-[11.5px] text-slate-500 dark:text-slate-400", children: [
|
|
462
462
|
"Figures cover the last ",
|
|
463
|
-
((
|
|
463
|
+
((I = p.data) == null ? void 0 : I.window_days) ?? 14,
|
|
464
464
|
" days. A connection left unused for ",
|
|
465
|
-
|
|
465
|
+
k.idle_flag_days,
|
|
466
466
|
" days is pointed out to you, and disconnected after",
|
|
467
467
|
" ",
|
|
468
|
-
|
|
468
|
+
k.idle_revoke_days,
|
|
469
469
|
" days with a week’s notice."
|
|
470
470
|
] })
|
|
471
471
|
] })
|
|
472
472
|
}
|
|
473
473
|
),
|
|
474
|
-
/* @__PURE__ */ t("div", { ref:
|
|
475
|
-
|
|
474
|
+
/* @__PURE__ */ t("div", { ref: c, className: "scroll-mt-4", children: /* @__PURE__ */ t(
|
|
475
|
+
T,
|
|
476
476
|
{
|
|
477
|
-
icon: /* @__PURE__ */ t(
|
|
477
|
+
icon: /* @__PURE__ */ t(ee, { className: "h-4 w-4" }),
|
|
478
478
|
title: "What my agents did",
|
|
479
479
|
hint: "Every tool call, newest first. Open one to see its changes and undo them.",
|
|
480
|
-
actions:
|
|
481
|
-
|
|
480
|
+
actions: S.length > 2 ? /* @__PURE__ */ t(
|
|
481
|
+
he,
|
|
482
482
|
{
|
|
483
483
|
value: l,
|
|
484
484
|
onChange: d,
|
|
485
|
-
options:
|
|
485
|
+
options: S,
|
|
486
486
|
ariaLabel: "Show calls from"
|
|
487
487
|
}
|
|
488
488
|
) : null,
|
|
489
|
-
children:
|
|
489
|
+
children: V ? i.isLoading ? /* @__PURE__ */ t(E, { rows: 5 }) : i.isError ? /* @__PURE__ */ t(N, { children: "The list could not be loaded. Try again in a moment." }) : f.length === 0 ? /* @__PURE__ */ t(N, { children: l ? "This app made no tool calls in the last 14 days." : "Your agents made no tool calls in the last 14 days." }) : /* @__PURE__ */ a("div", { className: "-mx-1 overflow-x-auto", children: [
|
|
490
490
|
/* @__PURE__ */ a("table", { className: "w-full min-w-[640px] text-left text-[12px]", children: [
|
|
491
491
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ a("tr", { className: "border-b border-slate-200 text-[11px] font-medium text-slate-500 dark:border-border dark:text-slate-400", children: [
|
|
492
492
|
/* @__PURE__ */ t("th", { className: "w-5" }),
|
|
@@ -498,41 +498,41 @@ function Ee({ className: e }) {
|
|
|
498
498
|
/* @__PURE__ */ t("th", { className: "py-1.5 pr-1 text-right font-medium", children: "Answer size" })
|
|
499
499
|
] }) }),
|
|
500
500
|
/* @__PURE__ */ t("tbody", { children: f.map((n) => {
|
|
501
|
-
var
|
|
501
|
+
var m;
|
|
502
502
|
return /* @__PURE__ */ t(
|
|
503
|
-
|
|
503
|
+
Se,
|
|
504
504
|
{
|
|
505
505
|
call: n,
|
|
506
|
-
onUndo: (
|
|
507
|
-
undoingId: o.isPending ? ((
|
|
506
|
+
onUndo: (Z) => o.mutate(Z),
|
|
507
|
+
undoingId: o.isPending ? ((m = o.variables) == null ? void 0 : m.activity_id) ?? null : null
|
|
508
508
|
},
|
|
509
509
|
n.id
|
|
510
510
|
);
|
|
511
511
|
}) })
|
|
512
512
|
] }),
|
|
513
|
-
|
|
513
|
+
i.hasNextPage && /* @__PURE__ */ a(
|
|
514
514
|
"button",
|
|
515
515
|
{
|
|
516
516
|
type: "button",
|
|
517
|
-
onClick: () => void
|
|
518
|
-
disabled:
|
|
517
|
+
onClick: () => void i.fetchNextPage(),
|
|
518
|
+
disabled: i.isFetchingNextPage,
|
|
519
519
|
className: "mt-3 inline-flex h-7 items-center gap-1.5 rounded-md border border-slate-200 px-3 text-[12px] font-medium text-slate-700 transition-colors hover:bg-muted disabled:opacity-40 dark:border-border dark:text-slate-200",
|
|
520
520
|
children: [
|
|
521
|
-
|
|
521
|
+
i.isFetchingNextPage && /* @__PURE__ */ t(C, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
522
522
|
"Show older calls"
|
|
523
523
|
]
|
|
524
524
|
}
|
|
525
525
|
)
|
|
526
|
-
] }) : /* @__PURE__ */ t(
|
|
526
|
+
] }) : /* @__PURE__ */ t(N, { children: "Tool calls are not recorded on this instance yet — it needs the latest update." })
|
|
527
527
|
}
|
|
528
528
|
) })
|
|
529
529
|
] });
|
|
530
530
|
}
|
|
531
531
|
export {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
532
|
+
Oe as AgentsPanel,
|
|
533
|
+
ve as CallFigures,
|
|
534
|
+
ge as CallsSparkline,
|
|
535
|
+
Ne as IdleNote,
|
|
536
|
+
ye as KindPill,
|
|
537
|
+
K as mcpConnectionsKey
|
|
538
538
|
};
|