@burdenoff/microfe-bigconsole 2026.1012.9 → 2026.1013.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/dist/bigconsole/assistant/createSandboxAssistantTransport.js +5 -5
- package/dist/bigconsole/components/embed/widgets/ChartEmbed.js +1 -1
- package/dist/bigconsole/components/insights/GeneratedFormattingReview.d.ts +8 -0
- package/dist/bigconsole/components/insights/GeneratedFormattingReview.js +122 -0
- package/dist/bigconsole/components/widgets/gauge/CircularGauge.js +4 -6
- package/dist/bigconsole/pages/InsightsPage.js +325 -317
- package/dist/bigconsole/utils/quota.js +1 -1
- package/dist/node_modules/@e965/xlsx/xlsx.js +32 -32
- package/dist/node_modules/pdfjs-dist/build/pdf.js +17 -14
- package/package.json +30 -12
|
@@ -7,7 +7,7 @@ import { gatherPageContext as te } from "./pageContext.js";
|
|
|
7
7
|
import { useCallback as v, useMemo as y, useRef as b } from "react";
|
|
8
8
|
import { useAuthToken as x } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
9
9
|
//#region src/bigconsole/assistant/createSandboxAssistantTransport.ts
|
|
10
|
-
var S = "api-calls", ne = 42e4, re = 1500, ie = 3e4, C = 200, w = 25,
|
|
10
|
+
var S = "api-calls", ne = 42e4, re = 1500, ie = 3e4, C = 200, w = 25, T = "bc-assistant-conversation-id", ae = {
|
|
11
11
|
isCachedAssistantSandboxReusable: o,
|
|
12
12
|
findExistingSandbox: i,
|
|
13
13
|
createAssistantSandbox: t,
|
|
@@ -131,7 +131,7 @@ function z(e, t, n, r) {
|
|
|
131
131
|
function B(e) {
|
|
132
132
|
return e.replace(/(Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/(X-Workspace-Authorization\s*:\s*Bearer\s+)[^\s\n]+/gi, "$1[REDACTED]").replace(/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9._-]+\.[A-Za-z0-9._-]+\b/g, "[REDACTED_JWT]").replace(/\bsk-ant-[A-Za-z0-9-]+\b/g, "[REDACTED_API_KEY]");
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function oe(e) {
|
|
135
135
|
let t = e instanceof Error ? e.message.toLowerCase() : String(e).toLowerCase();
|
|
136
136
|
return t.includes("rate limit exceeded") || t.includes("unauthorized") || t.includes("k8s api error 401") ? !1 : [
|
|
137
137
|
"sandbox not found",
|
|
@@ -171,7 +171,7 @@ function V() {
|
|
|
171
171
|
workspaceId: e,
|
|
172
172
|
mode: S,
|
|
173
173
|
authContext: n,
|
|
174
|
-
api:
|
|
174
|
+
api: ae,
|
|
175
175
|
hasAccessToken: () => !!t(),
|
|
176
176
|
store: {
|
|
177
177
|
getSandboxId: () => N.current,
|
|
@@ -271,7 +271,7 @@ function V() {
|
|
|
271
271
|
stack: t instanceof Error ? t.stack : void 0,
|
|
272
272
|
sandboxId: N.current,
|
|
273
273
|
sessionId: P.current
|
|
274
|
-
}), e === 1 &&
|
|
274
|
+
}), e === 1 && oe(t)) return R(null), V(null), g(2);
|
|
275
275
|
throw t;
|
|
276
276
|
}
|
|
277
277
|
};
|
|
@@ -302,7 +302,7 @@ function V() {
|
|
|
302
302
|
]), K = v((e) => e.length === 0 ? null : [
|
|
303
303
|
"You are resuming an earlier conversation. What follows is what was said in it — treat it as your own memory and continue seamlessly. Do not mention this replay, and do not redo work that was already completed.",
|
|
304
304
|
"--- earlier in this conversation ---",
|
|
305
|
-
e.map((e) => `${e.role === "user" ? "User" : "Assistant"}: ${e.content}`).join("\n\n").slice(-
|
|
305
|
+
e.map((e) => `${e.role === "user" ? "User" : "Assistant"}: ${e.content}`).join("\n\n").slice(-6e3),
|
|
306
306
|
"--- end ---"
|
|
307
307
|
].join("\n\n"), []), q = v((e) => e.map((e) => ({
|
|
308
308
|
id: e.id,
|
|
@@ -116,7 +116,7 @@ function j(o, s) {
|
|
|
116
116
|
function M(e) {
|
|
117
117
|
return i(r(e).rows, E).map((e) => {
|
|
118
118
|
let t = {};
|
|
119
|
-
for (let [n, r] of Object.entries(e).slice(0,
|
|
119
|
+
for (let [n, r] of Object.entries(e).slice(0, 24)) typeof r == "string" ? t[n] = r.slice(0, 200) : typeof r == "number" && Number.isFinite(r) && (t[n] = r);
|
|
120
120
|
return t;
|
|
121
121
|
});
|
|
122
122
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Legacy enablement-only metadata never establishes which provider produced a draft. */
|
|
2
|
+
export declare function GenerationExecutionStatus({ metadata }: {
|
|
3
|
+
metadata?: Record<string, unknown> | null;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
/** Read-only proposal details; creation and server validation retain their existing owners. */
|
|
6
|
+
export declare function GeneratedFormattingReview({ config }: {
|
|
7
|
+
config?: Record<string, unknown> | null;
|
|
8
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { useI18n as e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/bigconsole/components/insights/GeneratedFormattingReview.tsx
|
|
4
|
+
var r = {
|
|
5
|
+
gt: ">",
|
|
6
|
+
gte: "≥",
|
|
7
|
+
lt: "<",
|
|
8
|
+
lte: "≤",
|
|
9
|
+
eq: "=",
|
|
10
|
+
neq: "≠",
|
|
11
|
+
between: "between",
|
|
12
|
+
outside: "outside",
|
|
13
|
+
contains: "contains",
|
|
14
|
+
notContains: "does not contain",
|
|
15
|
+
startsWith: "starts with",
|
|
16
|
+
endsWith: "ends with",
|
|
17
|
+
isEmpty: "is empty",
|
|
18
|
+
isNotEmpty: "is not empty"
|
|
19
|
+
}, i = {
|
|
20
|
+
textColor: "Text color",
|
|
21
|
+
bgColor: "Background",
|
|
22
|
+
bold: "Bold",
|
|
23
|
+
icon: "Icon",
|
|
24
|
+
dataBar: "Data bar",
|
|
25
|
+
dataBarColor: "Data bar color"
|
|
26
|
+
}, a = {
|
|
27
|
+
xAxisField: "Horizontal field",
|
|
28
|
+
xAxisLabel: "Horizontal label",
|
|
29
|
+
yAxisLabel: "Vertical label",
|
|
30
|
+
yAxisRightLabel: "Right vertical label",
|
|
31
|
+
dualAxis: "Two vertical axes",
|
|
32
|
+
logScale: "Logarithmic scale"
|
|
33
|
+
};
|
|
34
|
+
function o(e) {
|
|
35
|
+
return !e || typeof e != "object" || Array.isArray(e) ? null : e;
|
|
36
|
+
}
|
|
37
|
+
function s({ metadata: t }) {
|
|
38
|
+
let { t: r } = e(), i = r("bigconsole.insights.preview.sourceUnknown", "Source unverified");
|
|
39
|
+
return t?.executionReceiptVersion === 1 && typeof t.fallbackUsed == "boolean" && (t.executionPath === "llm" && t.provider === "openai" && t.fallbackUsed === !1 && typeof t.model == "string" && t.model.trim().length > 0 && t.model.length <= 128 && t.model !== "heuristic-v1" ? i = r("bigconsole.insights.preview.sourceModel", "Model draft") : t.provider === "local" && t.model === "heuristic-v1" && (t.executionPath === "heuristic" && (i = t.fallbackUsed ? r("bigconsole.insights.preview.sourceFallback", "Heuristic draft after provider fallback") : r("bigconsole.insights.preview.sourceHeuristic", "Heuristic draft")), t.executionPath === "local-refinement" && (i = t.fallbackUsed ? r("bigconsole.insights.preview.sourceRefinementFallback", "Local refinement after provider fallback") : r("bigconsole.insights.preview.sourceRefinement", "Local refinement")))), /* @__PURE__ */ n("p", {
|
|
40
|
+
"data-testid": "preview-generation-source",
|
|
41
|
+
children: [
|
|
42
|
+
r("bigconsole.insights.preview.sourceLabel", "Generation source"),
|
|
43
|
+
": ",
|
|
44
|
+
i
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function c(e) {
|
|
49
|
+
return typeof e == "string" ? e.slice(0, 128) : typeof e == "number" && Number.isFinite(e) || typeof e == "boolean" ? String(e) : "—";
|
|
50
|
+
}
|
|
51
|
+
function l(e) {
|
|
52
|
+
let t = o(e);
|
|
53
|
+
if (!t || typeof t.operator != "string" || !Object.hasOwn(r, t.operator)) return "Unrecognized rule; refine the draft before approval.";
|
|
54
|
+
let n = t.operator === "isEmpty" || t.operator === "isNotEmpty" ? "" : t.operator === "between" || t.operator === "outside" ? `${c(t.value)} and ${c(t.value2)}` : c(t.value), a = o(t.style), s = a ? [
|
|
55
|
+
"textColor",
|
|
56
|
+
"bgColor",
|
|
57
|
+
"bold",
|
|
58
|
+
"icon",
|
|
59
|
+
"dataBar",
|
|
60
|
+
"dataBarColor"
|
|
61
|
+
].filter((e) => a[e] !== void 0).map((e) => `${i[e]}: ${c(a[e])}`).join(", ") : "";
|
|
62
|
+
return `${t.field === void 0 ? "This value" : c(t.field)} ${r[t.operator]} ${n} → ${s || "No supported style"}`;
|
|
63
|
+
}
|
|
64
|
+
function u({ config: r }) {
|
|
65
|
+
let { t: i } = e();
|
|
66
|
+
if (!r) return null;
|
|
67
|
+
let s = [], u = (e, t) => {
|
|
68
|
+
if (t === void 0) return;
|
|
69
|
+
let n = Array.isArray(t) ? t.slice(0, 32).map(l) : ["Unrecognized rule list; refine the draft before approval."];
|
|
70
|
+
Array.isArray(t) && t.length > 32 && n.push("More than 32 rules; refine the draft before approval."), n.length && s.push({
|
|
71
|
+
label: e,
|
|
72
|
+
values: n
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
if (u(i("bigconsole.insights.preview.tableRules", "Widget formatting"), r.conditionalRules), u(i("bigconsole.insights.preview.rowRules", "Whole-row formatting"), r.rowRules), Array.isArray(r.columns)) {
|
|
76
|
+
for (let e of r.columns.slice(0, 64)) {
|
|
77
|
+
let t = o(e);
|
|
78
|
+
t && u(`${i("bigconsole.insights.preview.columnRules", "Column")}: ${c(t.key ?? t.field)}`, t.conditionalRules);
|
|
79
|
+
}
|
|
80
|
+
r.columns.length > 64 && s.push({
|
|
81
|
+
label: i("bigconsole.insights.preview.columnRules", "Column"),
|
|
82
|
+
values: [i("bigconsole.insights.preview.columnLimit", "Only the first 64 columns are shown. Review the remaining columns before approval.")]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (r.referenceLines !== void 0) {
|
|
86
|
+
let e = Array.isArray(r.referenceLines) ? r.referenceLines.slice(0, 32).map((e) => {
|
|
87
|
+
let t = o(e);
|
|
88
|
+
return t ? `${c(t.axis ?? "y")} = ${c(t.value)}${t.value2 === void 0 ? "" : ` to ${c(t.value2)}`} · ${c(t.color ?? "neutral")}${t.label === void 0 ? "" : ` · ${c(t.label)}`}` : "Unrecognized reference; refine the draft before approval.";
|
|
89
|
+
}) : ["Unrecognized references; refine the draft before approval."];
|
|
90
|
+
Array.isArray(r.referenceLines) && r.referenceLines.length > 32 && e.push("More than 32 references; refine the draft before approval."), e.length && s.push({
|
|
91
|
+
label: i("bigconsole.insights.preview.references", "Chart references"),
|
|
92
|
+
values: e
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
let d = [
|
|
96
|
+
"xAxisField",
|
|
97
|
+
"xAxisLabel",
|
|
98
|
+
"yAxisLabel",
|
|
99
|
+
"yAxisRightLabel",
|
|
100
|
+
"dualAxis",
|
|
101
|
+
"logScale"
|
|
102
|
+
].filter((e) => r[e] !== void 0).map((e) => `${a[e]}: ${c(r[e])}`);
|
|
103
|
+
return d.length && s.push({
|
|
104
|
+
label: i("bigconsole.insights.preview.axes", "Chart axes"),
|
|
105
|
+
values: d
|
|
106
|
+
}), s.length ? /* @__PURE__ */ n("section", {
|
|
107
|
+
"aria-label": i("bigconsole.insights.preview.formatting", "Formatting to review"),
|
|
108
|
+
"data-testid": "preview-formatting-rules",
|
|
109
|
+
style: {
|
|
110
|
+
minWidth: 0,
|
|
111
|
+
overflowWrap: "anywhere",
|
|
112
|
+
fontSize: "var(--font-size-body-sm)"
|
|
113
|
+
},
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ t("h4", { children: i("bigconsole.insights.preview.formatting", "Formatting to review") }),
|
|
116
|
+
/* @__PURE__ */ t("p", { children: i("bigconsole.insights.preview.formattingHint", "Check the field, comparison and styling before creating the dashboard. > excludes the exact threshold; ≥ includes it.") }),
|
|
117
|
+
s.map((e, r) => /* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("strong", { children: e.label }), /* @__PURE__ */ t("ul", { children: e.values.map((e, n) => /* @__PURE__ */ t("li", { children: e }, n)) })] }, r))
|
|
118
|
+
]
|
|
119
|
+
}) : null;
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
122
|
+
export { u as GeneratedFormattingReview, s as GenerationExecutionStatus };
|
|
@@ -13,16 +13,14 @@ function a(e, t) {
|
|
|
13
13
|
}
|
|
14
14
|
var o = e(function({ value: e, min: o = 0, max: s = 100, size: c = 120, strokeWidth: l = 12, thresholds: u, unit: d, showValue: f = !0, formatValue: p = (e) => e.toFixed(0) }) {
|
|
15
15
|
let m = t(() => {
|
|
16
|
-
let t = (c - l) / 2, n = t * Math.PI * 2, r = -
|
|
17
|
-
45 - r;
|
|
18
|
-
let a = (Math.max(o, Math.min(s, e)) - o) / i(o, s);
|
|
16
|
+
let t = (c - l) / 2, n = t * Math.PI * 2, r = (Math.max(o, Math.min(s, e)) - o) / i(o, s);
|
|
19
17
|
return {
|
|
20
18
|
radius: t,
|
|
21
19
|
circumference: n,
|
|
22
|
-
arcLength:
|
|
20
|
+
arcLength: r * 270 / 360 * n,
|
|
23
21
|
backgroundArcLength: 270 / 360 * n,
|
|
24
|
-
startAngle:
|
|
25
|
-
percentage:
|
|
22
|
+
startAngle: -225,
|
|
23
|
+
percentage: r
|
|
26
24
|
};
|
|
27
25
|
}, [
|
|
28
26
|
c,
|