@dbx-tools/ui-mastra 0.9.154 → 0.9.158

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.
Files changed (37) hide show
  1. package/index.react.ts +61 -0
  2. package/index.support.ts +40 -0
  3. package/index.ts +1 -79
  4. package/package.json +21 -10
  5. package/src/react/_assistant-response-status.tsx +1 -1
  6. package/src/react/_external-link-dialog.tsx +1 -1
  7. package/src/react/_model-selector.tsx +5 -5
  8. package/src/react/bubbles.tsx +3 -3
  9. package/src/react/chat-composer.tsx +1 -1
  10. package/src/react/chat-feedback.ts +5 -5
  11. package/src/react/chat-history.ts +4 -4
  12. package/src/react/chat-stream.ts +4 -5
  13. package/src/react/chat-thread-layout.tsx +1 -1
  14. package/src/react/chat-transcript.tsx +3 -3
  15. package/src/react/data-grid.tsx +4 -4
  16. package/src/react/embed-slots.tsx +10 -6
  17. package/src/react/export-menu.tsx +1 -1
  18. package/src/react/feedback-controls.tsx +1 -1
  19. package/src/react/markdown.tsx +2 -4
  20. package/src/react/mastra-assistant.tsx +1 -1
  21. package/src/react/mastra-chat.tsx +17 -17
  22. package/src/react/suggestion-pills.tsx +1 -1
  23. package/src/react/suggestions.ts +1 -1
  24. package/src/react/thread-sidebar.tsx +1 -1
  25. package/src/react/thread-tabs.tsx +1 -1
  26. package/src/react/tool-pill.tsx +7 -9
  27. package/src/react/types.ts +1 -3
  28. package/src/react/use-chat-thread-query.ts +27 -0
  29. package/src/support/chart-option.ts +2 -2
  30. package/src/support/chart-theme.ts +2 -2
  31. package/src/support/export.ts +10 -13
  32. package/src/support/genie-client.ts +22 -13
  33. package/src/support/mastra-client.ts +39 -32
  34. package/src/support/thread-sessions.ts +0 -2
  35. package/src/support/tool-events.ts +1 -1
  36. package/src/react/index.ts +0 -72
  37. package/src/support/index.ts +0 -32
@@ -3,7 +3,7 @@ import {
3
3
  GenieProgressPartDataSchema,
4
4
  TOOL_PROGRESS_PART_TYPE,
5
5
  ToolProgressPartDataSchema,
6
- } from "@dbx-tools/shared-mastra/wire";
6
+ } from "@dbx-tools/shared-mastra";
7
7
  import { getToolOrDynamicToolName, isToolUIPart, type UIMessage } from "ai";
8
8
  import type { ToolEvent } from "../react/types.ts";
9
9
 
@@ -1,72 +0,0 @@
1
- // Public surface of @dbx-tools/ui-mastra/react.
2
- //
3
- // - `MastraChat` / `useMastraChat`: the self-contained drop-in (and its
4
- // headless driver) that wire themselves from the Mastra plugin config.
5
- // - `MastraAssistant` / `useMastraAssistant`: the persistent app shell and
6
- // controller for docked/overlay chat launched from anywhere below it.
7
- // - `ChatView`: the controlled, presentational shell for callers that
8
- // own message state and transport themselves.
9
- // - The Mastra plugin client + hooks (model catalogue, history paging,
10
- // suggestions, embed fetches) the controlled path needs.
11
- // - `dedupeSuggestions`: the dedupe + cap `MastraChat` applies to
12
- // Genie-sourced starter questions, so another chat surface offering the same
13
- // prompts presents an identical list.
14
- //
15
- // Internal building blocks (bubbles, tool pills, markdown, data grid,
16
- // embed slots) are intentionally not re-exported.
17
-
18
- export {
19
- MastraPluginClient,
20
- useChartFetch,
21
- useMastraClient,
22
- useMastraConfig,
23
- useMastraDefaultModel,
24
- useMastraModels,
25
- useMastraSuggestions,
26
- useMastraThreads,
27
- useStatementFetch,
28
- } from "../support/mastra-client.ts";
29
- export type { ByIdFetchState } from "../support/mastra-client.ts";
30
- export { ChatView } from "./chat-view.tsx";
31
- export { ExportMenu } from "./export-menu.tsx";
32
- export { MastraAssistant, useMastraAssistant } from "./mastra-assistant.tsx";
33
- export type {
34
- MastraAssistantController,
35
- MastraAssistantLauncherOptions,
36
- MastraAssistantLauncherPosition,
37
- MastraAssistantMode,
38
- MastraAssistantProps,
39
- MastraAssistantResizeOptions,
40
- MastraAssistantSide,
41
- } from "./mastra-assistant.tsx";
42
- export type {
43
- MastraRequestContextInput,
44
- MastraRequestContextSource,
45
- } from "../support/request-context.ts";
46
- export { dedupeSuggestions } from "./suggestions.ts";
47
- export { MastraChat, useMastraChat } from "./mastra-chat.tsx";
48
- export type {
49
- MastraChatProps,
50
- ThreadIdChangeReason,
51
- UseMastraChatOptions,
52
- } from "./mastra-chat.tsx";
53
- export { ThreadSidebar } from "./thread-sidebar.tsx";
54
- export type { ThreadSidebarProps } from "./thread-sidebar.tsx";
55
- export { ThreadActions, ThreadTabs } from "./thread-tabs.tsx";
56
- export type { ThreadActionsProps, ThreadTabsProps } from "./thread-tabs.tsx";
57
- export type {
58
- ApprovalDecision,
59
- ChatInputMessage,
60
- ChatModelOption,
61
- ChatStatus,
62
- ChatViewProps,
63
- ExportFormat,
64
- FeedbackSubmission,
65
- FeedbackValue,
66
- MessageFeedback,
67
- PendingApproval,
68
- ThreadPlacement,
69
- ThreadSummary,
70
- ToolEvent,
71
- ToolProgress,
72
- } from "./types.ts";
@@ -1,32 +0,0 @@
1
- // GENERATED by projen watch - DO NOT EDIT.
2
- // Regenerated from the exporting modules in ./src.
3
- // Hand edits are overwritten on the next watch; this file is read-only.
4
-
5
- export * as activeRuns from "./active-runs.ts";
6
- export * as chartOption from "./chart-option.ts";
7
- export * as chartTheme from "./chart-theme.ts";
8
- export * as clipboard from "./clipboard.ts";
9
- export * as download from "./download.ts";
10
- export * as exportModule from "./export.ts";
11
- export * as genieClient from "./genie-client.ts";
12
- export * as mastraClient from "./mastra-client.ts";
13
- export * as modelSelection from "./model-selection.ts";
14
- export * as requestContext from "./request-context.ts";
15
- export * as threadLabels from "./thread-labels.ts";
16
- export * as threadPersistence from "./thread-persistence.ts";
17
- export * as threadSessions from "./thread-sessions.ts";
18
- export * as threadTabs from "./thread-tabs.ts";
19
- export * as toolEvents from "./tool-events.ts";
20
- export { StoredActiveRunSchema, activeRunStorageKey } from "./active-runs.ts";
21
- export type { StoredActiveRun } from "./active-runs.ts";
22
- export { LIGHT_CHART_CHROME } from "./chart-theme.ts";
23
- export type { ChartChrome } from "./chart-theme.ts";
24
- export type { ExportFormat, ExportBrand, EmbedResolver, ExportChatOptions } from "./export.ts";
25
- export { GenieChatClient } from "./genie-client.ts";
26
- export { MastraChatRequestError, MastraPluginClient, useMastraConfig, useMastraClient, useMastraMlflowExperiment, useMastraModels, useMastraDefaultModel, useMastraSuggestions, useMastraThreads, useChartFetch, useStatementFetch, useVisualizationFetch } from "./mastra-client.ts";
27
- export type { MastraStreamResponse, MastraMemoryThread, ByIdFetchState } from "./mastra-client.ts";
28
- export { defaultReasoningEffort, modelStorageKey, readStoredModel, storeSelectedModel } from "./model-selection.ts";
29
- export type { MastraRequestContextInput, MastraRequestContextSource } from "./request-context.ts";
30
- export { DEFAULT_THREAD_SESSION_KEY } from "./thread-sessions.ts";
31
- export type { SessionQueuedSteer, SessionRun, ThreadSession } from "./thread-sessions.ts";
32
- export { THREAD_TAB_SEED_MAX } from "./thread-tabs.ts";