@dbx-tools/ui-mastra 0.9.206 → 0.9.210
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/index.react.ts +2 -2
- package/index.support.ts +2 -2
- package/index.ts +3 -3
- package/package.json +8 -8
- package/src/react/selected-model-pill.tsx +2 -8
package/index.react.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// GENERATED by projen
|
|
1
|
+
// GENERATED by projen barrels - DO NOT EDIT.
|
|
2
2
|
// Regenerated from the exporting modules in ./src.
|
|
3
|
-
// Hand edits are overwritten on the next
|
|
3
|
+
// Hand edits are overwritten on the next generation; this file is read-only.
|
|
4
4
|
|
|
5
5
|
export * as bubbles from "./src/react/bubbles.tsx";
|
|
6
6
|
export * as chatApprovals from "./src/react/chat-approvals.ts";
|
package/index.support.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// GENERATED by projen
|
|
1
|
+
// GENERATED by projen barrels - DO NOT EDIT.
|
|
2
2
|
// Regenerated from the exporting modules in ./src.
|
|
3
|
-
// Hand edits are overwritten on the next
|
|
3
|
+
// Hand edits are overwritten on the next generation; this file is read-only.
|
|
4
4
|
|
|
5
5
|
export * as activeRuns from "./src/support/active-runs.ts";
|
|
6
6
|
export * as browserTranscript from "./src/support/browser-transcript.ts";
|
package/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// GENERATED by projen
|
|
1
|
+
// GENERATED by projen barrels - DO NOT EDIT.
|
|
2
2
|
// Regenerated from the exporting modules in ./src.
|
|
3
|
-
// Hand edits are overwritten on the next
|
|
3
|
+
// Hand edits are overwritten on the next generation; this file is read-only.
|
|
4
4
|
|
|
5
5
|
export const PACKAGE_IDENTIFIER = "@dbx-tools/ui-mastra";
|
|
6
|
-
export const PACKAGE_VERSION = "0.9.
|
|
6
|
+
export const PACKAGE_VERSION = "0.9.210";
|
package/package.json
CHANGED
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@databricks/appkit-ui": "0.81.0",
|
|
40
|
-
"@dbx-tools/shared-auth": "0.9.
|
|
41
|
-
"@dbx-tools/shared-core": "0.9.
|
|
42
|
-
"@dbx-tools/shared-genie": "0.9.
|
|
43
|
-
"@dbx-tools/shared-mastra": "0.9.
|
|
44
|
-
"@dbx-tools/shared-model": "0.9.
|
|
45
|
-
"@dbx-tools/shared-model-gateway": "0.9.
|
|
46
|
-
"@dbx-tools/ui": "0.9.
|
|
40
|
+
"@dbx-tools/shared-auth": "0.9.210",
|
|
41
|
+
"@dbx-tools/shared-core": "0.9.210",
|
|
42
|
+
"@dbx-tools/shared-genie": "0.9.210",
|
|
43
|
+
"@dbx-tools/shared-mastra": "0.9.210",
|
|
44
|
+
"@dbx-tools/shared-model": "0.9.210",
|
|
45
|
+
"@dbx-tools/shared-model-gateway": "0.9.210",
|
|
46
|
+
"@dbx-tools/ui": "0.9.210",
|
|
47
47
|
"@mastra/client-js": "1.50.0",
|
|
48
48
|
"@mastra/core": "1.71.0",
|
|
49
49
|
"@tanstack/react-table": "^8.21.3",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"version": "0.9.
|
|
64
|
+
"version": "0.9.210",
|
|
65
65
|
"types": "index.ts",
|
|
66
66
|
"dbxToolsConfig": {
|
|
67
67
|
"tags": [
|
|
@@ -71,12 +71,6 @@ export interface SelectedModelTurnMetrics {
|
|
|
71
71
|
usd?: number;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
function averageUsdPerDbu(route: ModelRoutePartData): number | undefined {
|
|
75
|
-
const values = Object.values(route.pricing?.usdPerDbu ?? {});
|
|
76
|
-
if (values.length === 0) return undefined;
|
|
77
|
-
return values.reduce((sum, value) => sum + value, 0) / values.length;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
74
|
function elapsedMs(
|
|
81
75
|
message: Pick<UIMessage, "metadata">,
|
|
82
76
|
active: boolean,
|
|
@@ -124,13 +118,13 @@ function activityTurnMetrics(
|
|
|
124
118
|
fallbackStartedAt: number,
|
|
125
119
|
): SelectedModelTurnMetrics {
|
|
126
120
|
const dbu = activity.usage?.estimatedCostDbu;
|
|
127
|
-
const
|
|
121
|
+
const usd = activity.usage?.estimatedCostUsd;
|
|
128
122
|
const timeMs = elapsedMs(message, active, now, fallbackStartedAt);
|
|
129
123
|
return {
|
|
130
124
|
...(activity.usage ? { tokens: activity.usage.usage.totalTokens } : {}),
|
|
131
125
|
...(timeMs !== undefined ? { timeMs } : {}),
|
|
132
126
|
...(dbu !== undefined ? { dbu } : {}),
|
|
133
|
-
...(
|
|
127
|
+
...(usd !== undefined ? { usd } : {}),
|
|
134
128
|
};
|
|
135
129
|
}
|
|
136
130
|
|