@burdenoff/microfe-vibecontrols 2026.1022.2 → 2026.1022.3
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/components/notes/NotesTabPanel.js +5 -5
- package/dist/components/sharing/EntityShareButton.js +4 -4
- package/dist/components/sharing/VibeShareButton.js +3 -3
- package/dist/pages/AgentDetailsPage.js +1 -1
- package/dist/pages/SettingsPage.js +4 -4
- package/dist/pages/VibeDetailsPage.js +1 -1
- package/dist/providers/QuotaExhaustedProvider.js +29 -28
- package/dist/utils/quotaUtils.js +24 -23
- package/package.json +1 -1
|
@@ -23,12 +23,12 @@ import { useApolloClient as we } from "@apollo/client/react";
|
|
|
23
23
|
import { usePermissions as Te } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
24
24
|
import { AnimatePresence as Ee } from "framer-motion";
|
|
25
25
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
26
|
+
import { AccessDenied as De, PermissionButton as Oe } from "@burdenoff/fe-libs/shared/components";
|
|
27
|
+
import { useFeatureFlag as ke } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
28
28
|
import { MotionItem as Ae, MotionList as je } from "@burdenoff/fe-libs/shared/motion";
|
|
29
29
|
//#region src/components/notes/NotesTabPanel.tsx
|
|
30
30
|
function m({ context: m, vibeId: h, sessionId: g, agentVibes: _ = [] }) {
|
|
31
|
-
let { t: Me } = he(), Ne = Ce(), v = we(), { hasPermission: y, isLoading: b, permissions: Pe } = Te(), x = y(s.NOTE_LIST), Fe = y(s.NOTE_CREATE), S = y(s.NOTE_DELETE), Ie =
|
|
31
|
+
let { t: Me } = he(), Ne = Ce(), v = we(), { hasPermission: y, isLoading: b, permissions: Pe } = Te(), x = y(s.NOTE_LIST), Fe = y(s.NOTE_CREATE), S = y(s.NOTE_DELETE), Ie = ke(c.note.featureFlag, c.note.defaultEnabled), Le = y(c.note.permission), Re = Ie && Le, [C, w] = u(null), [T, ze] = u(""), [E, Be] = u("all"), [D, Ve] = u("all"), [O, k] = u("all"), [A, He] = u(!1), [j, M] = u("grid"), [Ue, N] = u(!1), [We, P] = u(null), [Ge, F] = u(!1), I = (e) => {
|
|
32
32
|
v.cache.evict({
|
|
33
33
|
id: "ROOT_QUERY",
|
|
34
34
|
fieldName: "notes"
|
|
@@ -238,7 +238,7 @@ function m({ context: m, vibeId: h, sessionId: g, agentVibes: _ = [] }) {
|
|
|
238
238
|
total: G.length,
|
|
239
239
|
pinned: G.filter((e) => e.isPinned).length
|
|
240
240
|
}, tt = l(() => m === "vibe" ? [] : _, [m, _]);
|
|
241
|
-
if (!b && Pe && !x) return /* @__PURE__ */ f(
|
|
241
|
+
if (!b && Pe && !x) return /* @__PURE__ */ f(De, {
|
|
242
242
|
title: "Access Denied",
|
|
243
243
|
description: "You don't have permission to view notes.",
|
|
244
244
|
details: "Required permission: note:list"
|
|
@@ -277,7 +277,7 @@ function m({ context: m, vibeId: h, sessionId: g, agentVibes: _ = [] }) {
|
|
|
277
277
|
className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
278
278
|
title: "Refresh notes",
|
|
279
279
|
children: /* @__PURE__ */ f(Se, { className: `size-4 ${V ? "animate-spin" : ""}` })
|
|
280
|
-
}), /* @__PURE__ */ f(
|
|
280
|
+
}), /* @__PURE__ */ f(Oe, {
|
|
281
281
|
permission: s.NOTE_CREATE,
|
|
282
282
|
children: /* @__PURE__ */ p("button", {
|
|
283
283
|
type: "button",
|
|
@@ -4,8 +4,8 @@ import { useState as n } from "react";
|
|
|
4
4
|
import { Share2 as r } from "lucide-react";
|
|
5
5
|
import { getStoredWorkspaceId as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { PermissionGate as s } from "@burdenoff/fe-libs/shared/components";
|
|
8
|
+
import { useFeatureFlag as c } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
9
9
|
import { ShareDialog as l } from "@burdenoff/fe-libs/sharing";
|
|
10
10
|
//#region src/components/sharing/EntityShareButton.tsx
|
|
11
11
|
function u(t) {
|
|
@@ -13,9 +13,9 @@ function u(t) {
|
|
|
13
13
|
}
|
|
14
14
|
function d({ entity: e, resource: d, label: f, variant: p = "icon" }) {
|
|
15
15
|
let [m, h] = n(!1), g = t(e, d), _ = u(e);
|
|
16
|
-
if (!
|
|
16
|
+
if (!c(_.featureFlag, _.defaultEnabled)) return null;
|
|
17
17
|
let v = `${e}-share-button`;
|
|
18
|
-
return /* @__PURE__ */ o(
|
|
18
|
+
return /* @__PURE__ */ o(s, {
|
|
19
19
|
permission: _.permission,
|
|
20
20
|
children: [p === "button" ? /* @__PURE__ */ o("button", {
|
|
21
21
|
type: "button",
|
|
@@ -4,13 +4,13 @@ import { useState as n } from "react";
|
|
|
4
4
|
import { Share2 as r } from "lucide-react";
|
|
5
5
|
import { getStoredWorkspaceId as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { PermissionGate as s } from "@burdenoff/fe-libs/shared/components";
|
|
8
|
+
import { useFeatureFlag as c } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
9
9
|
import { ShareDialog as l } from "@burdenoff/fe-libs/sharing";
|
|
10
10
|
//#region src/components/sharing/VibeShareButton.tsx
|
|
11
11
|
function u({ vibe: u, label: d, showLabel: f = !0 }) {
|
|
12
12
|
let [p, m] = n(!1), h = t(u), g = e.vibe;
|
|
13
|
-
return
|
|
13
|
+
return c(g.featureFlag, g.defaultEnabled) ? /* @__PURE__ */ o(s, {
|
|
14
14
|
permission: g.permission,
|
|
15
15
|
children: [/* @__PURE__ */ o("button", {
|
|
16
16
|
type: "button",
|
|
@@ -59,8 +59,8 @@ import { NetworkStatus as Gt } from "@apollo/client";
|
|
|
59
59
|
import { usePermissions as Kt } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
60
60
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
61
61
|
import { Button as _, Checkbox as qt, NextSteps as Jt, PagePurpose as Yt } from "@burdenoff/fe-libs/ui";
|
|
62
|
-
import { useFeatureFlagDetails as Xt } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
63
62
|
import { PermissionButton as v } from "@burdenoff/fe-libs/shared/components";
|
|
63
|
+
import { useFeatureFlagDetails as Xt } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
64
64
|
import { Tabs as Zt } from "@burdenoff/fe-libs/chrome";
|
|
65
65
|
import { MotionPage as Qt } from "@burdenoff/fe-libs/shared/motion";
|
|
66
66
|
import { usePluginContributions as $t } from "@burdenoff/fe-libs/shared/plugins";
|
|
@@ -16,13 +16,13 @@ import { ChevronRight as p, RefreshCw as m, RotateCcw as h, Save as g, SlidersHo
|
|
|
16
16
|
import { usePermissions as ce } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
17
17
|
import { Fragment as le, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
18
18
|
import { Button as ue, CTAOverflowMenu as de, PagePurpose as fe } from "@burdenoff/fe-libs/ui";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
19
|
+
import { PermissionButton as pe } from "@burdenoff/fe-libs/shared/components";
|
|
20
|
+
import { useFeatureFlag as me } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
21
21
|
import { MotionItem as x, MotionList as S, MotionPage as C } from "@burdenoff/fe-libs/shared/motion";
|
|
22
22
|
//#region src/pages/SettingsPage.tsx
|
|
23
23
|
var he = "vibecontrols.webhooks", ge = "/webhooks";
|
|
24
24
|
function w() {
|
|
25
|
-
let { hasPermission: w, isLoading: T } = ce(), { workspaceId: E } = ne(), D = r(), { t: O } = f(), k = w(s.CONFIG_UPDATE), A = w(s.WEBHOOK_LIST), j =
|
|
25
|
+
let { hasPermission: w, isLoading: T } = ce(), { workspaceId: E } = ne(), D = r(), { t: O } = f(), k = w(s.CONFIG_UPDATE), A = w(s.WEBHOOK_LIST), j = me(he, !0), [M, N] = d("notifications"), [P, F] = d(!1), [I, L] = d(null), { agents: R } = i(), _e = u(() => R.map((e) => ({
|
|
26
26
|
id: e.id,
|
|
27
27
|
name: e.name,
|
|
28
28
|
isActive: e.isActive
|
|
@@ -189,7 +189,7 @@ function w() {
|
|
|
189
189
|
actions: k ? /* @__PURE__ */ b("div", {
|
|
190
190
|
"data-tour": "settings-actions",
|
|
191
191
|
className: "flex items-center gap-2",
|
|
192
|
-
children: [/* @__PURE__ */ y(
|
|
192
|
+
children: [/* @__PURE__ */ y(pe, {
|
|
193
193
|
permission: s.CONFIG_UPDATE,
|
|
194
194
|
children: /* @__PURE__ */ b(ue, {
|
|
195
195
|
type: "button",
|
|
@@ -46,8 +46,8 @@ import { usePermissions as et } from "@burdenoff/fe-libs/shared/providers/shell"
|
|
|
46
46
|
import { AnimatePresence as tt, motion as M } from "framer-motion";
|
|
47
47
|
import { Fragment as nt, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
48
48
|
import { NextSteps as rt, PagePurpose as it } from "@burdenoff/fe-libs/ui";
|
|
49
|
-
import { useFeatureFlagDetails as F } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
50
49
|
import { AccessDenied as at, PermissionButton as ot } from "@burdenoff/fe-libs/shared/components";
|
|
50
|
+
import { useFeatureFlagDetails as F } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
51
51
|
import { MotionItem as I, MotionList as st, MotionPage as L } from "@burdenoff/fe-libs/shared/motion";
|
|
52
52
|
import { usePluginContributions as ct } from "@burdenoff/fe-libs/shared/plugins";
|
|
53
53
|
//#region src/pages/VibeDetailsPage.tsx
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { QuotaExhaustedDialog as e } from "../components/shared/QuotaExhaustedDialog.js";
|
|
2
|
-
import { QUOTA_EXHAUSTED_EVENT as t,
|
|
3
|
-
import { BILLING_PLANS_ROUTE as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { useEventBus as
|
|
2
|
+
import { QUOTA_EXHAUSTED_EVENT as t, VIBECONTROLS_QUOTA_PRODUCT as n, getQuotaDialogContent as r, wasQuotaHandledLocally as i } from "../utils/quotaUtils.js";
|
|
3
|
+
import { BILLING_PLANS_ROUTE as a, useVibeNavigate as o } from "./VibeControlsProvider.js";
|
|
4
|
+
import { useCallback as s, useEffect as c, useState as l } from "react";
|
|
5
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
6
|
+
import { useEventBus as p } from "@burdenoff/fe-libs/shared/events";
|
|
7
|
+
import { useQuotaDialogOwnership as m } from "@burdenoff/fe-libs/shared/components";
|
|
7
8
|
//#region src/providers/QuotaExhaustedProvider.tsx
|
|
8
|
-
var
|
|
9
|
+
var h = {
|
|
9
10
|
open: !1,
|
|
10
11
|
kind: "generic"
|
|
11
|
-
},
|
|
12
|
+
}, g = {
|
|
12
13
|
agent: "vibecontrols.quota.agent_limit_hit",
|
|
13
14
|
session: "vibecontrols.quota.session_limit_hit",
|
|
14
15
|
tunnel: "vibecontrols.quota.tunnel_limit_hit",
|
|
15
16
|
"tunnel-start": "vibecontrols.quota.tunnel_limit_hit",
|
|
16
17
|
"tunnel-subdomain": "vibecontrols.quota.tunnel_limit_hit"
|
|
17
18
|
};
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
|
|
19
|
+
function _({ children: _ }) {
|
|
20
|
+
let v = o(), y = p(), [b, x] = l(h);
|
|
21
|
+
m(n), c(() => {
|
|
21
22
|
let e = /* @__PURE__ */ new Set(), n = (t) => {
|
|
22
|
-
let n = t.detail,
|
|
23
|
-
if (e.delete(
|
|
24
|
-
let t = n?.kind ?? "generic", a =
|
|
25
|
-
a &&
|
|
23
|
+
let n = t.detail, r = window.setTimeout(() => {
|
|
24
|
+
if (e.delete(r), i()) return;
|
|
25
|
+
let t = n?.kind ?? "generic", a = g[t];
|
|
26
|
+
a && y.emitCustom(a, {}), x({
|
|
26
27
|
open: !0,
|
|
27
28
|
kind: t
|
|
28
29
|
});
|
|
29
30
|
}, 0);
|
|
30
|
-
e.add(
|
|
31
|
+
e.add(r);
|
|
31
32
|
};
|
|
32
33
|
return window.addEventListener(t, n), () => {
|
|
33
34
|
window.removeEventListener(t, n);
|
|
@@ -35,24 +36,24 @@ function h({ children: h }) {
|
|
|
35
36
|
e.clear();
|
|
36
37
|
};
|
|
37
38
|
}, []);
|
|
38
|
-
let
|
|
39
|
-
|
|
39
|
+
let S = s(() => {
|
|
40
|
+
x((e) => ({
|
|
40
41
|
...e,
|
|
41
42
|
open: !1
|
|
42
43
|
}));
|
|
43
|
-
}, []),
|
|
44
|
-
|
|
44
|
+
}, []), C = s(() => {
|
|
45
|
+
x((e) => ({
|
|
45
46
|
...e,
|
|
46
47
|
open: !1
|
|
47
|
-
})),
|
|
48
|
-
}, [
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
isOpen:
|
|
51
|
-
onClose:
|
|
52
|
-
onConfirm:
|
|
53
|
-
title:
|
|
54
|
-
message:
|
|
48
|
+
})), v(a);
|
|
49
|
+
}, [v]), w = r(b.kind);
|
|
50
|
+
return /* @__PURE__ */ f(u, { children: [_, /* @__PURE__ */ d(e, {
|
|
51
|
+
isOpen: b.open,
|
|
52
|
+
onClose: S,
|
|
53
|
+
onConfirm: C,
|
|
54
|
+
title: w.title,
|
|
55
|
+
message: w.message
|
|
55
56
|
})] });
|
|
56
57
|
}
|
|
57
58
|
//#endregion
|
|
58
|
-
export {
|
|
59
|
+
export { _ as QuotaExhaustedProvider };
|
package/dist/utils/quotaUtils.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
+
import { quotaExhaustedEventName as e } from "@burdenoff/fe-libs/shared/assistant/quota";
|
|
1
2
|
//#region src/utils/quotaUtils.ts
|
|
2
|
-
function
|
|
3
|
+
function t(e) {
|
|
3
4
|
return e?.some((e) => e.extensions?.code === "QUOTA_EXHAUSTED" || e.extensions?.errorCode === "QUOTA_EXHAUSTED" || e.message?.includes("QUOTA_EXHAUSTED")) ?? !1;
|
|
4
5
|
}
|
|
5
|
-
function
|
|
6
|
+
function n(e, t) {
|
|
6
7
|
if (!e || typeof e != "object") return;
|
|
7
8
|
let n = e[t];
|
|
8
9
|
return Array.isArray(n) ? n : void 0;
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
if (
|
|
12
|
-
if (!
|
|
13
|
-
let r =
|
|
11
|
+
function r(e) {
|
|
12
|
+
if (e instanceof Error && (e.message.includes("QUOTA_EXHAUSTED") || e.message.toLowerCase().includes("quota exhausted"))) return !0;
|
|
13
|
+
if (!e || typeof e != "object") return !1;
|
|
14
|
+
let r = e.statusCode;
|
|
14
15
|
if (typeof r == "number" && r === 429) return !0;
|
|
15
|
-
let i =
|
|
16
|
-
if (typeof i == "string" && i.includes("QUOTA_EXHAUSTED") ||
|
|
17
|
-
let a =
|
|
18
|
-
if (
|
|
19
|
-
let o =
|
|
16
|
+
let i = e.bodyText;
|
|
17
|
+
if (typeof i == "string" && i.includes("QUOTA_EXHAUSTED") || t("graphQLErrors" in e && Array.isArray(e.graphQLErrors) ? e.graphQLErrors : void 0) || t(n(e, "errors"))) return !0;
|
|
18
|
+
let a = e.result;
|
|
19
|
+
if (t(n(a, "errors"))) return !0;
|
|
20
|
+
let o = e.networkError;
|
|
20
21
|
if (o && typeof o == "object") {
|
|
21
|
-
let
|
|
22
|
-
if (
|
|
22
|
+
let e = o.result;
|
|
23
|
+
if (t(n(e, "errors"))) return !0;
|
|
23
24
|
let r = o.statusCode;
|
|
24
25
|
if (typeof r == "number" && r === 429) return !0;
|
|
25
26
|
let i = o.bodyText;
|
|
@@ -27,7 +28,7 @@ function n(n) {
|
|
|
27
28
|
}
|
|
28
29
|
return !1;
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function i(e) {
|
|
31
32
|
let t = {
|
|
32
33
|
session: {
|
|
33
34
|
title: "Session Quota Reached",
|
|
@@ -144,7 +145,7 @@ function r(e) {
|
|
|
144
145
|
};
|
|
145
146
|
return t[e] ?? t.generic;
|
|
146
147
|
}
|
|
147
|
-
var
|
|
148
|
+
var a = [
|
|
148
149
|
[/aicredit|aitoken|checkaicredits|reportaitokenusage/i, "ai-credits"],
|
|
149
150
|
[/tunneldomain|subdomain|customtunneldomain/i, "tunnel-subdomain"],
|
|
150
151
|
[/starttunnel|issuetunnelsession/i, "tunnel-start"],
|
|
@@ -173,19 +174,19 @@ var i = [
|
|
|
173
174
|
[/action/i, "action"],
|
|
174
175
|
[/secret|vault/i, "secret"]
|
|
175
176
|
];
|
|
176
|
-
function
|
|
177
|
+
function o(e) {
|
|
177
178
|
if (!e) return "generic";
|
|
178
|
-
for (let [t, n] of
|
|
179
|
+
for (let [t, n] of a) if (t.test(e)) return n;
|
|
179
180
|
return "generic";
|
|
180
181
|
}
|
|
181
|
-
var
|
|
182
|
-
function
|
|
183
|
-
typeof window > "u" || (window[
|
|
182
|
+
var s = "vibecontrols", c = e(s), l = "__vibecontrolsQuotaLocalHandled";
|
|
183
|
+
function u() {
|
|
184
|
+
typeof window > "u" || (window[l] = Date.now());
|
|
184
185
|
}
|
|
185
|
-
function
|
|
186
|
+
function d() {
|
|
186
187
|
if (typeof window > "u") return !1;
|
|
187
|
-
let e = window[
|
|
188
|
+
let e = window[l];
|
|
188
189
|
return e ? Date.now() - e < 250 : !1;
|
|
189
190
|
}
|
|
190
191
|
//#endregion
|
|
191
|
-
export {
|
|
192
|
+
export { c as QUOTA_EXHAUSTED_EVENT, s as VIBECONTROLS_QUOTA_PRODUCT, i as getQuotaDialogContent, o as inferQuotaKindFromOperation, r as isQuotaExhaustedError, u as markQuotaHandledLocally, d as wasQuotaHandledLocally };
|