@docyrus/ui-pro-ai-assistant 0.6.5 → 0.6.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.
package/README.md CHANGED
@@ -264,7 +264,7 @@ The main chat interface component.
264
264
  | `hostEnvironment` | `string` | — | Host environment identifier sent to the chat endpoint as `hostEnvironment`. The backend uses this to filter the tool list bound to the agent so only tools available in the current environment are exposed. Common values: `"web"`, `"desktop"`, `"chrome"`, `"word"`, `"excel"`, `"powerpoint"`, `"outlook"` |
265
265
  | `appId` | `string` | — | ID of the host app currently open in the page. Forwarded to the chat endpoint as `appId` so the agent can scope its behavior/tools to it. Renders a dismissable "Talking about <app>" chip above the input; once the user clears it, the id stops being sent |
266
266
  | `appName` | `string` | — | Display name for the current host app, shown in the context chip |
267
- | `appLogo` | `string` | — | Logo URL for the current host app, shown in the context chip |
267
+ | `appIcon` | `string` | — | Docyrus icon identifier (e.g. `"fas inbox"`) for the current host app. Rendered via `<DocyrusIcon>` in the context chip |
268
268
 
269
269
  #### Callbacks
270
270
 
@@ -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, enableWelcomePage, tenantAiAgentId, onMessageSend, onVoiceStart, onVoiceEnd, className, defaultFullscreen, hideExpand, hideCloseButton, hideAgentSelector, hideBorder, showHeader, hideHeaderOnWelcome, agentSelectorUrl, baseAgentSelectorUrl, onAgentChange, enableSharing, onShare: onShareProp, initialPrompt, initialModelId, initialFeatures, initialFiles, hostEnvironment, appId, appName, appLogo, clientTools, ...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, enableWelcomePage, tenantAiAgentId, onMessageSend, onVoiceStart, onVoiceEnd, className, defaultFullscreen, hideExpand, hideCloseButton, hideAgentSelector, hideBorder, showHeader, hideHeaderOnWelcome, agentSelectorUrl, baseAgentSelectorUrl, onAgentChange, enableSharing, onShare: onShareProp, initialPrompt, initialModelId, initialFeatures, initialFiles, hostEnvironment, appId, appName, appIcon, clientTools, ...props }: DocyAssistantProps & {
4
4
  ref?: RefObject<HTMLDivElement | null>;
5
5
  }) => import("react/jsx-runtime").JSX.Element;
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { Input } from '@docyrus/ui-pro-shared/components/input';
9
9
  import { Tabs as Tabs$1, TabsList as TabsList$1, TabsTrigger as TabsTrigger$1, TabsContent as TabsContent$1 } from '@docyrus/ui-pro-shared/components/tabs';
10
10
  import { cn } from '@docyrus/ui-pro-shared/lib/utils';
11
11
  import { DefaultChatTransport, lastAssistantMessageIsCompleteWithToolCalls } from 'ai';
12
- import { Pencil, PilcrowIcon, Heading1Icon, Heading2Icon, Heading3Icon, SquareIcon, ListIcon, ListOrderedIcon, ChevronDownIcon, Code2Icon, QuoteIcon, LightbulbIcon, Columns3Icon, GripVertical, FileUpIcon, TableIcon, ImageIcon, FilmIcon, AudioLinesIcon, TableOfContentsIcon, RadicalIcon, RectangleVerticalIcon, CalendarIcon, PlusIcon, FileCodeIcon, MinusIcon, ChevronRightIcon, ListTree, PenToolIcon, Link2Icon, Check, X, Copy, FilesIcon, Link, Text, ExternalLink, Unlink, Bold, Italic, Underline, Strikethrough, Code2, MoreHorizontal, ArrowLeftIcon, ArrowRightIcon, Minus, Plus, CircleArrowDown, Minimize2, Trash2, FileUp, CheckCircle2, FileText, Loader2, Wrench, CornerDownLeftIcon, PencilLineIcon, MessageSquareTextIcon, MessagesSquareIcon, ArrowUpIcon, CheckIcon, CaptionsIcon, ZoomInIcon, CircleArrowDownIcon, MoveUpRightIcon, MoreHorizontalIcon, Eye, PlusCircle, HelpCircle, Maximize2, Download, FileSpreadsheet, ChevronDown, ChevronLeft, ChevronRight, CheckCircle, XCircle, Search, Globe, User, ArrowRight, MapPin, CalendarClock, List, RefreshCw, FilePlus, XIcon, CornerUpLeftIcon, AlbumIcon, FeatherIcon, ListMinusIcon, ListPlusIcon, ListEnd, Wand, LanguagesIcon, BadgeHelpIcon, PenLineIcon, SearchIcon, MusicIcon, CompassIcon, SmileIcon, LeafIcon, ClockIcon, AppleIcon, FlagIcon, StarIcon, DeleteIcon, AlignLeft, AlignCenter, AlignRight, RotateCcw, AlertTriangle, AlertCircle, ArrowUpDown, ArrowDownToLine, PenLine, PencilIcon, TrashIcon, FileIcon, Star, ChevronsUpDown, FolderIcon, MessageSquare, Hash, Table, CheckSquare, Calendar as Calendar$1, Clock, Phone, Mail, Send, RefreshCcw, Undo2, ChevronsUpDownIcon, ChevronsRight, ChevronsLeft, CalendarDays, RefreshCwIcon, PaintRoller, MessageSquareText, ArrowLeft, Users, Bot, Brain, Lightbulb, BookOpen, PenTool, SlidersHorizontal, Wand2, Mic, Code, Trash, Edit, Share, FolderInput, Archive, Building2, ShieldCheck, Sparkles, PanelLeft, NotebookText, CirclePlus, MoreVertical, FileSearch, Microscope, Ruler, AudioLines, BrainCircuit, File as File$1, Plug, Inbox, Menu, FolderOpen, LayoutDashboard, Table2, WandSparklesIcon, ArrowUpToLineIcon, BoldIcon, ItalicIcon, UnderlineIcon, StrikethroughIcon, HighlighterIcon, Undo2Icon, Redo2Icon, ArrowDownToLineIcon, AlignLeftIcon, AlignCenterIcon, AlignRightIcon, AlignJustifyIcon, ListOrdered, ListTodoIcon, ListCollapseIcon, Grid3x3Icon, Combine, Ungroup, ArrowUp, ArrowDown, Trash2Icon, LinkIcon, WrapText, OutdentIcon, IndentIcon, EyeIcon, PenIcon } from 'lucide-react';
12
+ import { Pencil, PilcrowIcon, Heading1Icon, Heading2Icon, Heading3Icon, SquareIcon, ListIcon, ListOrderedIcon, ChevronDownIcon, Code2Icon, QuoteIcon, LightbulbIcon, Columns3Icon, GripVertical, FileUpIcon, TableIcon, ImageIcon, FilmIcon, AudioLinesIcon, TableOfContentsIcon, RadicalIcon, RectangleVerticalIcon, CalendarIcon, PlusIcon, FileCodeIcon, MinusIcon, ChevronRightIcon, ListTree, PenToolIcon, Link2Icon, Check, X, Copy, FilesIcon, Link, Text, ExternalLink, Unlink, Bold, Italic, Underline, Strikethrough, Code2, MoreHorizontal, ArrowLeftIcon, ArrowRightIcon, Minus, Plus, CircleArrowDown, Minimize2, Trash2, FileUp, CheckCircle2, FileText, Loader2, Wrench, CornerDownLeftIcon, PencilLineIcon, MessageSquareTextIcon, MessagesSquareIcon, ArrowUpIcon, CheckIcon, CaptionsIcon, ZoomInIcon, CircleArrowDownIcon, MoveUpRightIcon, MoreHorizontalIcon, Eye, PlusCircle, HelpCircle, Maximize2, Download, FileSpreadsheet, ChevronDown, ChevronLeft, ChevronRight, CheckCircle, XCircle, Search, Globe, User, ArrowRight, MapPin, CalendarClock, List, RefreshCw, FilePlus, XIcon, CornerUpLeftIcon, AlbumIcon, FeatherIcon, ListMinusIcon, ListPlusIcon, ListEnd, Wand, LanguagesIcon, BadgeHelpIcon, PenLineIcon, SearchIcon, MusicIcon, CompassIcon, SmileIcon, LeafIcon, ClockIcon, AppleIcon, FlagIcon, StarIcon, DeleteIcon, AlignLeft, AlignCenter, AlignRight, RotateCcw, AlertTriangle, AlertCircle, ArrowUpDown, ArrowDownToLine, PenLine, PencilIcon, TrashIcon, FileIcon, Star, ChevronsUpDown, FolderIcon, MessageSquare, Hash, Table, CheckSquare, Calendar as Calendar$1, Clock, Phone, Mail, Send, RefreshCcw, Undo2, ChevronsUpDownIcon, ChevronsRight, ChevronsLeft, CalendarDays, RefreshCwIcon, PaintRoller, MessageSquareText, ArrowLeft, Users, Bot, Brain, Lightbulb, BookOpen, PenTool, SlidersHorizontal, Wand2, Mic, Code, Trash, Edit, Share, FolderInput, Archive, Building2, ShieldCheck, Sparkles, PanelLeft, NotebookText, CirclePlus, MoreVertical, FileSearch, Microscope, Ruler, AudioLines, BrainCircuit, File as File$1, Plug, Inbox, LayoutGrid, Menu, FolderOpen, LayoutDashboard, Table2, WandSparklesIcon, ArrowUpToLineIcon, BoldIcon, ItalicIcon, UnderlineIcon, StrikethroughIcon, HighlighterIcon, Undo2Icon, Redo2Icon, ArrowDownToLineIcon, AlignLeftIcon, AlignCenterIcon, AlignRightIcon, AlignJustifyIcon, ListOrdered, ListTodoIcon, ListCollapseIcon, Grid3x3Icon, Combine, Ungroup, ArrowUp, ArrowDown, Trash2Icon, LinkIcon, WrapText, OutdentIcon, IndentIcon, EyeIcon, PenIcon } from 'lucide-react';
13
13
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
14
  import { ScrollArea as ScrollArea$1 } from '@docyrus/ui-pro-shared/components/scroll-area';
15
15
  import { AsyncTokenManager, RestApiClient } from '@docyrus/api-client';
@@ -18,6 +18,7 @@ import { createPortal } from 'react-dom';
18
18
  import { Avatar as Avatar$1, AvatarImage as AvatarImage$1, AvatarFallback as AvatarFallback$1 } from '@docyrus/ui-pro-shared/components/avatar';
19
19
  import { Message, AIMessageAvatar, MessageContent, MessageActions, MessageAction, AIConversation, AIConversationContent, MessageResponse, AIConversationScrollButton, Tool, ToolHeader, ToolContent, ToolInput, ToolOutput, CodeBlock, CodeBlockCopyButton, resolveToolIcon, PromptInputButton, PromptInput, PromptInputTextarea, PromptInputFooter, PromptInputTools, PromptInputSubmit, usePromptInputAttachments } from '@docyrus/ui-pro-shared/ai';
20
20
  import { Spinner } from '@docyrus/ui-pro-shared/components/spinner';
21
+ import { DocyrusIcon } from '@docyrus/ui-pro-shared/docyrus-icon';
21
22
  import { Badge as Badge$1 } from '@docyrus/ui-pro-shared/components/badge';
22
23
  import { DotLottieReact } from '@lottiefiles/dotlottie-react';
23
24
  import { Reasoning, ReasoningTrigger, ReasoningContent } from '@docyrus/ui-pro-shared/ai-elements/reasoning';
@@ -29,7 +30,6 @@ import { Input as Input$1 } from '@docyrus/ui-pro-shared/input';
29
30
  import { Textarea as Textarea$1 } from '@docyrus/ui-pro-shared/textarea';
30
31
  import { Checkbox } from '@docyrus/ui-pro-shared/checkbox';
31
32
  import { Switch } from '@docyrus/ui-pro-shared/switch';
32
- import { DocyrusIcon } from '@docyrus/ui-pro-shared/docyrus-icon';
33
33
  import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@docyrus/ui-pro-shared/select';
34
34
  import { Badge } from '@docyrus/ui-pro-shared/badge';
35
35
  import { tUi } from '@docyrus/ui-pro-shared/lib/ui-i18n';
@@ -15023,8 +15023,8 @@ function ChatPanel({
15023
15023
  const renderAppContextChip = () => {
15024
15024
  if (!appContext) return null;
15025
15025
  return /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-2 self-start rounded-full border bg-muted/50 px-2 py-1 text-xs text-foreground", children: [
15026
- appContext.logo ? /* @__PURE__ */ jsx("img", { src: appContext.logo, alt: "", className: "size-4 rounded" }) : null,
15027
- /* @__PURE__ */ jsx("span", { className: "max-w-[200px] truncate", children: appContext.name ? `Talking about ${appContext.name}` : "App context attached" }),
15026
+ appContext.icon ? /* @__PURE__ */ jsx(DocyrusIcon, { icon: appContext.icon, className: "size-4 shrink-0" }) : /* @__PURE__ */ jsx(LayoutGrid, { className: "size-4 text-muted-foreground" }),
15027
+ /* @__PURE__ */ jsx("span", { className: "max-w-[200px] truncate", children: appContext.name ? `${appContext.name}` : "App context attached" }),
15028
15028
  onClearAppContext ? /* @__PURE__ */ jsx(
15029
15029
  "button",
15030
15030
  {
@@ -32022,7 +32022,7 @@ var DocyAssistant = ({
32022
32022
  hostEnvironment,
32023
32023
  appId,
32024
32024
  appName,
32025
- appLogo,
32025
+ appIcon,
32026
32026
  clientTools,
32027
32027
  ...props
32028
32028
  }) => {
@@ -32060,11 +32060,11 @@ var DocyAssistant = ({
32060
32060
  const [isInlineFullscreen, setIsInlineFullscreen] = useState(defaultFullscreen);
32061
32061
  const [sharingEditorOpen, setSharingEditorOpen] = useState(false);
32062
32062
  const [appContext, setAppContext] = useState(
32063
- appId ? { id: appId, name: appName, logo: appLogo } : null
32063
+ appId ? { id: appId, name: appName, icon: appIcon } : null
32064
32064
  );
32065
32065
  useEffect(() => {
32066
- setAppContext(appId ? { id: appId, name: appName, logo: appLogo } : null);
32067
- }, [appId, appName, appLogo]);
32066
+ setAppContext(appId ? { id: appId, name: appName, icon: appIcon } : null);
32067
+ }, [appId, appName, appIcon]);
32068
32068
  const clearAppContext = useCallback(() => setAppContext(null), []);
32069
32069
  const { isRecording, recognition, handleMicrophoneClick } = useSpeechRecognition({
32070
32070
  enabled: enableMicrophone,