@dbx-tools/ui-mastra 0.9.136 → 0.9.139

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 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.136";
6
+ export const PACKAGE_VERSION = "0.9.139";
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
@@ -30,11 +30,11 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@databricks/appkit-ui": "0.81.0",
33
- "@dbx-tools/shared-core": "^0.9.136",
34
- "@dbx-tools/shared-genie": "^0.9.136",
35
- "@dbx-tools/shared-mastra": "^0.9.136",
36
- "@dbx-tools/shared-model": "^0.9.136",
37
- "@dbx-tools/ui": "^0.9.136",
33
+ "@dbx-tools/shared-core": "^0.9.139",
34
+ "@dbx-tools/shared-genie": "^0.9.139",
35
+ "@dbx-tools/shared-mastra": "^0.9.139",
36
+ "@dbx-tools/shared-model": "^0.9.139",
37
+ "@dbx-tools/ui": "^0.9.139",
38
38
  "@mastra/client-js": "1.50.0",
39
39
  "@mastra/core": "1.71.0",
40
40
  "@tanstack/react-table": "^8.21.3",
@@ -51,7 +51,7 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "version": "0.9.136",
54
+ "version": "0.9.139",
55
55
  "dbxToolsConfig": {
56
56
  "tags": [
57
57
  "ui"
@@ -170,9 +170,9 @@ export interface UseMastraChatOptions<
170
170
  * Converse with this Genie space alias directly instead of an agent. Every
171
171
  * turn is one Genie message streamed as an `ask_genie` tool call, so pills,
172
172
  * thoughts, suggestions, and embeds render exactly as in an agent chat.
173
- * Genie owns the state: its conversations are the threads and its messages
174
- * are the history; nothing is stored in Mastra Memory. Conversations cannot
175
- * be renamed, turns take no attachments, and feedback is unavailable.
173
+ * Genie owns visible conversation state. When configured, the server adds
174
+ * resource-scoped Mastra recall and saves completed turns. Conversations
175
+ * cannot be renamed, turns take no attachments, and feedback is unavailable.
176
176
  */
177
177
  genieSpace?: string;
178
178
  /**
@@ -752,11 +752,7 @@ export const useMastraChat = <TValues extends Record<string, unknown> = Record<s
752
752
  );
753
753
 
754
754
  const runStream = useCallback(
755
- (
756
- threadId: string,
757
- messages: UIMessage | UIMessage[],
758
- requestContext?: RequestContext,
759
- ) => {
755
+ (threadId: string, messages: UIMessage | UIMessage[], requestContext?: RequestContext) => {
760
756
  const turnMessages = Array.isArray(messages) ? messages : [messages];
761
757
  const userMessage = lastUserMessage(turnMessages);
762
758
  if (!userMessage) throw new Error("A Mastra chat turn requires a user message");
@@ -18,8 +18,6 @@ export function snapshotRequestContext<TValues extends Record<string, unknown>>(
18
18
  const input = typeof source === "function" ? source() : source;
19
19
  if (input === undefined) return undefined;
20
20
  const context =
21
- input instanceof RequestContext
22
- ? input
23
- : new RequestContext<unknown>(Object.entries(input));
21
+ input instanceof RequestContext ? input : new RequestContext<unknown>(Object.entries(input));
24
22
  return new RequestContext<unknown>(Object.entries(structuredClone(context.toJSON())));
25
23
  }
@@ -1,5 +1,5 @@
1
- import type { UIMessage } from "ai";
2
1
  import type { RequestContext } from "@mastra/client-js";
2
+ import type { UIMessage } from "ai";
3
3
  import type { ChatStatus, MessageFeedback, PendingApproval, QueuedSteer } from "../react/types.ts";
4
4
 
5
5
  export type { QueuedSteer } from "../react/types.ts";