@axiom-lattice/react-sdk 2.1.74 → 2.1.75

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/dist/index.d.mts CHANGED
@@ -1228,6 +1228,21 @@ interface ResourceFolderConfig {
1228
1228
  /**
1229
1229
  * Sidebar menu item configuration
1230
1230
  */
1231
+ /**
1232
+ * Sidebar menu item configuration.
1233
+ *
1234
+ * Three item types:
1235
+ * - `"action"` — clickable button, set `builtin` for predefined behaviors
1236
+ * - `"drawer"` — opens a slide-out panel, set `content` + `title`
1237
+ * - `"route"` — opens a GenUI-registered component in the SideApp area
1238
+ *
1239
+ * When providing `sideMenuItems` or `workspaceMenuItems` to `LatticeChatShellConfig`,
1240
+ * your array **completely replaces** the defaults. Import `DEFAULT_MENU_ITEMS` or
1241
+ * `DEFAULT_WORKSPACE_MENU_ITEMS` to selectively include built-in items:
1242
+ * ```
1243
+ * sideMenuItems: DEFAULT_MENU_ITEMS.filter(i => i.id === "thread-history")
1244
+ * ```
1245
+ */
1231
1246
  interface SideMenuItemConfig {
1232
1247
  /** Unique identifier for the menu item */
1233
1248
  id: string;
@@ -1347,12 +1362,31 @@ interface LatticeChatShellConfig {
1347
1362
  */
1348
1363
  resourceFolders?: ResourceFolderConfig[];
1349
1364
  /**
1350
- * Custom sidebar menu items that can be registered
1351
- * These will be displayed alongside the default menu items
1352
- */
1365
+ * Chat sidebar menu items. When provided, completely replaces the
1366
+ * default built-in items (New Analysis, History).
1367
+ *
1368
+ * To selectively include built-in items, import and filter `DEFAULT_MENU_ITEMS`:
1369
+ * ```
1370
+ * sideMenuItems: DEFAULT_MENU_ITEMS.filter(i => i.id === "thread-history")
1371
+ * ```
1372
+ * Omit this field to use all defaults.
1373
+ */
1353
1374
  sideMenuItems?: SideMenuItemConfig[];
1354
1375
  /**
1355
- * Whether to enable the database picker slot in the chat sender
1376
+ * Workspace menu items. When provided, completely replaces the
1377
+ * default workspace items (Projects, Metrics, Database, etc.).
1378
+ *
1379
+ * To selectively include built-in items, import and filter `DEFAULT_WORKSPACE_MENU_ITEMS`:
1380
+ * ```
1381
+ * workspaceMenuItems: DEFAULT_WORKSPACE_MENU_ITEMS.filter(
1382
+ * i => ["workspace_projects", "assistants"].includes(i.id)
1383
+ * )
1384
+ * ```
1385
+ * Omit this field to use all defaults.
1386
+ */
1387
+ workspaceMenuItems?: SideMenuItemConfig[];
1388
+ /**
1389
+ * Whether to enable the database picker slot in the chat sender
1356
1390
  * When enabled, shows a database selection button in the sender footer
1357
1391
  * Defaults to true
1358
1392
  */
@@ -1550,6 +1584,25 @@ declare const AgentConversations: React__default.FC<AgentConversationsProps>;
1550
1584
 
1551
1585
  declare const MetricsConfigDrawerContent: React__default.FC;
1552
1586
 
1587
+ /**
1588
+ * Built-in default menu items for the workspace shell.
1589
+ *
1590
+ * Contains 12 route/action items organized in groups:
1591
+ * - Projects
1592
+ * - DataSource: Metrics, Database
1593
+ * - Process: Automations, Runtime, Inbox, Eval
1594
+ * - Settings: Assistants, Skills, MCP, Tools
1595
+ * - Account: Switch tenant
1596
+ *
1597
+ * Pass a filtered subset to `workspaceMenuItems` in `LatticeChatShellConfig`:
1598
+ * ```
1599
+ * workspaceMenuItems: DEFAULT_WORKSPACE_MENU_ITEMS.filter(
1600
+ * i => ["workspace_projects", "assistants"].includes(i.id)
1601
+ * )
1602
+ * ```
1603
+ * Or omit `workspaceMenuItems` entirely to use these defaults as-is.
1604
+ */
1605
+ declare const DEFAULT_WORKSPACE_MENU_ITEMS: SideMenuItemConfig[];
1553
1606
  interface WorkspaceResourceManagerProps {
1554
1607
  workspaceId: string;
1555
1608
  workspaceName?: string;
@@ -1583,6 +1636,28 @@ type LatticeChatShellProps = Omit<LatticeChatShellContextProviderProps, "childre
1583
1636
  */
1584
1637
  declare const LatticeChatShell: React__default.FC<LatticeChatShellProps>;
1585
1638
 
1639
+ interface ChatSidebarProps {
1640
+ onSettingsClick?: () => void;
1641
+ defaultCollapsed?: boolean;
1642
+ /** @deprecated Use `sideMenuItems` on `LatticeChatShellConfig` instead. */
1643
+ customMenuItems?: SideMenuItemConfig[];
1644
+ }
1645
+ /**
1646
+ * Built-in default menu items for the chat sidebar.
1647
+ *
1648
+ * Contains two items:
1649
+ * - "new-analysis" (action) — creates a new analysis thread
1650
+ * - "thread-history" (drawer) — inline conversation history panel
1651
+ *
1652
+ * Pass a filtered subset to `sideMenuItems` in `LatticeChatShellConfig`:
1653
+ * ```
1654
+ * sideMenuItems: DEFAULT_MENU_ITEMS.filter(i => i.id !== "new-analysis")
1655
+ * ```
1656
+ * Or omit `sideMenuItems` entirely to use these defaults as-is.
1657
+ */
1658
+ declare const DEFAULT_MENU_ITEMS: SideMenuItemConfig[];
1659
+ declare const ChatSidebar: React__default.FC<ChatSidebarProps>;
1660
+
1586
1661
  declare const ChannelInstallationsDrawerContent: React__default.FC;
1587
1662
 
1588
1663
  interface ScheduleButtonProps {
@@ -2213,4 +2288,4 @@ type IframeMessage = {
2213
2288
  };
2214
2289
  declare function generateIframeSrcdoc(): string;
2215
2290
 
2216
- export { type AgentChatProps, AgentConversations, type AgentConversationsProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, AssistantContext, AssistantContextProvider, type AssistantContextProviderProps, type AssistantContextValue, AssistantFlow, type AssistantFlowProps, AssistantNode, type AssistantNodeData, type AssistantState, type AttachFile, type AuthContextValue, AuthProvider, AxiomLatticeProvider, type AxiomLatticeProviderProps, type BalanceResult, ChangePasswordModal, type ChangePasswordModalProps, ChannelInstallationsDrawerContent, type ChatResponse, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, ColumnLayout, type ColumnLayoutProps, ConversationContext, ConversationContextProvider, type ConversationContextProviderProps, type ConversationContextValue, type ConversationThread, CreateAssistantModal, DEFAULT_MIDDLEWARE_TYPES, type ElementMeta, type ElementProps, EvalPanel, EvalRunResults, EvalSuiteCardList, EvalSuiteDetail, type ExplorerFile, FileExplorer, type FileExplorerProps, type IframeMessage, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, type ModelConfig, type ModelInfo, ModelSelector, type ModelSelectorProps, type PendingMessage, ProtectedRoute, type ProtectedRouteProps, type QuickPromptCategory, type QuickPromptItem, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, type SanitizerConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, type StreamingError, StreamingHTMLRenderer, type StreamingHTMLRendererProps, TenantSelector, type TenantSelectorProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseApiOptions, type UseApiReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, WorkspaceResourceManager, type WorkspaceResourceManagerProps, WorkspaceResourceUIContext, animation, axiomAntdTheme, axiomAntdThemeDark, axiomTokens, colors, generateIframeSrcdoc, generateLabelFromMessage, getAxiomAntdTheme, getElement, radius, regsiterElement, shadows, spacing, typography, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useApi, useAssistantContext, useAuth, useAuthOptional, useAxiomLattice, useAxiomTheme, useChat, useChatUIContext, useClient, useConversationContext, useEvalCases, useEvalProjects, useEvalRunStream, useEvalRuns, useEvalSuites, useLatticeChatShellContext, useTenants, useUsers };
2291
+ export { type AgentChatProps, AgentConversations, type AgentConversationsProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, AssistantContext, AssistantContextProvider, type AssistantContextProviderProps, type AssistantContextValue, AssistantFlow, type AssistantFlowProps, AssistantNode, type AssistantNodeData, type AssistantState, type AttachFile, type AuthContextValue, AuthProvider, AxiomLatticeProvider, type AxiomLatticeProviderProps, type BalanceResult, ChangePasswordModal, type ChangePasswordModalProps, ChannelInstallationsDrawerContent, type ChatResponse, ChatSidebar, type ChatSidebarProps, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, ColumnLayout, type ColumnLayoutProps, ConversationContext, ConversationContextProvider, type ConversationContextProviderProps, type ConversationContextValue, type ConversationThread, CreateAssistantModal, DEFAULT_MENU_ITEMS, DEFAULT_MIDDLEWARE_TYPES, DEFAULT_WORKSPACE_MENU_ITEMS, type ElementMeta, type ElementProps, EvalPanel, EvalRunResults, EvalSuiteCardList, EvalSuiteDetail, type ExplorerFile, FileExplorer, type FileExplorerProps, type IframeMessage, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, type ModelConfig, type ModelInfo, ModelSelector, type ModelSelectorProps, type PendingMessage, ProtectedRoute, type ProtectedRouteProps, type QuickPromptCategory, type QuickPromptItem, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, type SanitizerConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, type StreamingError, StreamingHTMLRenderer, type StreamingHTMLRendererProps, TenantSelector, type TenantSelectorProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseApiOptions, type UseApiReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, WorkspaceResourceManager, type WorkspaceResourceManagerProps, WorkspaceResourceUIContext, animation, axiomAntdTheme, axiomAntdThemeDark, axiomTokens, colors, generateIframeSrcdoc, generateLabelFromMessage, getAxiomAntdTheme, getElement, radius, regsiterElement, shadows, spacing, typography, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useApi, useAssistantContext, useAuth, useAuthOptional, useAxiomLattice, useAxiomTheme, useChat, useChatUIContext, useClient, useConversationContext, useEvalCases, useEvalProjects, useEvalRunStream, useEvalRuns, useEvalSuites, useLatticeChatShellContext, useTenants, useUsers };
package/dist/index.d.ts CHANGED
@@ -1228,6 +1228,21 @@ interface ResourceFolderConfig {
1228
1228
  /**
1229
1229
  * Sidebar menu item configuration
1230
1230
  */
1231
+ /**
1232
+ * Sidebar menu item configuration.
1233
+ *
1234
+ * Three item types:
1235
+ * - `"action"` — clickable button, set `builtin` for predefined behaviors
1236
+ * - `"drawer"` — opens a slide-out panel, set `content` + `title`
1237
+ * - `"route"` — opens a GenUI-registered component in the SideApp area
1238
+ *
1239
+ * When providing `sideMenuItems` or `workspaceMenuItems` to `LatticeChatShellConfig`,
1240
+ * your array **completely replaces** the defaults. Import `DEFAULT_MENU_ITEMS` or
1241
+ * `DEFAULT_WORKSPACE_MENU_ITEMS` to selectively include built-in items:
1242
+ * ```
1243
+ * sideMenuItems: DEFAULT_MENU_ITEMS.filter(i => i.id === "thread-history")
1244
+ * ```
1245
+ */
1231
1246
  interface SideMenuItemConfig {
1232
1247
  /** Unique identifier for the menu item */
1233
1248
  id: string;
@@ -1347,12 +1362,31 @@ interface LatticeChatShellConfig {
1347
1362
  */
1348
1363
  resourceFolders?: ResourceFolderConfig[];
1349
1364
  /**
1350
- * Custom sidebar menu items that can be registered
1351
- * These will be displayed alongside the default menu items
1352
- */
1365
+ * Chat sidebar menu items. When provided, completely replaces the
1366
+ * default built-in items (New Analysis, History).
1367
+ *
1368
+ * To selectively include built-in items, import and filter `DEFAULT_MENU_ITEMS`:
1369
+ * ```
1370
+ * sideMenuItems: DEFAULT_MENU_ITEMS.filter(i => i.id === "thread-history")
1371
+ * ```
1372
+ * Omit this field to use all defaults.
1373
+ */
1353
1374
  sideMenuItems?: SideMenuItemConfig[];
1354
1375
  /**
1355
- * Whether to enable the database picker slot in the chat sender
1376
+ * Workspace menu items. When provided, completely replaces the
1377
+ * default workspace items (Projects, Metrics, Database, etc.).
1378
+ *
1379
+ * To selectively include built-in items, import and filter `DEFAULT_WORKSPACE_MENU_ITEMS`:
1380
+ * ```
1381
+ * workspaceMenuItems: DEFAULT_WORKSPACE_MENU_ITEMS.filter(
1382
+ * i => ["workspace_projects", "assistants"].includes(i.id)
1383
+ * )
1384
+ * ```
1385
+ * Omit this field to use all defaults.
1386
+ */
1387
+ workspaceMenuItems?: SideMenuItemConfig[];
1388
+ /**
1389
+ * Whether to enable the database picker slot in the chat sender
1356
1390
  * When enabled, shows a database selection button in the sender footer
1357
1391
  * Defaults to true
1358
1392
  */
@@ -1550,6 +1584,25 @@ declare const AgentConversations: React__default.FC<AgentConversationsProps>;
1550
1584
 
1551
1585
  declare const MetricsConfigDrawerContent: React__default.FC;
1552
1586
 
1587
+ /**
1588
+ * Built-in default menu items for the workspace shell.
1589
+ *
1590
+ * Contains 12 route/action items organized in groups:
1591
+ * - Projects
1592
+ * - DataSource: Metrics, Database
1593
+ * - Process: Automations, Runtime, Inbox, Eval
1594
+ * - Settings: Assistants, Skills, MCP, Tools
1595
+ * - Account: Switch tenant
1596
+ *
1597
+ * Pass a filtered subset to `workspaceMenuItems` in `LatticeChatShellConfig`:
1598
+ * ```
1599
+ * workspaceMenuItems: DEFAULT_WORKSPACE_MENU_ITEMS.filter(
1600
+ * i => ["workspace_projects", "assistants"].includes(i.id)
1601
+ * )
1602
+ * ```
1603
+ * Or omit `workspaceMenuItems` entirely to use these defaults as-is.
1604
+ */
1605
+ declare const DEFAULT_WORKSPACE_MENU_ITEMS: SideMenuItemConfig[];
1553
1606
  interface WorkspaceResourceManagerProps {
1554
1607
  workspaceId: string;
1555
1608
  workspaceName?: string;
@@ -1583,6 +1636,28 @@ type LatticeChatShellProps = Omit<LatticeChatShellContextProviderProps, "childre
1583
1636
  */
1584
1637
  declare const LatticeChatShell: React__default.FC<LatticeChatShellProps>;
1585
1638
 
1639
+ interface ChatSidebarProps {
1640
+ onSettingsClick?: () => void;
1641
+ defaultCollapsed?: boolean;
1642
+ /** @deprecated Use `sideMenuItems` on `LatticeChatShellConfig` instead. */
1643
+ customMenuItems?: SideMenuItemConfig[];
1644
+ }
1645
+ /**
1646
+ * Built-in default menu items for the chat sidebar.
1647
+ *
1648
+ * Contains two items:
1649
+ * - "new-analysis" (action) — creates a new analysis thread
1650
+ * - "thread-history" (drawer) — inline conversation history panel
1651
+ *
1652
+ * Pass a filtered subset to `sideMenuItems` in `LatticeChatShellConfig`:
1653
+ * ```
1654
+ * sideMenuItems: DEFAULT_MENU_ITEMS.filter(i => i.id !== "new-analysis")
1655
+ * ```
1656
+ * Or omit `sideMenuItems` entirely to use these defaults as-is.
1657
+ */
1658
+ declare const DEFAULT_MENU_ITEMS: SideMenuItemConfig[];
1659
+ declare const ChatSidebar: React__default.FC<ChatSidebarProps>;
1660
+
1586
1661
  declare const ChannelInstallationsDrawerContent: React__default.FC;
1587
1662
 
1588
1663
  interface ScheduleButtonProps {
@@ -2213,4 +2288,4 @@ type IframeMessage = {
2213
2288
  };
2214
2289
  declare function generateIframeSrcdoc(): string;
2215
2290
 
2216
- export { type AgentChatProps, AgentConversations, type AgentConversationsProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, AssistantContext, AssistantContextProvider, type AssistantContextProviderProps, type AssistantContextValue, AssistantFlow, type AssistantFlowProps, AssistantNode, type AssistantNodeData, type AssistantState, type AttachFile, type AuthContextValue, AuthProvider, AxiomLatticeProvider, type AxiomLatticeProviderProps, type BalanceResult, ChangePasswordModal, type ChangePasswordModalProps, ChannelInstallationsDrawerContent, type ChatResponse, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, ColumnLayout, type ColumnLayoutProps, ConversationContext, ConversationContextProvider, type ConversationContextProviderProps, type ConversationContextValue, type ConversationThread, CreateAssistantModal, DEFAULT_MIDDLEWARE_TYPES, type ElementMeta, type ElementProps, EvalPanel, EvalRunResults, EvalSuiteCardList, EvalSuiteDetail, type ExplorerFile, FileExplorer, type FileExplorerProps, type IframeMessage, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, type ModelConfig, type ModelInfo, ModelSelector, type ModelSelectorProps, type PendingMessage, ProtectedRoute, type ProtectedRouteProps, type QuickPromptCategory, type QuickPromptItem, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, type SanitizerConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, type StreamingError, StreamingHTMLRenderer, type StreamingHTMLRendererProps, TenantSelector, type TenantSelectorProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseApiOptions, type UseApiReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, WorkspaceResourceManager, type WorkspaceResourceManagerProps, WorkspaceResourceUIContext, animation, axiomAntdTheme, axiomAntdThemeDark, axiomTokens, colors, generateIframeSrcdoc, generateLabelFromMessage, getAxiomAntdTheme, getElement, radius, regsiterElement, shadows, spacing, typography, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useApi, useAssistantContext, useAuth, useAuthOptional, useAxiomLattice, useAxiomTheme, useChat, useChatUIContext, useClient, useConversationContext, useEvalCases, useEvalProjects, useEvalRunStream, useEvalRuns, useEvalSuites, useLatticeChatShellContext, useTenants, useUsers };
2291
+ export { type AgentChatProps, AgentConversations, type AgentConversationsProps, type AgentState, AgentThreadProvider, type AgentThreadProviderProps, AssistantContext, AssistantContextProvider, type AssistantContextProviderProps, type AssistantContextValue, AssistantFlow, type AssistantFlowProps, AssistantNode, type AssistantNodeData, type AssistantState, type AttachFile, type AuthContextValue, AuthProvider, AxiomLatticeProvider, type AxiomLatticeProviderProps, type BalanceResult, ChangePasswordModal, type ChangePasswordModalProps, ChannelInstallationsDrawerContent, type ChatResponse, ChatSidebar, type ChatSidebarProps, type ChatState, type ChatStateWithAgent, ChatUIContext, ChatUIContextProvider, Chating, type ChatingProps, type ClientConfig, ColumnLayout, type ColumnLayoutProps, ConversationContext, ConversationContextProvider, type ConversationContextProviderProps, type ConversationContextValue, type ConversationThread, CreateAssistantModal, DEFAULT_MENU_ITEMS, DEFAULT_MIDDLEWARE_TYPES, DEFAULT_WORKSPACE_MENU_ITEMS, type ElementMeta, type ElementProps, EvalPanel, EvalRunResults, EvalSuiteCardList, EvalSuiteDetail, type ExplorerFile, FileExplorer, type FileExplorerProps, type IframeMessage, LatticeChat, LatticeChatShell, type LatticeChatShellConfig, LatticeChatShellContext, LatticeChatShellContextProvider, type LatticeChatShellContextProviderProps, type LatticeChatShellContextValue, type LatticeChatShellProps, LoginForm, type LoginFormProps, LoginPage, MDResponse, MDViewFormItem, MetricsConfigDrawerContent, type MiddlewareConfigDefinition, type MiddlewareConfigSchema, type MiddlewareConfigSchemaProperty, type MiddlewareToolDefinition, type MiddlewareTypeDefinition, type ModelConfig, type ModelInfo, ModelSelector, type ModelSelectorProps, type PendingMessage, ProtectedRoute, type ProtectedRouteProps, type QuickPromptCategory, type QuickPromptItem, RegisterForm, type RegisterFormProps, type ResourceFolderConfig, type SanitizerConfig, ScheduleButton, type ScheduleButtonProps, SideAppViewBrowser, type SideMenuItemConfig, type SideMenuItemType, SkillCategoryPrompts, type SkillCategoryPromptsProps, SkillFlow, type SkillFlowProps, SkillNode, type SkillNodeData, type StreamEventHandlerOptions, type StreamingError, StreamingHTMLRenderer, type StreamingHTMLRendererProps, TenantSelector, type TenantSelectorProps, type ThreadState, type ToolCallData, type UIMessage, type UseAgentStateOptions, type UseAgentStateReturn, type UseApiOptions, type UseApiReturn, type UseAxiomLatticeOptions, type UseChatOptions, type UseTenantsOptions, type UseTenantsReturn, type UseUsersOptions, type UseUsersReturn, UserProfile, type UserProfileProps, type UserTenantInfo, WorkspaceResourceManager, type WorkspaceResourceManagerProps, WorkspaceResourceUIContext, animation, axiomAntdTheme, axiomAntdThemeDark, axiomTokens, colors, generateIframeSrcdoc, generateLabelFromMessage, getAxiomAntdTheme, getElement, radius, regsiterElement, shadows, spacing, typography, useAgentChat, useAgentGraph, useAgentState, useAgentThreadContext, useApi, useAssistantContext, useAuth, useAuthOptional, useAxiomLattice, useAxiomTheme, useChat, useChatUIContext, useClient, useConversationContext, useEvalCases, useEvalProjects, useEvalRunStream, useEvalRuns, useEvalSuites, useLatticeChatShellContext, useTenants, useUsers };
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ __export(index_exports, {
41
41
  AxiomLatticeProvider: () => AxiomLatticeProvider,
42
42
  ChangePasswordModal: () => ChangePasswordModal,
43
43
  ChannelInstallationsDrawerContent: () => ChannelInstallationsDrawerContent,
44
+ ChatSidebar: () => ChatSidebar,
44
45
  ChatUIContext: () => ChatUIContext,
45
46
  ChatUIContextProvider: () => ChatUIContextProvider,
46
47
  Chating: () => Chating,
@@ -48,7 +49,9 @@ __export(index_exports, {
48
49
  ConversationContext: () => ConversationContext,
49
50
  ConversationContextProvider: () => ConversationContextProvider,
50
51
  CreateAssistantModal: () => CreateAssistantModal_default,
52
+ DEFAULT_MENU_ITEMS: () => DEFAULT_MENU_ITEMS,
51
53
  DEFAULT_MIDDLEWARE_TYPES: () => DEFAULT_MIDDLEWARE_TYPES,
54
+ DEFAULT_WORKSPACE_MENU_ITEMS: () => DEFAULT_WORKSPACE_MENU_ITEMS,
52
55
  EvalPanel: () => EvalPanel,
53
56
  EvalRunResults: () => EvalRunResults,
54
57
  EvalSuiteCardList: () => EvalSuiteCardList,
@@ -20725,6 +20728,110 @@ var EvalPanel = () => {
20725
20728
 
20726
20729
  // src/components/Chat/WorkspaceResourceManager.tsx
20727
20730
  var import_jsx_runtime82 = require("react/jsx-runtime");
20731
+ var DEFAULT_WORKSPACE_MENU_ITEMS = [
20732
+ {
20733
+ id: "workspace_projects",
20734
+ type: "route",
20735
+ name: "Projects",
20736
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.FolderOpen, { size: 20 }),
20737
+ order: 0
20738
+ },
20739
+ {
20740
+ id: "metrics",
20741
+ builtin: "metrics",
20742
+ type: "route",
20743
+ name: "Metrics",
20744
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Activity, { size: 20 }),
20745
+ order: 10,
20746
+ group: "DataSource"
20747
+ },
20748
+ {
20749
+ id: "database",
20750
+ builtin: "database",
20751
+ type: "route",
20752
+ name: "Database",
20753
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Database, { size: 20 }),
20754
+ order: 20,
20755
+ group: "DataSource"
20756
+ },
20757
+ {
20758
+ id: "topology-automations",
20759
+ type: "route",
20760
+ name: "Automations",
20761
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Share2, { size: 20 }),
20762
+ order: 25,
20763
+ group: "Process"
20764
+ },
20765
+ {
20766
+ id: "topology-runtimes",
20767
+ type: "route",
20768
+ name: "Runtime",
20769
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.History, { size: 20 }),
20770
+ order: 26,
20771
+ group: "Process"
20772
+ },
20773
+ {
20774
+ id: "topology-inbox",
20775
+ type: "route",
20776
+ name: "Inbox",
20777
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Inbox, { size: 20 }),
20778
+ order: 27,
20779
+ group: "Process"
20780
+ },
20781
+ {
20782
+ id: "eval",
20783
+ type: "route",
20784
+ name: "Eval",
20785
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.FlaskConical, { size: 20 }),
20786
+ order: 28,
20787
+ group: "Process"
20788
+ },
20789
+ {
20790
+ id: "assistants",
20791
+ builtin: "assistants",
20792
+ type: "route",
20793
+ name: "Assistants",
20794
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Bot, { size: 20 }),
20795
+ order: 30,
20796
+ group: "Settings"
20797
+ },
20798
+ {
20799
+ id: "skills",
20800
+ builtin: "skills",
20801
+ type: "route",
20802
+ name: "Skills",
20803
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Zap, { size: 20 }),
20804
+ order: 35,
20805
+ group: "Settings"
20806
+ },
20807
+ {
20808
+ id: "mcp",
20809
+ builtin: "mcp",
20810
+ type: "route",
20811
+ name: "MCP",
20812
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Plug, { size: 20 }),
20813
+ order: 40,
20814
+ group: "Settings"
20815
+ },
20816
+ {
20817
+ id: "tools",
20818
+ builtin: "tools",
20819
+ type: "route",
20820
+ name: "Tools",
20821
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Wrench, { size: 20 }),
20822
+ order: 50,
20823
+ group: "Settings"
20824
+ },
20825
+ {
20826
+ id: "switch_tenant",
20827
+ builtin: "switch-tenant",
20828
+ type: "action",
20829
+ name: "Switch tenant",
20830
+ icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Building2, { size: 20 }),
20831
+ order: 900,
20832
+ group: "Account"
20833
+ }
20834
+ ];
20728
20835
  var createWrapper = (Component) => {
20729
20836
  return () => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Component, { ...{} });
20730
20837
  };
@@ -20794,120 +20901,13 @@ var WorkspaceResourceManager = ({
20794
20901
  }, []);
20795
20902
  const { user, logout, tenants, currentTenant, selectTenant, isLoading } = useAuth();
20796
20903
  const { setWorkspace, setProject } = useWorkspaceContext();
20904
+ const { config } = useLatticeChatShellContext();
20797
20905
  const [tenantModalOpen, setTenantModalOpen] = (0, import_react71.useState)(false);
20798
20906
  const [changePasswordOpen, setChangePasswordOpen] = (0, import_react71.useState)(false);
20799
20907
  const menuItems = (0, import_react71.useMemo)(() => {
20800
- return [
20801
- // Projects - opens in SideApp via route type
20802
- // ProjectCardList fetches its own data
20803
- {
20804
- id: "workspace_projects",
20805
- type: "route",
20806
- name: "Projects",
20807
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.FolderOpen, { size: 20 }),
20808
- order: 0
20809
- },
20810
- // DataSource Group
20811
- {
20812
- id: "metrics",
20813
- builtin: "metrics",
20814
- type: "route",
20815
- name: "Metrics",
20816
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Activity, { size: 20 }),
20817
- order: 10,
20818
- group: "DataSource"
20819
- },
20820
- {
20821
- id: "database",
20822
- builtin: "database",
20823
- type: "route",
20824
- name: "Database",
20825
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Database, { size: 20 }),
20826
- order: 20,
20827
- group: "DataSource"
20828
- },
20829
- // Process Group
20830
- {
20831
- id: "topology-automations",
20832
- type: "route",
20833
- name: "Automations",
20834
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Share2, { size: 20 }),
20835
- order: 25,
20836
- group: "Process"
20837
- },
20838
- {
20839
- id: "topology-runtimes",
20840
- type: "route",
20841
- name: "Runtime",
20842
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.History, { size: 20 }),
20843
- order: 26,
20844
- group: "Process"
20845
- },
20846
- {
20847
- id: "topology-inbox",
20848
- type: "route",
20849
- name: "Inbox",
20850
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Inbox, { size: 20 }),
20851
- order: 27,
20852
- group: "Process"
20853
- },
20854
- {
20855
- id: "eval",
20856
- type: "route",
20857
- name: "Eval",
20858
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.FlaskConical, { size: 20 }),
20859
- order: 28,
20860
- group: "Process"
20861
- },
20862
- // Settings Group
20863
- {
20864
- id: "assistants",
20865
- builtin: "assistants",
20866
- type: "route",
20867
- name: "Assistants",
20868
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Bot, { size: 20 }),
20869
- order: 30,
20870
- group: "Settings"
20871
- },
20872
- {
20873
- id: "skills",
20874
- builtin: "skills",
20875
- type: "route",
20876
- name: "Skills",
20877
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Zap, { size: 20 }),
20878
- order: 35,
20879
- group: "Settings"
20880
- },
20881
- {
20882
- id: "mcp",
20883
- builtin: "mcp",
20884
- type: "route",
20885
- name: "MCP",
20886
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Plug, { size: 20 }),
20887
- order: 40,
20888
- group: "Settings"
20889
- },
20890
- {
20891
- id: "tools",
20892
- builtin: "tools",
20893
- type: "route",
20894
- name: "Tools",
20895
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Wrench, { size: 20 }),
20896
- order: 50,
20897
- group: "Settings"
20898
- },
20899
- // Switch Tenant action
20900
- {
20901
- id: "switch_tenant",
20902
- builtin: "switch-tenant",
20903
- type: "action",
20904
- name: "Switch tenant",
20905
- icon: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react14.Building2, { size: 20 }),
20906
- order: 900,
20907
- group: "Account"
20908
- }
20909
- ];
20910
- }, [workspaceName]);
20908
+ const items = config.workspaceMenuItems?.length ? [...config.workspaceMenuItems] : [...DEFAULT_WORKSPACE_MENU_ITEMS];
20909
+ return items.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
20910
+ }, [config.workspaceMenuItems]);
20911
20911
  const handleItemClick = (item) => {
20912
20912
  if (item.type === "action" && item.builtin === "switch-tenant") {
20913
20913
  setTenantModalOpen(true);
@@ -20927,26 +20927,23 @@ var WorkspaceResourceManager = ({
20927
20927
  "topology-inbox": "workspace_topology_inbox",
20928
20928
  eval: "workspace_eval"
20929
20929
  };
20930
- const componentKey = componentKeyMap[item.id];
20931
- if (componentKey) {
20932
- openContentApp({
20933
- component_key: componentKey,
20934
- data: {},
20935
- message: item.name
20936
- });
20937
- }
20930
+ const componentKey = componentKeyMap[item.id] ?? item.id;
20931
+ openContentApp({
20932
+ component_key: componentKey,
20933
+ data: {},
20934
+ message: item.name
20935
+ });
20938
20936
  }
20939
20937
  };
20940
20938
  (0, import_react71.useEffect)(() => {
20941
- if (!hasOpenedDefault.current) {
20939
+ if (!hasOpenedDefault.current && menuItems.length > 0) {
20942
20940
  hasOpenedDefault.current = true;
20943
- openContentApp({
20944
- component_key: "workspace_projects",
20945
- data: {},
20946
- message: "Projects"
20947
- });
20941
+ const firstRoute = menuItems.find((item) => item.type === "route");
20942
+ if (firstRoute) {
20943
+ handleItemClick(firstRoute);
20944
+ }
20948
20945
  }
20949
- }, [openContentApp]);
20946
+ }, []);
20950
20947
  const userMenuItems = /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { style: { minWidth: 160 }, children: [
20951
20948
  /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { style: { padding: "8px 12px", borderBottom: "1px solid #f0f0f0" }, children: [
20952
20949
  /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { style: { fontWeight: 500 }, children: user?.name || user?.email }),
@@ -30896,7 +30893,6 @@ var DRAWER_STYLES2 = {
30896
30893
  }
30897
30894
  };
30898
30895
  var DEFAULT_MENU_ITEMS = [
30899
- // First: New Analysis (action)
30900
30896
  {
30901
30897
  id: "new-analysis",
30902
30898
  builtin: "new-analysis",
@@ -30905,7 +30901,6 @@ var DEFAULT_MENU_ITEMS = [
30905
30901
  icon: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react33.PlusCircle, { size: 20 }),
30906
30902
  order: 0
30907
30903
  },
30908
- // Second: Thread History (inline drawer)
30909
30904
  {
30910
30905
  id: "thread-history",
30911
30906
  builtin: "thread-history",
@@ -30919,7 +30914,6 @@ var DEFAULT_MENU_ITEMS = [
30919
30914
  inlineDefaultExpanded: true,
30920
30915
  content: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ThreadHistoryMenuContent, {})
30921
30916
  }
30922
- // Project Files removed - now accessed via header toggle
30923
30917
  ];
30924
30918
  var ChatSidebar = ({
30925
30919
  onSettingsClick,
@@ -30941,10 +30935,7 @@ var ChatSidebar = ({
30941
30935
  } = config;
30942
30936
  const isExpandedMode = sidebarMode === "expanded";
30943
30937
  const menuItems = (0, import_react101.useMemo)(() => {
30944
- const items = [...DEFAULT_MENU_ITEMS];
30945
- for (const item of customMenuItems) {
30946
- items.push(item);
30947
- }
30938
+ const items = customMenuItems.length > 0 ? [...customMenuItems] : [...DEFAULT_MENU_ITEMS];
30948
30939
  return items.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
30949
30940
  }, [customMenuItems]);
30950
30941
  const handleMenuClick = (0, import_react101.useCallback)(async (item) => {
@@ -32915,6 +32906,7 @@ var LarkChannelInstallationFormModal = ({ installation, open, post, put, onCance
32915
32906
  AxiomLatticeProvider,
32916
32907
  ChangePasswordModal,
32917
32908
  ChannelInstallationsDrawerContent,
32909
+ ChatSidebar,
32918
32910
  ChatUIContext,
32919
32911
  ChatUIContextProvider,
32920
32912
  Chating,
@@ -32922,7 +32914,9 @@ var LarkChannelInstallationFormModal = ({ installation, open, post, put, onCance
32922
32914
  ConversationContext,
32923
32915
  ConversationContextProvider,
32924
32916
  CreateAssistantModal,
32917
+ DEFAULT_MENU_ITEMS,
32925
32918
  DEFAULT_MIDDLEWARE_TYPES,
32919
+ DEFAULT_WORKSPACE_MENU_ITEMS,
32926
32920
  EvalPanel,
32927
32921
  EvalRunResults,
32928
32922
  EvalSuiteCardList,