@flamingo-stack/openframe-frontend-core 0.0.818 → 0.0.819
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/{chunk-U2THWP25.cjs → chunk-2JFR6XVT.cjs} +32 -32
- package/dist/{chunk-DL4HWYIB.cjs → chunk-2S6BUXYD.cjs} +3 -3
- package/dist/{chunk-AE22KOW3.cjs → chunk-2T3HXLZD.cjs} +53 -53
- package/dist/{chunk-YHPUD4PM.cjs → chunk-2W3W3ZV6.cjs} +11 -11
- package/dist/{chunk-4XASD2TL.cjs → chunk-7IQU54VE.cjs} +16 -16
- package/dist/{chunk-VRXDTRIY.cjs → chunk-A36XVWIQ.cjs} +39 -39
- package/dist/{chunk-BD42NMCT.cjs → chunk-CEXPWDT4.cjs} +4 -4
- package/dist/{chunk-YMPPE322.cjs → chunk-I453QCEF.cjs} +107 -107
- package/dist/{chunk-NWIEZUM7.cjs → chunk-IVQT5R6M.cjs} +19 -19
- package/dist/{chunk-VGZXB3SY.cjs → chunk-JOXJDNHN.cjs} +3 -3
- package/dist/{chunk-DGAX5WG2.cjs → chunk-MYIOOA4E.cjs} +2 -2
- package/dist/{chunk-IQCHV7Z2.cjs → chunk-OTGYA5F7.cjs} +21 -3
- package/dist/{chunk-5VRSUEC5.cjs → chunk-Q6QQSCUC.cjs} +10 -10
- package/dist/{chunk-JTBJB4JF.cjs → chunk-S2ZA4TMJ.cjs} +9 -9
- package/dist/{chunk-NEXMK6OP.cjs → chunk-TDQRDQVU.cjs} +4 -4
- package/dist/{chunk-5AIOYEXW.cjs → chunk-U3OICGCV.cjs} +47 -47
- package/dist/{chunk-6QT5K5I5.cjs → chunk-VSKR26MV.cjs} +6 -6
- package/dist/{chunk-ZWAVMZIF.cjs → chunk-WPHCVXES.cjs} +7 -7
- package/dist/{cloud-tenants-V6EV4OGK.cjs → cloud-tenants-P5XJ5DPJ.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 +1 -1
- package/dist/components/chat/remark-strip-citations.d.ts.map +1 -1
- package/dist/components/chat/remark-strip-citations.js +8 -2
- package/dist/components/chat/utils/cited-sources.d.ts.map +1 -1
- package/dist/components/chat/utils/cited-sources.js +36 -0
- 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/index.cjs +4 -4
- package/dist/{devices-6KZAJAAS.cjs → devices-BSIWSRZG.cjs} +5 -5
- package/dist/{embeddable-chat-5IHA5SUZ.cjs → embeddable-chat-5L2PKTW3.cjs} +99 -62
- package/dist/index.cjs +8 -8
- package/dist/{knowledge-I7FDQQYJ.cjs → knowledge-2F3IPK73.cjs} +5 -5
- package/dist/{logs-Q7PAVJUG.cjs → logs-U3OCJ2OC.cjs} +12 -12
- package/dist/{policies-C3DW5CHS.cjs → policies-L3KHKE2G.cjs} +8 -8
- package/dist/{scripts-BET663HD.cjs → scripts-U4SLB5YC.cjs} +9 -9
- package/dist/{software-update-W7ZQXEPK.cjs → software-update-QALYFCIO.cjs} +7 -7
- package/package.json +1 -1
- package/src/components/chat/remark-strip-citations.ts +14 -3
- package/src/components/chat/utils/cited-sources.ts +51 -0
|
@@ -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 _chunkI453QCEFcjs = require('./chunk-I453QCEF.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-7IQU54VE.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkOTGYA5F7cjs = require('./chunk-OTGYA5F7.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
|
+
_chunkI453QCEFcjs.KnowledgeBaseArticleView,
|
|
1909
1909
|
{
|
|
1910
1910
|
...fixture.article,
|
|
1911
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1911
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOTGYA5F7cjs.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 _chunkI453QCEFcjs = require('./chunk-I453QCEF.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 _chunk7IQU54VEcjs = require('./chunk-7IQU54VE.cjs');
|
|
35
|
+
require('./chunk-OTGYA5F7.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: _chunkI453QCEFcjs.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, _chunkI453QCEFcjs.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
|
+
_chunkI453QCEFcjs.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
|
+
_chunkI453QCEFcjs.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, _chunkI453QCEFcjs.AppLayoutDrawerContainerContext.Provider, { value: dock, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1990
|
+
_chunkI453QCEFcjs.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, _chunkI453QCEFcjs.ToolBadge, { toolType: _chunk7IQU54VEcjs.normalizeToolTypeWithFallback.call(void 0, selected.source.toolType) })
|
|
2003
2003
|
},
|
|
2004
|
-
{ label: "Device", value:
|
|
2004
|
+
{ label: "Device", value: _chunkI453QCEFcjs.logSourceLabels.call(void 0, selected.device).deviceName }
|
|
2005
2005
|
],
|
|
2006
2006
|
deviceCard: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2007
|
-
|
|
2007
|
+
_chunkI453QCEFcjs.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 _chunkI453QCEFcjs = require('./chunk-I453QCEF.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-7IQU54VE.cjs');
|
|
27
|
+
require('./chunk-OTGYA5F7.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: _chunkI453QCEFcjs.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: _chunkI453QCEFcjs.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
|
+
_chunkI453QCEFcjs.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, _chunkI453QCEFcjs.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, _chunkI453QCEFcjs.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 _chunkI453QCEFcjs = require('./chunk-I453QCEF.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-7IQU54VE.cjs');
|
|
32
|
+
require('./chunk-OTGYA5F7.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
|
+
{ ..._chunkI453QCEFcjs.EXECUTION_COLUMNS.machineId, width: "flex-1 min-w-0", hideAt: void 0 },
|
|
1999
|
+
_chunkI453QCEFcjs.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
|
+
_chunkI453QCEFcjs.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
|
+
_chunkI453QCEFcjs.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, _chunkI453QCEFcjs.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
|
+
_chunkI453QCEFcjs.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 _chunkI453QCEFcjs = require('./chunk-I453QCEF.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-7IQU54VE.cjs');
|
|
34
|
+
require('./chunk-OTGYA5F7.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: _chunkI453QCEFcjs.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: _chunkI453QCEFcjs.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
|
+
_chunkI453QCEFcjs.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
|
+
_chunkI453QCEFcjs.DeviceSelector,
|
|
1957
1957
|
{
|
|
1958
1958
|
devices: selected,
|
|
1959
1959
|
loading: false,
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Deliberately conservative:
|
|
13
13
|
* - text leaves only (code/inline-code nodes are never visited);
|
|
14
|
-
* - 1–2 digit indices, optionally comma-separated;
|
|
14
|
+
* - 1–2 digit indices, optionally comma-separated, and runs of them (`[1][2]`);
|
|
15
15
|
* - the token must be delimiter-bounded on BOTH sides (start/whitespace
|
|
16
16
|
* before; whitespace/punctuation/end after) so technical prose like
|
|
17
17
|
* `array[1]` or `foo[12]bar` is untouched.
|
|
@@ -21,14 +21,25 @@ import type { Root, Text } from 'mdast';
|
|
|
21
21
|
import type { Plugin } from 'unified';
|
|
22
22
|
import { visit } from 'unist-util-visit';
|
|
23
23
|
|
|
24
|
-
|
|
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
|
+
}
|
|
25
36
|
|
|
26
37
|
export const remarkStripCitations: Plugin<[], Root> = () => {
|
|
27
38
|
return (tree: Root) => {
|
|
28
39
|
visit(tree, 'text', (node: Text, index, parent) => {
|
|
29
40
|
if (!parent || typeof index !== 'number') return;
|
|
30
41
|
if (!node.value || !node.value.includes('[')) return;
|
|
31
|
-
const withoutCitations = node.value
|
|
42
|
+
const withoutCitations = withoutRun(node.value);
|
|
32
43
|
// No citation matched → leave the node untouched, INCLUDING its
|
|
33
44
|
// whitespace (collapsing unconditionally would rewrite deliberate
|
|
34
45
|
// spacing in prose like `array[1] value`).
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type CardReference, extractCardReferences } from '../../../chat-protocol/card-marker';
|
|
2
|
+
import { canonicalContentRefType } from '../../../utils/list-url';
|
|
1
3
|
import { groupSourcesByTable } from '../../../utils/source-grouping';
|
|
2
4
|
import type { ChatSource } from '../types/message.types';
|
|
3
5
|
|
|
@@ -53,6 +55,14 @@ function withoutCode(content: string): string {
|
|
|
53
55
|
export function splitCitedSources(sources: ChatSource[] | undefined, content: string): CitedSources {
|
|
54
56
|
if (!sources || sources.length === 0) return { cited: [], uncited: [] };
|
|
55
57
|
|
|
58
|
+
// An answer with cards cites what its cards show. The reader sees the cards and not the `[N]` numbers (the
|
|
59
|
+
// renderer hides those beside cards, `remarkStripCitations`), and the numbers a model writes can name another
|
|
60
|
+
// record than the card beside them: guide cards cited as `[1]`, a docs page (CU-17tkuw61kfy). So the strip is
|
|
61
|
+
// built from the cards, and its count is the cards'.
|
|
62
|
+
// An answer whose cards show no retrieved record (a card from an earlier turn) falls back to its numbers.
|
|
63
|
+
const byCards = splitByCards(sources, extractCardReferences(withoutCode(content)));
|
|
64
|
+
if (byCards.cited.length > 0) return byCards;
|
|
65
|
+
|
|
56
66
|
const firstMentionAt = new Map<number, number>();
|
|
57
67
|
for (const match of withoutCode(content).matchAll(CITATION)) {
|
|
58
68
|
const index = Number.parseInt(match[1], 10);
|
|
@@ -65,3 +75,44 @@ export function splitCitedSources(sources: ChatSource[] | undefined, content: st
|
|
|
65
75
|
const uncited = sources.filter(source => !firstMentionAt.has(source.index));
|
|
66
76
|
return { cited: groupSourcesByTable(cited), uncited: groupSourcesByTable(uncited) };
|
|
67
77
|
}
|
|
78
|
+
|
|
79
|
+
/** One record of a source, as a flat source: a flat source itself, or one row of a grouped source (keeping its own
|
|
80
|
+
* citation number when it has one, else the group's). */
|
|
81
|
+
function recordsOf(source: ChatSource): ChatSource[] {
|
|
82
|
+
if (!source.items || source.items.length === 0) return [source];
|
|
83
|
+
return source.items.map(item => ({
|
|
84
|
+
index: item.index ?? source.index,
|
|
85
|
+
id: item.id,
|
|
86
|
+
name: item.name,
|
|
87
|
+
path: item.path ?? '',
|
|
88
|
+
documentType: item.documentType,
|
|
89
|
+
...(item.externalUrl ? { externalUrl: item.externalUrl } : {}),
|
|
90
|
+
targetPlatform: item.targetPlatform ?? null,
|
|
91
|
+
...(source.sourceRepo ? { sourceRepo: source.sourceRepo } : {}),
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** The card key of a record, in the canonical vocabulary the card markers use. A document is keyed by its id, or
|
|
96
|
+
* by its path when it carries no id (doc rows are keyed by path). */
|
|
97
|
+
function recordKey(record: ChatSource): string | null {
|
|
98
|
+
const id = record.id || record.path;
|
|
99
|
+
return record.documentType && id ? `${canonicalContentRefType(record.documentType)}:${id}` : null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Cited = the records the answer's cards show, in card order; uncited = every other record. Both halves are then
|
|
103
|
+
* grouped by table, so a table's chip counts exactly its carded records. */
|
|
104
|
+
function splitByCards(sources: ChatSource[], cards: CardReference[]): CitedSources {
|
|
105
|
+
const records = sources.flatMap(recordsOf);
|
|
106
|
+
const byKey = new Map<string, ChatSource>();
|
|
107
|
+
for (const record of records) {
|
|
108
|
+
const key = recordKey(record);
|
|
109
|
+
if (key && !byKey.has(key)) byKey.set(key, record);
|
|
110
|
+
}
|
|
111
|
+
const cited: ChatSource[] = [];
|
|
112
|
+
for (const card of cards) {
|
|
113
|
+
const record = byKey.get(`${canonicalContentRefType(card.type)}:${card.id}`);
|
|
114
|
+
if (record && !cited.includes(record)) cited.push(record);
|
|
115
|
+
}
|
|
116
|
+
const uncited = records.filter(record => !cited.includes(record));
|
|
117
|
+
return { cited: groupSourcesByTable(cited), uncited: groupSourcesByTable(uncited) };
|
|
118
|
+
}
|