@flamingo-stack/openframe-frontend-core 0.0.821 → 0.0.823
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/build/export-map.json +1 -1
- package/dist/chat-protocol/citation-chip.d.ts +20 -0
- package/dist/chat-protocol/citation-chip.d.ts.map +1 -0
- package/dist/chat-protocol/citation-chip.js +25 -0
- package/dist/chat-protocol/index.cjs +25 -0
- package/dist/chat-protocol/index.d.ts +1 -0
- package/dist/chat-protocol/index.d.ts.map +1 -1
- package/dist/chat-protocol/index.js +1 -0
- package/dist/{chunk-YCE7A63X.cjs → chunk-2LT2WR4O.cjs} +24 -13
- package/dist/{chunk-OEKVCVOS.cjs → chunk-2U6MAM6D.cjs} +47 -47
- package/dist/{chunk-LQF5F7LF.cjs → chunk-3JCDSZ6D.cjs} +4 -4
- package/dist/{chunk-7DIWYZPQ.cjs → chunk-AK7MYM25.cjs} +3 -3
- package/dist/{chunk-2WHKEYDX.cjs → chunk-DEWT25QK.cjs} +53 -53
- package/dist/{chunk-FTD3CZAS.cjs → chunk-DYSMAPSI.cjs} +4 -4
- package/dist/{chunk-N2XHQVWX.cjs → chunk-GP2Y3DBE.cjs} +6 -6
- package/dist/{chunk-LWOXKF5P.cjs → chunk-HWXFUI3R.cjs} +19 -19
- package/dist/{chunk-7QGK76LC.cjs → chunk-K7NGDYBG.cjs} +108 -106
- package/dist/{chunk-P2ZIQ72J.cjs → chunk-KWS7YKCO.cjs} +10 -10
- package/dist/{chunk-GQHXJGA2.cjs → chunk-L7YE6APP.cjs} +9 -9
- package/dist/{chunk-QFNQSZ4H.cjs → chunk-SBXL5EKE.cjs} +16 -16
- package/dist/{chunk-3SE34JVB.cjs → chunk-TJFVIJPV.cjs} +2 -2
- package/dist/{chunk-BY2PLXYC.cjs → chunk-U7CH53FT.cjs} +7 -7
- package/dist/{chunk-V26M75GV.cjs → chunk-UUFL4FDS.cjs} +11 -11
- package/dist/{chunk-RRLJ5PNL.cjs → chunk-Y3MPERIZ.cjs} +3 -3
- package/dist/{chunk-IS6BQSL6.cjs → chunk-Y7BTM2NC.cjs} +39 -39
- package/dist/{chunk-CA7X6CCJ.cjs → chunk-YMDSCI4E.cjs} +32 -32
- package/dist/{cloud-tenants-M34P47GS.cjs → cloud-tenants-VQQ2KNJI.cjs} +4 -4
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/remark-strip-citations.d.ts +3 -4
- package/dist/components/chat/remark-strip-citations.d.ts.map +1 -1
- package/dist/components/chat/remark-strip-citations.js +3 -13
- package/dist/components/chat/utils/cited-sources.d.ts.map +1 -1
- package/dist/components/chat/utils/cited-sources.js +2 -6
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/help-center-pages/index.cjs +61 -61
- package/dist/components/index.cjs +37 -37
- package/dist/components/meeting-scheduler/index.cjs +29 -29
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/product-demo/index.cjs +13 -13
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/ui/file-upload.d.ts +3 -1
- package/dist/components/ui/file-upload.d.ts.map +1 -1
- package/dist/components/ui/file-upload.js +2 -1
- package/dist/components/ui/image-uploader.d.ts +3 -1
- package/dist/components/ui/image-uploader.d.ts.map +1 -1
- package/dist/components/ui/image-uploader.js +2 -1
- package/dist/components/ui/index.cjs +4 -4
- package/dist/{devices-SWFK4CPO.cjs → devices-KKJHYQ72.cjs} +5 -5
- package/dist/{embeddable-chat-J6CKPKKM.cjs → embeddable-chat-MQGYFYGX.cjs} +65 -69
- package/dist/index.cjs +8 -8
- package/dist/{knowledge-N5FDIA33.cjs → knowledge-VMLXNFDI.cjs} +5 -5
- package/dist/{logs-OEK7GMEB.cjs → logs-EFXRQ6LV.cjs} +12 -12
- package/dist/{policies-Q7AS5AL6.cjs → policies-SU3NQPFV.cjs} +8 -8
- package/dist/{scripts-3XWEDB2A.cjs → scripts-WLLAUOAA.cjs} +9 -9
- package/dist/{software-update-6FOBLAOF.cjs → software-update-WKUDBC3U.cjs} +7 -7
- package/package.json +1 -1
- package/src/chat-protocol/citation-chip.ts +46 -0
- package/src/chat-protocol/index.ts +2 -0
- package/src/components/chat/remark-strip-citations.ts +7 -26
- package/src/components/chat/utils/cited-sources.ts +2 -8
- package/src/components/ui/file-upload.tsx +4 -1
- package/src/components/ui/image-uploader.tsx +4 -1
|
@@ -8,7 +8,7 @@ var _chunkLHV2R6QUcjs = require('./chunk-LHV2R6QU.cjs');
|
|
|
8
8
|
var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
|
|
12
12
|
require('./chunk-467T3LCG.cjs');
|
|
13
13
|
require('./chunk-EHANO6UE.cjs');
|
|
14
14
|
require('./chunk-IJCSQFLD.cjs');
|
|
@@ -21,10 +21,10 @@ require('./chunk-7Z536SPR.cjs');
|
|
|
21
21
|
require('./chunk-7DNL734S.cjs');
|
|
22
22
|
require('./chunk-MZ4KBSH7.cjs');
|
|
23
23
|
require('./chunk-5SZ4ILU3.cjs');
|
|
24
|
-
require('./chunk-
|
|
24
|
+
require('./chunk-SBXL5EKE.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk2LT2WR4Ocjs = require('./chunk-2LT2WR4O.cjs');
|
|
28
28
|
require('./chunk-OBQ5WUNG.cjs');
|
|
29
29
|
require('./chunk-6CZVQ72C.cjs');
|
|
30
30
|
require('./chunk-ZRDVFADQ.cjs');
|
|
@@ -1905,10 +1905,10 @@ function KnowledgeScreen(_props) {
|
|
|
1905
1905
|
const cast = _chunkLHV2R6QUcjs.useProductDemoCast.call(void 0, );
|
|
1906
1906
|
const fixture = _react.useMemo.call(void 0, () => buildKnowledgeFixture(cast), [cast]);
|
|
1907
1907
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1908
|
-
|
|
1908
|
+
_chunkK7NGDYBGcjs.KnowledgeBaseArticleView,
|
|
1909
1909
|
{
|
|
1910
1910
|
...fixture.article,
|
|
1911
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1911
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2LT2WR4Ocjs.SimpleMarkdownRenderer, { content: fixture.content, textSize: "compact" })
|
|
1912
1912
|
}
|
|
1913
1913
|
) });
|
|
1914
1914
|
}
|
|
@@ -16,7 +16,7 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
|
|
20
20
|
require('./chunk-467T3LCG.cjs');
|
|
21
21
|
require('./chunk-EHANO6UE.cjs');
|
|
22
22
|
require('./chunk-IJCSQFLD.cjs');
|
|
@@ -31,8 +31,8 @@ require('./chunk-MZ4KBSH7.cjs');
|
|
|
31
31
|
require('./chunk-5SZ4ILU3.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
35
|
-
require('./chunk-
|
|
34
|
+
var _chunkSBXL5EKEcjs = require('./chunk-SBXL5EKE.cjs');
|
|
35
|
+
require('./chunk-2LT2WR4O.cjs');
|
|
36
36
|
require('./chunk-OBQ5WUNG.cjs');
|
|
37
37
|
require('./chunk-6CZVQ72C.cjs');
|
|
38
38
|
require('./chunk-ZRDVFADQ.cjs');
|
|
@@ -1886,7 +1886,7 @@ function entry(logId, minutesAgo, severity, toolType, device2, summary) {
|
|
|
1886
1886
|
id: logId,
|
|
1887
1887
|
logId,
|
|
1888
1888
|
timestamp: displayTime(_chunkFDZOE5TLcjs.demoMinutesAgo.call(void 0, minutesAgo)),
|
|
1889
|
-
status: { label: severity, variant:
|
|
1889
|
+
status: { label: severity, variant: _chunkK7NGDYBGcjs.logSeverityVariant.call(void 0, severity) },
|
|
1890
1890
|
source: { name: toolType, toolType },
|
|
1891
1891
|
device: device2,
|
|
1892
1892
|
description: { title: summary }
|
|
@@ -1958,13 +1958,13 @@ var NO_FILTERS = {};
|
|
|
1958
1958
|
var ACTION_COLUMNS = ["copy", "quickView", "open"];
|
|
1959
1959
|
var BESIDE_DRAWER_HIDDEN = [...ACTION_COLUMNS, "tool", "source"];
|
|
1960
1960
|
var logHref = () => "#";
|
|
1961
|
-
var copyAction = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1961
|
+
var copyAction = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.LogCopyIconButton, {});
|
|
1962
1962
|
function LogsScreen({ compact = false }) {
|
|
1963
1963
|
const [dock, setDock] = _react.useState.call(void 0, null);
|
|
1964
1964
|
const selected = LOGS_FIXTURE_SELECTED;
|
|
1965
1965
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full bg-ods-bg", children: [
|
|
1966
1966
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 flex-1 overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1967
|
-
|
|
1967
|
+
_chunkK7NGDYBGcjs.LogsPageView,
|
|
1968
1968
|
{
|
|
1969
1969
|
showHeader: false,
|
|
1970
1970
|
className: "p-[var(--spacing-system-l)]",
|
|
@@ -1972,7 +1972,7 @@ function LogsScreen({ compact = false }) {
|
|
|
1972
1972
|
onSearchChange: noop,
|
|
1973
1973
|
onOpenFilters: noop,
|
|
1974
1974
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1975
|
-
|
|
1975
|
+
_chunkK7NGDYBGcjs.LogsTableView,
|
|
1976
1976
|
{
|
|
1977
1977
|
logs: LOGS_FIXTURE_ENTRIES,
|
|
1978
1978
|
facets: LOGS_FIXTURE_FACETS,
|
|
@@ -1986,8 +1986,8 @@ function LogsScreen({ compact = false }) {
|
|
|
1986
1986
|
)
|
|
1987
1987
|
}
|
|
1988
1988
|
) }),
|
|
1989
|
-
!compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: setDock, className: "relative w-[calc(400px+var(--spacing-system-m))] shrink-0", children: dock && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1990
|
-
|
|
1989
|
+
!compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: setDock, className: "relative w-[calc(400px+var(--spacing-system-m))] shrink-0", children: dock && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.AppLayoutDrawerContainerContext.Provider, { value: dock, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1990
|
+
_chunkK7NGDYBGcjs.LogDrawer,
|
|
1991
1991
|
{
|
|
1992
1992
|
docked: true,
|
|
1993
1993
|
isOpen: true,
|
|
@@ -1999,12 +1999,12 @@ function LogsScreen({ compact = false }) {
|
|
|
1999
1999
|
{ label: "Log ID", value: selected.logId },
|
|
2000
2000
|
{
|
|
2001
2001
|
label: "Source",
|
|
2002
|
-
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2002
|
+
value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.ToolBadge, { toolType: _chunkSBXL5EKEcjs.normalizeToolTypeWithFallback.call(void 0, selected.source.toolType) })
|
|
2003
2003
|
},
|
|
2004
|
-
{ label: "Device", value:
|
|
2004
|
+
{ label: "Device", value: _chunkK7NGDYBGcjs.logSourceLabels.call(void 0, selected.device).deviceName }
|
|
2005
2005
|
],
|
|
2006
2006
|
deviceCard: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2007
|
-
|
|
2007
|
+
_chunkK7NGDYBGcjs.DeviceCard,
|
|
2008
2008
|
{
|
|
2009
2009
|
...LOGS_FIXTURE_DEVICE,
|
|
2010
2010
|
actions: {
|
|
@@ -10,7 +10,7 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
|
|
14
14
|
require('./chunk-467T3LCG.cjs');
|
|
15
15
|
require('./chunk-EHANO6UE.cjs');
|
|
16
16
|
require('./chunk-IJCSQFLD.cjs');
|
|
@@ -23,8 +23,8 @@ require('./chunk-7Z536SPR.cjs');
|
|
|
23
23
|
require('./chunk-7DNL734S.cjs');
|
|
24
24
|
require('./chunk-MZ4KBSH7.cjs');
|
|
25
25
|
require('./chunk-5SZ4ILU3.cjs');
|
|
26
|
-
require('./chunk-
|
|
27
|
-
require('./chunk-
|
|
26
|
+
require('./chunk-SBXL5EKE.cjs');
|
|
27
|
+
require('./chunk-2LT2WR4O.cjs');
|
|
28
28
|
require('./chunk-OBQ5WUNG.cjs');
|
|
29
29
|
require('./chunk-6CZVQ72C.cjs');
|
|
30
30
|
require('./chunk-ZRDVFADQ.cjs');
|
|
@@ -1891,14 +1891,14 @@ var POLICIES = [
|
|
|
1891
1891
|
policy("policy-local-admins", "No local admins", "No everyday account is a local administrator.", false, 0)
|
|
1892
1892
|
];
|
|
1893
1893
|
var POLICIES_FIXTURE = {
|
|
1894
|
-
summary:
|
|
1894
|
+
summary: _chunkK7NGDYBGcjs.computePolicySummary.call(void 0, POLICIES),
|
|
1895
1895
|
rows: POLICIES.map((item) => ({
|
|
1896
1896
|
id: item.id,
|
|
1897
1897
|
name: item.name,
|
|
1898
1898
|
description: item.description,
|
|
1899
1899
|
critical: item.critical,
|
|
1900
1900
|
severityLabel: item.critical ? "Critical" : "Low",
|
|
1901
|
-
status:
|
|
1901
|
+
status: _chunkK7NGDYBGcjs.getPolicyTableStatus.call(void 0, item),
|
|
1902
1902
|
actions: [
|
|
1903
1903
|
{ label: "Policy Details", onClick: noop },
|
|
1904
1904
|
{ label: "Delete Policy", onClick: noop }
|
|
@@ -1912,16 +1912,16 @@ var POLICIES_FIXTURE = {
|
|
|
1912
1912
|
var _jsxruntime = require('react/jsx-runtime');
|
|
1913
1913
|
function PoliciesScreen({ compact = false }) {
|
|
1914
1914
|
const table = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1915
|
-
|
|
1915
|
+
_chunkK7NGDYBGcjs.PoliciesTable,
|
|
1916
1916
|
{
|
|
1917
1917
|
rows: POLICIES_FIXTURE.rows,
|
|
1918
1918
|
rowAsLink: true,
|
|
1919
|
-
rightSlot: compact ? void 0 : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1919
|
+
rightSlot: compact ? void 0 : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.DataTable.RowCount, {}),
|
|
1920
1920
|
emptyMessage: "No policies found."
|
|
1921
1921
|
}
|
|
1922
1922
|
);
|
|
1923
1923
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full flex-col gap-[var(--spacing-system-l)] bg-ods-bg p-[var(--spacing-system-l)]", children: [
|
|
1924
|
-
!compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1924
|
+
!compact && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.PolicySummaryCards, { summary: POLICIES_FIXTURE.summary, now: POLICIES_FIXTURE.now }),
|
|
1925
1925
|
table
|
|
1926
1926
|
] });
|
|
1927
1927
|
}
|
|
@@ -13,7 +13,7 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
|
|
17
17
|
require('./chunk-467T3LCG.cjs');
|
|
18
18
|
require('./chunk-EHANO6UE.cjs');
|
|
19
19
|
|
|
@@ -28,8 +28,8 @@ require('./chunk-7Z536SPR.cjs');
|
|
|
28
28
|
require('./chunk-7DNL734S.cjs');
|
|
29
29
|
require('./chunk-MZ4KBSH7.cjs');
|
|
30
30
|
require('./chunk-5SZ4ILU3.cjs');
|
|
31
|
-
require('./chunk-
|
|
32
|
-
require('./chunk-
|
|
31
|
+
require('./chunk-SBXL5EKE.cjs');
|
|
32
|
+
require('./chunk-2LT2WR4O.cjs');
|
|
33
33
|
require('./chunk-OBQ5WUNG.cjs');
|
|
34
34
|
require('./chunk-6CZVQ72C.cjs');
|
|
35
35
|
require('./chunk-ZRDVFADQ.cjs');
|
|
@@ -1995,8 +1995,8 @@ function buildScriptsFixture(cast) {
|
|
|
1995
1995
|
var _jsxruntime = require('react/jsx-runtime');
|
|
1996
1996
|
var WIDE_HIDDEN_COLUMNS = ["result", "open"];
|
|
1997
1997
|
var COMPACT_COLUMNS = [
|
|
1998
|
-
{ ...
|
|
1999
|
-
|
|
1998
|
+
{ ..._chunkK7NGDYBGcjs.EXECUTION_COLUMNS.machineId, width: "flex-1 min-w-0", hideAt: void 0 },
|
|
1999
|
+
_chunkK7NGDYBGcjs.EXECUTION_COLUMNS.status
|
|
2000
2000
|
];
|
|
2001
2001
|
var COMPACT_ROWS = 4;
|
|
2002
2002
|
var TOKEN_CLASS = {
|
|
@@ -2055,7 +2055,7 @@ function ScriptCodePicture({ script }) {
|
|
|
2055
2055
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 items-center justify-between gap-[var(--spacing-system-m)]", children: [
|
|
2056
2056
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIJCSQFLDcjs.TruncateText, { variant: "h6", tone: "secondary", children: `Written by ${provenance.author} \xB7 approved by ${provenance.approver}` }),
|
|
2057
2057
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2058
|
-
|
|
2058
|
+
_chunkK7NGDYBGcjs.ScriptShellBadge,
|
|
2059
2059
|
{
|
|
2060
2060
|
value: script.shellType,
|
|
2061
2061
|
className: "shrink-0 text-ods-text-secondary text-h6",
|
|
@@ -2079,7 +2079,7 @@ function ScriptsScreen({ compact = false }) {
|
|
|
2079
2079
|
return (
|
|
2080
2080
|
// Four runs of the card's row height fill the frame; the padding is what is left round them.
|
|
2081
2081
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full overflow-hidden bg-ods-bg p-[var(--spacing-system-xsf)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2082
|
-
|
|
2082
|
+
_chunkK7NGDYBGcjs.ScriptExecutionsTable,
|
|
2083
2083
|
{
|
|
2084
2084
|
rows: fixture.executions.slice(0, COMPACT_ROWS),
|
|
2085
2085
|
columns: COMPACT_COLUMNS,
|
|
@@ -2089,13 +2089,13 @@ function ScriptsScreen({ compact = false }) {
|
|
|
2089
2089
|
) })
|
|
2090
2090
|
);
|
|
2091
2091
|
}
|
|
2092
|
-
const renderOutput = (row) => row.id === fixture.openExecutionId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2092
|
+
const renderOutput = (row) => row.id === fixture.openExecutionId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkK7NGDYBGcjs.ScriptExecutionResult, { result: row.result, empty: "\u2014" }) : null;
|
|
2093
2093
|
return (
|
|
2094
2094
|
// The frame's tighter padding and no header row: the output opened under a run needs the height.
|
|
2095
2095
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full gap-[var(--spacing-system-m)] overflow-hidden bg-ods-bg p-[var(--spacing-system-m)]", children: [
|
|
2096
2096
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "w-[39%] shrink-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScriptCodePicture, { script: fixture.script }) }),
|
|
2097
2097
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2098
|
-
|
|
2098
|
+
_chunkK7NGDYBGcjs.ScriptExecutionsTable,
|
|
2099
2099
|
{
|
|
2100
2100
|
rows: fixture.executions,
|
|
2101
2101
|
hideColumns: WIDE_HIDDEN_COLUMNS,
|
|
@@ -15,7 +15,7 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkK7NGDYBGcjs = require('./chunk-K7NGDYBG.cjs');
|
|
19
19
|
require('./chunk-467T3LCG.cjs');
|
|
20
20
|
require('./chunk-EHANO6UE.cjs');
|
|
21
21
|
|
|
@@ -30,8 +30,8 @@ require('./chunk-7Z536SPR.cjs');
|
|
|
30
30
|
require('./chunk-7DNL734S.cjs');
|
|
31
31
|
require('./chunk-MZ4KBSH7.cjs');
|
|
32
32
|
require('./chunk-5SZ4ILU3.cjs');
|
|
33
|
-
require('./chunk-
|
|
34
|
-
require('./chunk-
|
|
33
|
+
require('./chunk-SBXL5EKE.cjs');
|
|
34
|
+
require('./chunk-2LT2WR4O.cjs');
|
|
35
35
|
require('./chunk-OBQ5WUNG.cjs');
|
|
36
36
|
require('./chunk-6CZVQ72C.cjs');
|
|
37
37
|
require('./chunk-ZRDVFADQ.cjs');
|
|
@@ -1922,12 +1922,12 @@ function StaticPackageField({ value }) {
|
|
|
1922
1922
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1923
1923
|
_chunkIJCSQFLDcjs.Autocomplete,
|
|
1924
1924
|
{
|
|
1925
|
-
label:
|
|
1925
|
+
label: _chunkK7NGDYBGcjs.PACKAGE_SEARCH_LABEL,
|
|
1926
1926
|
labelVariant: "large",
|
|
1927
1927
|
options: value ? [{ value: value.id, label: value.name, description: _nullishCoalesce(value.description, () => ( void 0)) }] : [],
|
|
1928
1928
|
value: _nullishCoalesce(_optionalChain([value, 'optionalAccess', _ => _.id]), () => ( null)),
|
|
1929
1929
|
onChange: noop,
|
|
1930
|
-
placeholder:
|
|
1930
|
+
placeholder: _chunkK7NGDYBGcjs.PACKAGE_SEARCH_PLACEHOLDER
|
|
1931
1931
|
}
|
|
1932
1932
|
);
|
|
1933
1933
|
}
|
|
@@ -1941,7 +1941,7 @@ function SoftwareUpdateScreen({ compact = false }) {
|
|
|
1941
1941
|
[fixture.devices, fixture.selectedIds]
|
|
1942
1942
|
);
|
|
1943
1943
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1944
|
-
|
|
1944
|
+
_chunkK7NGDYBGcjs.SoftwareActionForm,
|
|
1945
1945
|
{
|
|
1946
1946
|
action: fixture.action,
|
|
1947
1947
|
showHeader: false,
|
|
@@ -1953,7 +1953,7 @@ function SoftwareUpdateScreen({ compact = false }) {
|
|
|
1953
1953
|
initialValues: fixture.initialValues,
|
|
1954
1954
|
renderPackageSearch,
|
|
1955
1955
|
renderDevicePicker: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1956
|
-
|
|
1956
|
+
_chunkK7NGDYBGcjs.DeviceSelector,
|
|
1957
1957
|
{
|
|
1958
1958
|
devices: selected,
|
|
1959
1959
|
loading: false,
|
package/package.json
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `[N]` citation chip grammar: ONE definition for the server that writes chips into an answer and the clients
|
|
3
|
+
* that read them (the strip of cited sources) or hide them (beside cards).
|
|
4
|
+
*
|
|
5
|
+
* A chip names a retrieved source by its number: `[1]`, a comma list in one bracket (`[2, 3]`), or a run of them
|
|
6
|
+
* (`[1][2]`). A run counts as citations only when it stands apart from a word: whitespace or the start before it,
|
|
7
|
+
* whitespace, punctuation or the end after it, so `array[1]` or `foo[12]bar` in prose stays as written.
|
|
8
|
+
*
|
|
9
|
+
* Server-safe: no React, no browser APIs.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** One bracket: a number of one or two digits, or a comma list of them. */
|
|
13
|
+
const CHIP = '\\[\\d{1,2}(?:\\s*,\\s*\\d{1,2})*\\]';
|
|
14
|
+
|
|
15
|
+
/** A run of chips standing apart from a word; group 1 is the whitespace (or nothing) before it. */
|
|
16
|
+
function chipRunScanner(): RegExp {
|
|
17
|
+
return new RegExp(`(^|\\s)(?:${CHIP})+(?=[\\s.,;:!?)\\]]|$)`, 'g');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** The chips for these source numbers: `[1][3]`, each number once, in ascending order. */
|
|
21
|
+
export function formatCitationChips(numbers: Iterable<number>): string {
|
|
22
|
+
return [...new Set(numbers)]
|
|
23
|
+
.sort((a, b) => a - b)
|
|
24
|
+
.map(n => `[${n}]`)
|
|
25
|
+
.join('');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The text with its citation chips removed. A run goes with the spaces before it, so "the command [1]." reads
|
|
30
|
+
* "the command." and "the guide [3] covers it" reads "the guide covers it"; a line break before a run stays.
|
|
31
|
+
*/
|
|
32
|
+
export function stripCitationChips(text: string): string {
|
|
33
|
+
return text.replace(chipRunScanner(), (_run: string, lead: string) => (lead === ' ' || lead === '\t' ? '' : lead));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** The source numbers a text cites, in the order it first cites them, each once. */
|
|
37
|
+
export function citedSourceNumbers(text: string): number[] {
|
|
38
|
+
const numbers: number[] = [];
|
|
39
|
+
for (const run of text.matchAll(chipRunScanner())) {
|
|
40
|
+
for (const digits of run[0].matchAll(/\d+/g)) {
|
|
41
|
+
const n = Number.parseInt(digits[0], 10);
|
|
42
|
+
if (!numbers.includes(n)) numbers.push(n);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return numbers;
|
|
46
|
+
}
|
|
@@ -28,4 +28,6 @@ export { isRecord, unwrapEnvelope } from './wire-narrow';
|
|
|
28
28
|
// The `[card://<type>:<id>]` grammar — the renderer's and the server's one
|
|
29
29
|
// definition, so a reference the hub emits is one the client expands.
|
|
30
30
|
export * from './card-marker';
|
|
31
|
+
// The `[N]` citation chip grammar — written by the server, read and hidden by the renderer.
|
|
32
|
+
export * from './citation-chip';
|
|
31
33
|
export { escapeThinkingTags } from './leading-frames';
|
|
@@ -11,38 +11,23 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Deliberately conservative:
|
|
13
13
|
* - text leaves only (code/inline-code nodes are never visited);
|
|
14
|
-
* -
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `array[1]` or `foo[12]bar` is untouched.
|
|
14
|
+
* - what counts as a citation is the chat protocol's one chip grammar
|
|
15
|
+
* (`chat-protocol/citation-chip.ts`), the same one the server writes, so
|
|
16
|
+
* technical prose like `array[1]` or `foo[12]bar` is untouched.
|
|
18
17
|
*/
|
|
19
18
|
|
|
20
19
|
import type { Root, Text } from 'mdast';
|
|
21
20
|
import type { Plugin } from 'unified';
|
|
22
21
|
import { visit } from 'unist-util-visit';
|
|
23
|
-
|
|
24
|
-
/** A run of citation markers (`[1]`, `[2, 3]`, `[1][2]`) bounded by whitespace or the start on the left and by
|
|
25
|
-
* whitespace, punctuation or the end on the right. */
|
|
26
|
-
const CITATION_REGEX = /(^|\s)(?:\[\d{1,2}(?:\s*,\s*\d{1,2})*\])+(?=[\s.,;:!?)\]]|$)/g;
|
|
27
|
-
|
|
28
|
-
/** What a removed run leaves: nothing when punctuation or the end follows it (so "command [1]." reads "command."),
|
|
29
|
-
* else the whitespace that preceded it. */
|
|
30
|
-
function withoutRun(text: string): string {
|
|
31
|
-
return text.replace(CITATION_REGEX, (run: string, lead: string, offset: number) => {
|
|
32
|
-
const next = text.charAt(offset + run.length);
|
|
33
|
-
return next === '' || /[.,;:!?)\]]/.test(next) ? '' : lead;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
22
|
+
import { stripCitationChips } from '../../chat-protocol/citation-chip';
|
|
36
23
|
|
|
37
24
|
export const remarkStripCitations: Plugin<[], Root> = () => {
|
|
38
25
|
return (tree: Root) => {
|
|
39
26
|
visit(tree, 'text', (node: Text, index, parent) => {
|
|
40
27
|
if (!parent || typeof index !== 'number') return;
|
|
41
28
|
if (!node.value || !node.value.includes('[')) return;
|
|
42
|
-
const withoutCitations =
|
|
43
|
-
// No citation matched → leave the node untouched
|
|
44
|
-
// whitespace (collapsing unconditionally would rewrite deliberate
|
|
45
|
-
// spacing in prose like `array[1] value`).
|
|
29
|
+
const withoutCitations = stripCitationChips(node.value);
|
|
30
|
+
// No citation matched → leave the node untouched.
|
|
46
31
|
if (withoutCitations === node.value) return;
|
|
47
32
|
// Replace the text node rather than editing `node.value` in place —
|
|
48
33
|
// same idiom as remark-card-links / remark-mention-chips next door, and
|
|
@@ -50,11 +35,7 @@ export const remarkStripCitations: Plugin<[], Root> = () => {
|
|
|
50
35
|
// `position` so source mapping survives. Length is unchanged, so the
|
|
51
36
|
// walker needs no index steering: it has already captured the original
|
|
52
37
|
// leaf and moves on to the next sibling, never re-entering this slot.
|
|
53
|
-
parent.children.splice(index, 1, {
|
|
54
|
-
...node,
|
|
55
|
-
// Collapse doubled spaces the removal can leave mid-sentence.
|
|
56
|
-
value: withoutCitations.replace(/ {2,}/g, ' '),
|
|
57
|
-
});
|
|
38
|
+
parent.children.splice(index, 1, { ...node, value: withoutCitations });
|
|
58
39
|
});
|
|
59
40
|
};
|
|
60
41
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CardReference, extractCardReferences } from '../../../chat-protocol/card-marker';
|
|
2
|
+
import { citedSourceNumbers } from '../../../chat-protocol/citation-chip';
|
|
2
3
|
import { canonicalContentRefType } from '../../../utils/list-url';
|
|
3
4
|
import { groupSourcesByTable } from '../../../utils/source-grouping';
|
|
4
5
|
import type { ChatSource } from '../types/message.types';
|
|
@@ -14,9 +15,6 @@ export interface CitedSources {
|
|
|
14
15
|
uncited: ChatSource[];
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
/** `[1]`, `[12]` — a citation marker in the answer body. */
|
|
18
|
-
const CITATION = /\[(\d+)\]/g;
|
|
19
|
-
|
|
20
18
|
/** Fenced blocks and inline code spans. */
|
|
21
19
|
const CODE = /```[\s\S]*?```|~~~[\s\S]*?~~~|`[^`\n]*`/g;
|
|
22
20
|
|
|
@@ -63,11 +61,7 @@ export function splitCitedSources(sources: ChatSource[] | undefined, content: st
|
|
|
63
61
|
const byCards = splitByCards(sources, extractCardReferences(withoutCode(content)));
|
|
64
62
|
if (byCards.cited.length > 0) return byCards;
|
|
65
63
|
|
|
66
|
-
const firstMentionAt = new Map
|
|
67
|
-
for (const match of withoutCode(content).matchAll(CITATION)) {
|
|
68
|
-
const index = Number.parseInt(match[1], 10);
|
|
69
|
-
if (!firstMentionAt.has(index)) firstMentionAt.set(index, firstMentionAt.size);
|
|
70
|
-
}
|
|
64
|
+
const firstMentionAt = new Map(citedSourceNumbers(withoutCode(content)).map((index, order) => [index, order]));
|
|
71
65
|
|
|
72
66
|
const cited = sources
|
|
73
67
|
.filter(source => firstMentionAt.has(source.index))
|
|
@@ -81,6 +81,8 @@ export interface FileUploadProps<T extends FileUploadCandidate = File> {
|
|
|
81
81
|
description?: string;
|
|
82
82
|
/** Field label above the component */
|
|
83
83
|
fieldLabel?: string;
|
|
84
|
+
/** Scale of `fieldLabel`, as on the other field controls (`FieldWrapper`'s `labelVariant`). */
|
|
85
|
+
labelVariant?: 'default' | 'large';
|
|
84
86
|
/** Whether the component is disabled */
|
|
85
87
|
disabled?: boolean;
|
|
86
88
|
/** Error message */
|
|
@@ -157,6 +159,7 @@ export function FileUpload<T extends FileUploadCandidate = File>({
|
|
|
157
159
|
label = 'Upload Files',
|
|
158
160
|
description = '(Click Here or Drag and Drop)',
|
|
159
161
|
fieldLabel,
|
|
162
|
+
labelVariant,
|
|
160
163
|
disabled = false,
|
|
161
164
|
error,
|
|
162
165
|
className,
|
|
@@ -353,7 +356,7 @@ export function FileUpload<T extends FileUploadCandidate = File>({
|
|
|
353
356
|
const showDropzone = multiple || !hasFiles;
|
|
354
357
|
|
|
355
358
|
return (
|
|
356
|
-
<FieldWrapper label={fieldLabel} error={displayError} className={className}>
|
|
359
|
+
<FieldWrapper label={fieldLabel} labelVariant={labelVariant} error={displayError} className={className}>
|
|
357
360
|
{/* Rendered even when `pickFiles` supersedes it: whether a host has a
|
|
358
361
|
native picker is only knowable on the client, and dropping this node
|
|
359
362
|
from the tree would make the prerendered HTML and the hydrated render
|
|
@@ -32,6 +32,8 @@ export interface ImageUploaderProps {
|
|
|
32
32
|
hint?: ReactNode | null;
|
|
33
33
|
/** Field label rendered above the component (via FieldWrapper). */
|
|
34
34
|
fieldLabel?: string;
|
|
35
|
+
/** Scale of `fieldLabel`, as on the other field controls (`FieldWrapper`'s `labelVariant`). */
|
|
36
|
+
labelVariant?: 'default' | 'large';
|
|
35
37
|
/** Disables interaction. */
|
|
36
38
|
disabled?: boolean;
|
|
37
39
|
/** Show loading state — disables interaction and renders a spinner overlay. */
|
|
@@ -91,6 +93,7 @@ export function ImageUploader({
|
|
|
91
93
|
description = '(Click Here or Drag and Drop)',
|
|
92
94
|
hint,
|
|
93
95
|
fieldLabel,
|
|
96
|
+
labelVariant,
|
|
94
97
|
disabled = false,
|
|
95
98
|
loading = false,
|
|
96
99
|
error,
|
|
@@ -167,7 +170,7 @@ export function ImageUploader({
|
|
|
167
170
|
const isActionState = dragActive || (pressed && !hasImage);
|
|
168
171
|
|
|
169
172
|
return (
|
|
170
|
-
<FieldWrapper label={fieldLabel} error={displayError} className={className}>
|
|
173
|
+
<FieldWrapper label={fieldLabel} labelVariant={labelVariant} error={displayError} className={className}>
|
|
171
174
|
<input
|
|
172
175
|
ref={inputRef}
|
|
173
176
|
type="file"
|