@dbx-tools/ui-mastra 0.9.73 → 0.9.79
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.ts +1 -1
- package/package.json +6 -6
- package/src/react/tool-pill.tsx +18 -2
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Hand edits are overwritten on the next watch; 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.79";
|
|
7
7
|
export * as reactBubbles from "./src/react/bubbles.tsx";
|
|
8
8
|
export * as reactChatApprovals from "./src/react/chat-approvals.ts";
|
|
9
9
|
export * as reactChatComposer from "./src/react/chat-composer.tsx";
|
package/package.json
CHANGED
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"react-dom": "~19.2.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@dbx-tools/shared-core": "^0.9.
|
|
33
|
-
"@dbx-tools/shared-genie": "^0.9.
|
|
34
|
-
"@dbx-tools/shared-mastra": "^0.9.
|
|
35
|
-
"@dbx-tools/shared-model": "^0.9.
|
|
36
|
-
"@dbx-tools/ui": "^0.9.
|
|
32
|
+
"@dbx-tools/shared-core": "^0.9.79",
|
|
33
|
+
"@dbx-tools/shared-genie": "^0.9.79",
|
|
34
|
+
"@dbx-tools/shared-mastra": "^0.9.79",
|
|
35
|
+
"@dbx-tools/shared-model": "^0.9.79",
|
|
36
|
+
"@dbx-tools/ui": "^0.9.79",
|
|
37
37
|
"@mastra/client-js": "1.50.0",
|
|
38
38
|
"@mastra/core": "1.71.0",
|
|
39
39
|
"@tanstack/react-table": "^8.21.3",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"version": "0.9.
|
|
53
|
+
"version": "0.9.79",
|
|
54
54
|
"dbxToolsConfig": {
|
|
55
55
|
"tags": [
|
|
56
56
|
"ui"
|
package/src/react/tool-pill.tsx
CHANGED
|
@@ -15,18 +15,34 @@ import type { ToolEvent, ToolProgress } from "./types.ts";
|
|
|
15
15
|
// groups the wire events one assistant turn produced into per-sub-call
|
|
16
16
|
// cards (question + numbered queries + prose answers + errors).
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Mastra registers built-in workspace tools under
|
|
20
|
+
* `WORKSPACE_TOOLS_PREFIX` (`mastra_workspace_*`). The wire id stays
|
|
21
|
+
* that branded name; session pills drop the prefix so labels read as
|
|
22
|
+
* `Execute Command` rather than `Mastra Workspace Execute Command`.
|
|
23
|
+
*/
|
|
24
|
+
const MASTRA_WORKSPACE_TOOL_PREFIX = "mastra_workspace_";
|
|
25
|
+
|
|
18
26
|
/**
|
|
19
27
|
* Turn a snake/camel tool id into a Title Cased label the user can
|
|
20
28
|
* read. Genie tools land on this surface as flat ids
|
|
21
29
|
* (`ask_genie`, `get_statement`, `prepare_chart`) plus per-space
|
|
22
|
-
* suffixes for non-default aliases (`ask_genie_sales`).
|
|
30
|
+
* suffixes for non-default aliases (`ask_genie_sales`). Mastra
|
|
31
|
+
* workspace tools keep their `mastra_workspace_` wire prefix, which
|
|
32
|
+
* this strips before labeling.
|
|
23
33
|
*
|
|
24
34
|
* Examples:
|
|
25
35
|
* `ask_genie` -> `Ask Genie`
|
|
26
36
|
* `ask_genie_sales` -> `Ask Genie Sales`
|
|
37
|
+
* `mastra_workspace_execute_command` -> `Execute Command`
|
|
27
38
|
* `myCoolTool` -> `My Cool Tool`
|
|
28
39
|
*/
|
|
29
|
-
export const humanizeToolName = (toolName: string): string =>
|
|
40
|
+
export const humanizeToolName = (toolName: string): string => {
|
|
41
|
+
const label = toolName.startsWith(MASTRA_WORKSPACE_TOOL_PREFIX)
|
|
42
|
+
? toolName.slice(MASTRA_WORKSPACE_TOOL_PREFIX.length)
|
|
43
|
+
: toolName;
|
|
44
|
+
return stringUtils.toLabel(label);
|
|
45
|
+
};
|
|
30
46
|
|
|
31
47
|
/**
|
|
32
48
|
* Track the freshest status label a running tool has published so the
|