@docyrus/ui-pro-ai-assistant 0.1.6 → 0.1.7

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.
@@ -1,5 +1,5 @@
1
1
  import { type RefObject } from 'react';
2
2
  import { type DocyAssistantProps } from './types';
3
- export declare const DocyAssistant: ({ ref, isOpen, onClose, supportWebSearch, supportThinking, supportFiles, supportDocumentSearch, supportDeepResearch, supportMultiModels, supportWorkCanvas, apiEndpoint, title: titleProp, description: descriptionProp, placeholder: placeholderProp, logo, footerText: footerTextProp, variant, renderMode, enableSidebar, enableNavDropdown, enableVoice, enableMicrophone, tenantAiAgentId, onMessageSend, onVoiceStart, onVoiceEnd, className, defaultFullscreen, hideExpand, agentSelectorUrl, baseAgentSelectorUrl, onAgentChange, ...props }: DocyAssistantProps & {
3
+ export declare const DocyAssistant: ({ ref, isOpen, onClose, supportWebSearch, supportThinking, supportFiles, supportDocumentSearch, supportDeepResearch, supportMultiModels, supportWorkCanvas, apiEndpoint, title: titleProp, description: descriptionProp, placeholder: placeholderProp, logo, footerText: footerTextProp, variant, renderMode, enableSidebar, enableNavDropdown, enableVoice, enableMicrophone, tenantAiAgentId, onMessageSend, onVoiceStart, onVoiceEnd, className, defaultFullscreen, hideExpand, hideCloseButton, hideAgentSelector, agentSelectorUrl, baseAgentSelectorUrl, onAgentChange, ...props }: DocyAssistantProps & {
4
4
  ref?: RefObject<HTMLDivElement | null>;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
package/dist/index.js CHANGED
@@ -22431,6 +22431,8 @@ var AssistantView = ({ ref, ...props }) => {
22431
22431
  agentSelectorUrl,
22432
22432
  baseAgentSelectorUrl,
22433
22433
  onAgentChange,
22434
+ hideCloseButton,
22435
+ hideAgentSelector,
22434
22436
  t,
22435
22437
  ...commonProps
22436
22438
  } = props;
@@ -22496,7 +22498,7 @@ var AssistantView = ({ ref, ...props }) => {
22496
22498
  )
22497
22499
  ] })
22498
22500
  ] }),
22499
- agentSelectorUrl || baseAgentSelectorUrl ? /* @__PURE__ */ jsxs(
22501
+ (agentSelectorUrl || baseAgentSelectorUrl) && !hideAgentSelector ? /* @__PURE__ */ jsxs(
22500
22502
  DropdownMenu$1,
22501
22503
  {
22502
22504
  open: agentSelectorOpen,
@@ -22586,7 +22588,7 @@ var AssistantView = ({ ref, ...props }) => {
22586
22588
  )
22587
22589
  ]
22588
22590
  }
22589
- ) : /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: commonProps.title || "Assistant" })
22591
+ ) : /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: activeAgent?.name ?? commonProps.title ?? "Assistant" })
22590
22592
  ] }),
22591
22593
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
22592
22594
  enableNavDropdown && onNewChat && /* @__PURE__ */ jsx(
@@ -22611,7 +22613,7 @@ var AssistantView = ({ ref, ...props }) => {
22611
22613
  children: isFullscreen ? /* @__PURE__ */ jsx(Minimize2, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx(Maximize2, { className: "w-4 h-4" })
22612
22614
  }
22613
22615
  ),
22614
- /* @__PURE__ */ jsx(
22616
+ !hideCloseButton && /* @__PURE__ */ jsx(
22615
22617
  Button,
22616
22618
  {
22617
22619
  variant: "ghost",
@@ -24492,6 +24494,8 @@ var DocyAssistant = ({
24492
24494
  className,
24493
24495
  defaultFullscreen = false,
24494
24496
  hideExpand = false,
24497
+ hideCloseButton = false,
24498
+ hideAgentSelector = false,
24495
24499
  agentSelectorUrl = "/ai/agent-deployments",
24496
24500
  baseAgentSelectorUrl = "/ai/agent-deployments/base",
24497
24501
  onAgentChange,
@@ -25331,6 +25335,8 @@ var DocyAssistant = ({
25331
25335
  ] }),
25332
25336
  onToolAction: handleToolAction,
25333
25337
  threadId: sessionState.selectedSessionId ?? void 0,
25338
+ hideCloseButton,
25339
+ hideAgentSelector,
25334
25340
  agentSelectorUrl,
25335
25341
  baseAgentSelectorUrl,
25336
25342
  onAgentChange: (agentId, agentType) => {