@dbx-tools/ui-mastra 0.1.18 → 0.1.20
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/README.md +4 -4
- package/package.json +6 -6
- package/src/support/chart-option.ts +2 -2
- package/src/support/export.ts +1 -6
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
React chat UI for the AppKit-Mastra plugin.
|
|
4
4
|
|
|
5
5
|
Import this package when a Databricks App needs a production-ready chat surface
|
|
6
|
-
for [`@dbx-tools/
|
|
6
|
+
for [`@dbx-tools/appkit-mastra`](../../node/appkit-mastra): streaming
|
|
7
7
|
assistant responses, model selection, Genie progress events, inline charts/data
|
|
8
8
|
tables, tool approvals, conversation history, thread management, export, and
|
|
9
9
|
MLflow feedback.
|
|
@@ -34,7 +34,7 @@ Use native `@databricks/appkit-ui` when you need its general primitives, Genie
|
|
|
34
34
|
chat component, or Model Serving hooks directly against native AppKit plugins.
|
|
35
35
|
|
|
36
36
|
Use this package when the server is
|
|
37
|
-
[`@dbx-tools/
|
|
37
|
+
[`@dbx-tools/appkit-mastra`](../../node/appkit-mastra) and the UI needs to
|
|
38
38
|
understand Mastra-specific behavior:
|
|
39
39
|
|
|
40
40
|
- `@mastra/client-js` agent streaming plus the plugin's custom history, threads,
|
|
@@ -154,7 +154,7 @@ suggestions, thread lists, chart fetches, and statement-data fetches.
|
|
|
154
154
|
## Approvals, Embeds, And Feedback
|
|
155
155
|
|
|
156
156
|
The UI understands the extra events produced by
|
|
157
|
-
[`@dbx-tools/
|
|
157
|
+
[`@dbx-tools/appkit-mastra`](../../node/appkit-mastra):
|
|
158
158
|
|
|
159
159
|
- `tool-call-approval` chunks become inline approval cards and call
|
|
160
160
|
`approve-tool-call` / `decline-tool-call` when the user decides.
|
|
@@ -193,6 +193,6 @@ skipped so old transcripts still export cleanly.
|
|
|
193
193
|
`FeedbackSubmission`, and related UI contract types.
|
|
194
194
|
|
|
195
195
|
Server-side routes and event production live in
|
|
196
|
-
[`@dbx-tools/
|
|
196
|
+
[`@dbx-tools/appkit-mastra`](../../node/appkit-mastra). Browser-safe route,
|
|
197
197
|
marker, feedback, and wire schemas live in
|
|
198
198
|
[`@dbx-tools/shared-mastra`](../../shared/mastra).
|
package/package.json
CHANGED
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
"shiki": "^3.0.0",
|
|
27
27
|
"sql-formatter": "^15.6.9",
|
|
28
28
|
"streamdown": "^2.5.0",
|
|
29
|
-
"@dbx-tools/shared-core": "0.1.
|
|
30
|
-
"@dbx-tools/shared-genie": "0.1.
|
|
31
|
-
"@dbx-tools/shared-mastra": "0.1.
|
|
32
|
-
"@dbx-tools/
|
|
33
|
-
"@dbx-tools/
|
|
29
|
+
"@dbx-tools/shared-core": "0.1.20",
|
|
30
|
+
"@dbx-tools/shared-genie": "0.1.20",
|
|
31
|
+
"@dbx-tools/shared-mastra": "0.1.20",
|
|
32
|
+
"@dbx-tools/shared-model": "0.1.20",
|
|
33
|
+
"@dbx-tools/ui-appkit": "0.1.20"
|
|
34
34
|
},
|
|
35
35
|
"main": "index.ts",
|
|
36
36
|
"license": "UNLICENSED",
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"version": "0.1.
|
|
40
|
+
"version": "0.1.20",
|
|
41
41
|
"types": "index.ts",
|
|
42
42
|
"type": "module",
|
|
43
43
|
"exports": {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* It only fills gaps: any field the spec already sets (an explicit
|
|
21
21
|
* `axisLabel.formatter`, `nameLocation`, etc.) is preserved.
|
|
22
22
|
*/
|
|
23
|
+
import { object } from "@dbx-tools/shared-core";
|
|
23
24
|
|
|
24
25
|
/** Compact SI formatter shared across every value-axis tick. */
|
|
25
26
|
const COMPACT_NUMBER = new Intl.NumberFormat("en-US", {
|
|
@@ -40,8 +41,7 @@ function compactAxisLabel(value: number): string {
|
|
|
40
41
|
/** A permissive record view of an option node we patch field-by-field. */
|
|
41
42
|
type Obj = Record<string, unknown>;
|
|
42
43
|
|
|
43
|
-
const isObj =
|
|
44
|
-
typeof v === "object" && v !== null && !Array.isArray(v);
|
|
44
|
+
const isObj = object.isRecord;
|
|
45
45
|
|
|
46
46
|
/** True when `title` (object or array) carries any non-empty `text`. */
|
|
47
47
|
function hasTitleText(title: unknown): boolean {
|
package/src/support/export.ts
CHANGED
|
@@ -402,12 +402,7 @@ const escapeHtml = string.escapeHtml;
|
|
|
402
402
|
|
|
403
403
|
/** Turn a title into a safe, lowercase filename stem. */
|
|
404
404
|
function slugify(value: string): string {
|
|
405
|
-
|
|
406
|
-
.toLowerCase()
|
|
407
|
-
.replace(/[^a-z0-9]+/g, "-")
|
|
408
|
-
.replace(/^-+|-+$/g, "")
|
|
409
|
-
.slice(0, 60);
|
|
410
|
-
return slug || "conversation";
|
|
405
|
+
return string.toSlugWithOptions({ maxLength: 60 }, value) || "conversation";
|
|
411
406
|
}
|
|
412
407
|
|
|
413
408
|
/** Trigger a browser download of an in-memory text file. */
|