@meridianlabs/log-viewer 0.3.181 → 0.3.183
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/lib/app/samples/SampleDisplay.d.ts.map +1 -1
- package/lib/index.js +30 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SampleDisplay.d.ts","sourceRoot":"","sources":["../../../src/app/samples/SampleDisplay.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,EAAE,EAGF,SAAS,EAMV,MAAM,OAAO,CAAC;AAsCf,UAAU,kBAAkB;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"SampleDisplay.d.ts","sourceRoot":"","sources":["../../../src/app/samples/SampleDisplay.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,EAAE,EAGF,SAAS,EAMV,MAAM,OAAO,CAAC;AAsCf,UAAU,kBAAkB;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAmbhD,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -106529,7 +106529,7 @@ const ViewerOptionsPopover = ({
|
|
|
106529
106529
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.fullWidth, styles$1d.fullWidthPadded), children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: styles$1d.logDir, children: logDir2 }) }),
|
|
106530
106530
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.spacer) }),
|
|
106531
106531
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Version" }),
|
|
106532
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: "0.3.
|
|
106532
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: "0.3.183-0-gd05f97fee" }),
|
|
106533
106533
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("text-style-label", "text-style-secondary"), children: "Schema" }),
|
|
106534
106534
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(), children: DB_VERSION }),
|
|
106535
106535
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx(styles$1d.spacer) }),
|
|
@@ -180250,6 +180250,8 @@ const SampleDisplay = ({
|
|
|
180250
180250
|
setCollapsedMode(isCollapsed(collapsedMode) ? "expanded" : "collapsed");
|
|
180251
180251
|
}, [collapsedMode, setCollapsedMode]);
|
|
180252
180252
|
const { isDebugFilter, isDefaultFilter } = useTranscriptFilter();
|
|
180253
|
+
const api2 = useStore((state) => state.api);
|
|
180254
|
+
const downloadFiles = useStore((state) => state.capabilities.downloadFiles);
|
|
180253
180255
|
const tools2 = [];
|
|
180254
180256
|
const [icon2, setIcon] = useState(ApplicationIcons.copy);
|
|
180255
180257
|
tools2.push(
|
|
@@ -180282,6 +180284,33 @@ const SampleDisplay = ({
|
|
|
180282
180284
|
"sample-copy"
|
|
180283
180285
|
)
|
|
180284
180286
|
);
|
|
180287
|
+
if (downloadFiles && sample2 && api2?.download_file) {
|
|
180288
|
+
const sampleId = sample2.id ?? "sample";
|
|
180289
|
+
tools2.push(
|
|
180290
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
180291
|
+
ToolDropdownButton,
|
|
180292
|
+
{
|
|
180293
|
+
label: "Download",
|
|
180294
|
+
icon: ApplicationIcons.downloadLog,
|
|
180295
|
+
items: {
|
|
180296
|
+
"Sample JSON": () => {
|
|
180297
|
+
api2.download_file(
|
|
180298
|
+
`${sampleId}.json`,
|
|
180299
|
+
JSON.stringify(sample2, null, 2)
|
|
180300
|
+
);
|
|
180301
|
+
},
|
|
180302
|
+
Transcript: () => {
|
|
180303
|
+
api2.download_file(
|
|
180304
|
+
`${sampleId}-transcript.txt`,
|
|
180305
|
+
messagesToStr(sample2.messages ?? [])
|
|
180306
|
+
);
|
|
180307
|
+
}
|
|
180308
|
+
}
|
|
180309
|
+
},
|
|
180310
|
+
"sample-download"
|
|
180311
|
+
)
|
|
180312
|
+
);
|
|
180313
|
+
}
|
|
180285
180314
|
if (selectedTab === kSampleTranscriptTabId) {
|
|
180286
180315
|
const label2 = isDebugFilter ? "Debug" : isDefaultFilter ? "Default" : "Custom";
|
|
180287
180316
|
tools2.push(
|