@dbx-tools/ui-mastra 0.9.205 → 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 CHANGED
@@ -1,6 +1,6 @@
1
- // GENERATED by projen watch - DO NOT EDIT.
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 watch; this file is read-only.
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 watch - DO NOT EDIT.
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 watch; this file is read-only.
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 watch - DO NOT EDIT.
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 watch; this file is read-only.
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.205";
6
+ export const PACKAGE_VERSION = "0.9.210";
package/package.json CHANGED
@@ -30,15 +30,20 @@
30
30
  "react-dom": "~19.2.4",
31
31
  "react-router-dom": "^7.6.2"
32
32
  },
33
+ "peerDependenciesMeta": {
34
+ "react-router-dom": {
35
+ "optional": true
36
+ }
37
+ },
33
38
  "dependencies": {
34
39
  "@databricks/appkit-ui": "0.81.0",
35
- "@dbx-tools/shared-auth": "0.9.205",
36
- "@dbx-tools/shared-core": "0.9.205",
37
- "@dbx-tools/shared-genie": "0.9.205",
38
- "@dbx-tools/shared-mastra": "0.9.205",
39
- "@dbx-tools/shared-model": "0.9.205",
40
- "@dbx-tools/shared-model-gateway": "0.9.205",
41
- "@dbx-tools/ui": "0.9.205",
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",
42
47
  "@mastra/client-js": "1.50.0",
43
48
  "@mastra/core": "1.71.0",
44
49
  "@tanstack/react-table": "^8.21.3",
@@ -56,7 +61,7 @@
56
61
  "publishConfig": {
57
62
  "access": "public"
58
63
  },
59
- "version": "0.9.205",
64
+ "version": "0.9.210",
60
65
  "types": "index.ts",
61
66
  "dbxToolsConfig": {
62
67
  "tags": [
@@ -75,10 +80,5 @@
75
80
  "index*.ts",
76
81
  "src"
77
82
  ],
78
- "peerDependenciesMeta": {
79
- "react-router-dom": {
80
- "optional": true
81
- }
82
- },
83
83
  "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"bunx projen\"."
84
84
  }
@@ -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 usdPerDbu = averageUsdPerDbu(activity.route);
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
- ...(dbu !== undefined && usdPerDbu !== undefined ? { usd: dbu * usdPerDbu } : {}),
127
+ ...(usd !== undefined ? { usd } : {}),
134
128
  };
135
129
  }
136
130