@docyrus/ui-pro-ai-assistant 0.6.7 → 0.6.9
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 +7 -8
- package/dist/components/adaptive-card-tool.d.ts +12 -0
- package/dist/components/agent-tabs.d.ts +33 -0
- package/dist/components/docyrus/adaptive-card/action-bar.d.ts +7 -0
- package/dist/components/docyrus/adaptive-card/actions/action-button.d.ts +11 -0
- package/dist/components/docyrus/adaptive-card/actions/action-execute.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/actions/action-open-url.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/actions/action-reset-inputs.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/actions/action-show-card.d.ts +7 -0
- package/dist/components/docyrus/adaptive-card/actions/action-submit.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/actions/action-toggle-visibility.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/adaptive-card-context.d.ts +43 -0
- package/dist/components/docyrus/adaptive-card/adaptive-card-types.d.ts +672 -0
- package/dist/components/docyrus/adaptive-card/adaptive-card-view.d.ts +6 -0
- package/dist/components/docyrus/adaptive-card/adaptive-card.d.ts +3 -0
- package/dist/components/docyrus/adaptive-card/element-node.d.ts +11 -0
- package/dist/components/docyrus/adaptive-card/element-registry.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/accordion-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/action-set.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/badge-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/carousel-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/chart-elements.d.ts +19 -0
- package/dist/components/docyrus/adaptive-card/elements/chart-shared.d.ts +8 -0
- package/dist/components/docyrus/adaptive-card/elements/code-block-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/column-set.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/component-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/compound-button-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/container.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/fact-set.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/icon-element.d.ts +6 -0
- package/dist/components/docyrus/adaptive-card/elements/image-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/image-set.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/loop-component-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/media-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/progress-bar-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/progress-ring-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/rating-element.d.ts +10 -0
- package/dist/components/docyrus/adaptive-card/elements/rich-text-block.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/tab-set-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/table-element.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/elements/text-block.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/index.d.ts +15 -0
- package/dist/components/docyrus/adaptive-card/inputs/input-choice-set.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/inputs/input-date.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/inputs/input-number.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/inputs/input-rating.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/inputs/input-shell.d.ts +7 -0
- package/dist/components/docyrus/adaptive-card/inputs/input-text.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/inputs/input-time.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/inputs/input-toggle.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/inputs/use-input-register.d.ts +2 -0
- package/dist/components/docyrus/adaptive-card/lib/chart-palette.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/lib/collect-inputs.d.ts +3 -0
- package/dist/components/docyrus/adaptive-card/lib/color-tokens.d.ts +9 -0
- package/dist/components/docyrus/adaptive-card/lib/default-host-config.d.ts +3 -0
- package/dist/components/docyrus/adaptive-card/lib/expression.d.ts +12 -0
- package/dist/components/docyrus/adaptive-card/lib/interpolate.d.ts +2 -0
- package/dist/components/docyrus/adaptive-card/lib/parse-card.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/lib/size-tokens.d.ts +16 -0
- package/dist/components/docyrus/adaptive-card/lib/spacing-tokens.d.ts +4 -0
- package/dist/components/docyrus/adaptive-card/lib/templating.d.ts +6 -0
- package/dist/components/docyrus/adaptive-card/lib/validate-inputs.d.ts +7 -0
- package/dist/components/docyrus/adaptive-card/lib/version.d.ts +5 -0
- package/dist/components/docyrus/adaptive-card/register-default-elements.d.ts +1 -0
- package/dist/components/generative-tool.d.ts +7 -1
- package/dist/components/template-output.d.ts +11 -0
- package/dist/components/ui/circular-progress.d.ts +24 -0
- package/dist/docy-assistant.d.ts +1 -1
- package/dist/hooks/docyrus/use-adaptive-card.d.ts +43 -0
- package/dist/hooks/use-assistant-api.d.ts +13 -0
- package/dist/index.js +5831 -1547
- package/dist/index.js.map +1 -1
- package/dist/internal/plate-editor/editor/plugins/emoji-kit.d.ts +2 -5
- package/dist/internal/plate-editor/editor/plugins/mention-base-kit.d.ts +2 -11
- package/dist/internal/plate-editor/editor/plugins/mention-kit.d.ts +2 -11
- package/dist/internal/plate-editor/editor/plugins/slash-kit.d.ts +2 -1
- package/dist/styles.css +458 -34
- package/dist/types/index.d.ts +5 -6
- package/dist/views/assistant-view.d.ts +16 -5
- package/dist/views/chat-panel.d.ts +12 -1
- package/dist/views/message-list.d.ts +2 -1
- package/package.json +10 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -299,7 +299,6 @@ export interface DocyAssistantProps {
|
|
|
299
299
|
size?: 'default' | 'large';
|
|
300
300
|
theme?: 'auto' | 'light' | 'dark';
|
|
301
301
|
enableSidebar?: boolean;
|
|
302
|
-
enableNavDropdown?: boolean;
|
|
303
302
|
enableVoice?: boolean;
|
|
304
303
|
enableMicrophone?: boolean;
|
|
305
304
|
enableWelcomePage?: boolean;
|
|
@@ -313,18 +312,18 @@ export interface DocyAssistantProps {
|
|
|
313
312
|
hideExpand?: boolean;
|
|
314
313
|
/** Hide the close (X) button in the header */
|
|
315
314
|
hideCloseButton?: boolean;
|
|
316
|
-
/** Hide the agent selector dropdown in the input area; shows agent name as static text instead */
|
|
317
|
-
hideAgentSelector?: boolean;
|
|
318
315
|
/** Hide the outer border of the assistant container */
|
|
319
316
|
hideBorder?: boolean;
|
|
320
|
-
/** Show the header bar (default true)
|
|
317
|
+
/** Show the header bar (default true). */
|
|
321
318
|
showHeader?: boolean;
|
|
322
319
|
/** Hide the header bar while the welcome view is active (default true, preserving the previous behavior). Set to false to keep the header visible on the welcome screen. */
|
|
323
320
|
hideHeaderOnWelcome?: boolean;
|
|
321
|
+
/** URL listing deployed agents for the "+" tab dropdown (defaults to `/ai/agent-deployments`). */
|
|
324
322
|
agentSelectorUrl?: string;
|
|
325
|
-
|
|
326
|
-
/** Called after agent selection is persisted internally, for external notification only */
|
|
323
|
+
/** Fired when the user opens a new agent tab from the "+" dropdown. */
|
|
327
324
|
onAgentChange?: (agentId: string, agentType: 'base' | 'deployment') => void;
|
|
325
|
+
/** Fired when the assistant enters or exits fullscreen (true = entered). */
|
|
326
|
+
onFullscreenChange?: (isFullscreen: boolean) => void;
|
|
328
327
|
/** Show the share button on threads. Defaults to `false`. */
|
|
329
328
|
enableSharing?: boolean;
|
|
330
329
|
/**
|
|
@@ -31,6 +31,10 @@ interface AssistantViewCommonProps {
|
|
|
31
31
|
recognition?: any;
|
|
32
32
|
onMicrophoneClick?: () => void;
|
|
33
33
|
onToolAction?: (event: ToolActionEvent) => void;
|
|
34
|
+
onForwardToAgent?: (options: {
|
|
35
|
+
agentId: string;
|
|
36
|
+
prompt?: string;
|
|
37
|
+
}) => void;
|
|
34
38
|
onEditPrompt?: (messageIndex: number, newText: string) => void;
|
|
35
39
|
showWelcome?: boolean;
|
|
36
40
|
recentSessions?: AssistantSession[];
|
|
@@ -45,6 +49,11 @@ interface AssistantViewCommonProps {
|
|
|
45
49
|
* avatars / names / step templates for `call*Agent` tool calls.
|
|
46
50
|
*/
|
|
47
51
|
subagents?: Array<Record<string, any>>;
|
|
52
|
+
/**
|
|
53
|
+
* Tool metadata for the active agent (and its direct sub-agents). Forwarded
|
|
54
|
+
* to ChatPanel so the renderer can resolve `outputRenderType` per tool call.
|
|
55
|
+
*/
|
|
56
|
+
agentTools?: Array<Record<string, any>>;
|
|
48
57
|
/** Host app currently in context (id + name + Docyrus icon string). */
|
|
49
58
|
appContext?: {
|
|
50
59
|
id: string;
|
|
@@ -67,21 +76,23 @@ export interface InlineModeProps extends AssistantViewCommonProps {
|
|
|
67
76
|
onTabChange?: (tab: number) => void;
|
|
68
77
|
onExpand?: () => void;
|
|
69
78
|
onNewChat?: () => void;
|
|
70
|
-
enableNavDropdown?: boolean;
|
|
71
79
|
isFullscreen?: boolean;
|
|
72
80
|
renderSessionsView?: () => ReactNode;
|
|
73
81
|
renderProjectsView?: () => ReactNode;
|
|
74
82
|
renderWorksView?: () => ReactNode;
|
|
75
83
|
renderMemoriesView?: () => ReactNode;
|
|
76
84
|
renderThreadHeader?: () => ReactNode;
|
|
85
|
+
/**
|
|
86
|
+
* Renders the header tab strip (agent tabs UI). The right-side controls
|
|
87
|
+
* (expand / close) stay in place.
|
|
88
|
+
*/
|
|
89
|
+
renderHeaderTabs?: (opts: {
|
|
90
|
+
isFullscreen: boolean;
|
|
91
|
+
}) => ReactNode;
|
|
77
92
|
hideCloseButton?: boolean;
|
|
78
|
-
hideAgentSelector?: boolean;
|
|
79
93
|
hideBorder?: boolean;
|
|
80
94
|
showHeader?: boolean;
|
|
81
95
|
hideHeaderOnWelcome?: boolean;
|
|
82
|
-
agentSelectorUrl?: string;
|
|
83
|
-
baseAgentSelectorUrl?: string;
|
|
84
|
-
onAgentChange?: (agentId: string, agentType: 'base' | 'deployment') => void;
|
|
85
96
|
t: (key: string) => string;
|
|
86
97
|
}
|
|
87
98
|
export interface ConversationModeProps extends AssistantViewCommonProps {
|
|
@@ -68,6 +68,12 @@ export interface ChatPanelProps {
|
|
|
68
68
|
* `call*Agent` tool calls.
|
|
69
69
|
*/
|
|
70
70
|
subagents?: Array<Record<string, any>>;
|
|
71
|
+
/**
|
|
72
|
+
* Tool metadata for the active agent (and its direct sub-agents). Used by
|
|
73
|
+
* the renderer to resolve `outputRenderType` / `outputRenderTemplate` for
|
|
74
|
+
* an in-flight tool call (e.g. switch to AdaptiveCard rendering).
|
|
75
|
+
*/
|
|
76
|
+
agentTools?: Array<Record<string, any>>;
|
|
71
77
|
/** Host app currently in context (id + display name + Docyrus icon string). Renders a dismissable chip above the input. */
|
|
72
78
|
appContext?: {
|
|
73
79
|
id: string;
|
|
@@ -76,5 +82,10 @@ export interface ChatPanelProps {
|
|
|
76
82
|
} | null;
|
|
77
83
|
/** Called when the user dismisses the app context chip. */
|
|
78
84
|
onClearAppContext?: () => void;
|
|
85
|
+
/** Fired when the agent calls the `forwardToAgentById` tool and the user confirms. */
|
|
86
|
+
onForwardToAgent?: (options: {
|
|
87
|
+
agentId: string;
|
|
88
|
+
prompt?: string;
|
|
89
|
+
}) => void;
|
|
79
90
|
}
|
|
80
|
-
export declare function ChatPanel({ messages, isLoading, input, onInputChange, onSendMessage, onStop, logo, userPhoto, userDisplayName, description, title, welcomeMessage, isLoadingAgent, placeholder, footerText, supportFiles, supportWebSearch, supportDocumentSearch, supportDeepResearch, supportThinking, supportWorkCanvas, supportMultiModels, deploymentId, tenantAiAgentId, enableMicrophone, enableVoice, isRecording, recognition, onMicrophoneClick, onToolAction, openCanvasView, onSendSpreadsheetCommands: _onSendSpreadsheetCommands, onEditPrompt, renderThreadHeader, messagesClassName, compactToolbar, showWelcome, recentSessions, onSessionClick, threadId, initialModelId, initialFeatures, subagents, onManageMemories, appContext, onClearAppContext }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
export declare function ChatPanel({ messages, isLoading, input, onInputChange, onSendMessage, onStop, logo, userPhoto, userDisplayName, description, title, welcomeMessage, isLoadingAgent, placeholder, footerText, supportFiles, supportWebSearch, supportDocumentSearch, supportDeepResearch, supportThinking, supportWorkCanvas, supportMultiModels, deploymentId, tenantAiAgentId, enableMicrophone, enableVoice, isRecording, recognition, onMicrophoneClick, onToolAction, openCanvasView, onSendSpreadsheetCommands: _onSendSpreadsheetCommands, onEditPrompt, renderThreadHeader, messagesClassName, compactToolbar, showWelcome, recentSessions, onSessionClick, threadId, initialModelId, initialFeatures, subagents, agentTools, onManageMemories, appContext, onClearAppContext, onForwardToAgent }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,7 @@ interface MessageListProps {
|
|
|
13
13
|
agentId?: string;
|
|
14
14
|
className?: string;
|
|
15
15
|
agents?: any[];
|
|
16
|
+
agentTools?: any[];
|
|
16
17
|
onToolAction?: (event: ToolActionEvent) => void;
|
|
17
18
|
openCanvasView?: (options: CanvasViewOptions) => void;
|
|
18
19
|
onForwardToAgent?: (options: {
|
|
@@ -29,5 +30,5 @@ interface MessageListProps {
|
|
|
29
30
|
}) => void;
|
|
30
31
|
onEditPrompt?: (messageIndex: number, newText: string) => void;
|
|
31
32
|
}
|
|
32
|
-
export declare const MessageList: import("react").MemoExoticComponent<({ messages, isLoading, logo, userPhoto, userDisplayName, description, title, welcomeMessage, isLoadingAgent, agentId, className, agents, onToolAction, openCanvasView, onForwardToAgent, onUseWorkResult, onEditPrompt }: MessageListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
33
|
+
export declare const MessageList: import("react").MemoExoticComponent<({ messages, isLoading, logo, userPhoto, userDisplayName, description, title, welcomeMessage, isLoadingAgent, agentId, className, agents, agentTools, onToolAction, openCanvasView, onForwardToAgent, onUseWorkResult, onEditPrompt }: MessageListProps) => import("react/jsx-runtime").JSX.Element>;
|
|
33
34
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docyrus/ui-pro-ai-assistant",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"description": "Docyrus AI Assistant component — full-featured chat UI with canvas, projects, and i18n support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ai-sdk/react": "^3.0.161",
|
|
33
|
-
"@tanstack/react-form": "^1.28.4",
|
|
34
33
|
"@ariakit/react": "0.4.21",
|
|
35
34
|
"@codesandbox/sandpack-react": "2.20.0",
|
|
36
35
|
"@emoji-mart/data": "1.2.1",
|
|
@@ -67,6 +66,7 @@
|
|
|
67
66
|
"@platejs/table": "52.0.11",
|
|
68
67
|
"@platejs/toc": "52.0.11",
|
|
69
68
|
"@platejs/toggle": "52.0.11",
|
|
69
|
+
"@tanstack/react-form": "^1.28.4",
|
|
70
70
|
"@univerjs/core": "0.16.1",
|
|
71
71
|
"@univerjs/design": "0.16.1",
|
|
72
72
|
"@univerjs/docs": "0.16.1",
|
|
@@ -107,12 +107,18 @@
|
|
|
107
107
|
"@visactor/vtable-plugins": "1.23.2",
|
|
108
108
|
"ai": "^6.0.158",
|
|
109
109
|
"class-variance-authority": "0.7.1",
|
|
110
|
+
"clsx": "^2.1.1",
|
|
110
111
|
"cmdk": "1.1.1",
|
|
111
112
|
"date-fns": "4.1.0",
|
|
113
|
+
"dompurify": "^3.4.7",
|
|
114
|
+
"handlebars": "^4.7.9",
|
|
115
|
+
"highlight.js": "^11.11.1",
|
|
112
116
|
"html2canvas-pro": "1.6.7",
|
|
113
117
|
"jotai-x": "2.3.3",
|
|
114
118
|
"lowlight": "3.3.0",
|
|
115
119
|
"lucide-react": "0.576.0",
|
|
120
|
+
"marked": "^18.0.4",
|
|
121
|
+
"marked-highlight": "^2.2.4",
|
|
116
122
|
"mermaid": "11.12.3",
|
|
117
123
|
"pdf-lib": "1.17.1",
|
|
118
124
|
"platejs": "^52.3.2",
|
|
@@ -121,12 +127,14 @@
|
|
|
121
127
|
"react-dnd": "16.0.1",
|
|
122
128
|
"react-dnd-html5-backend": "16.0.1",
|
|
123
129
|
"react-lite-youtube-embed": "3.5.1",
|
|
130
|
+
"react-markdown": "10.1.0",
|
|
124
131
|
"react-player": "3.4.0",
|
|
125
132
|
"recharts": "2.15.4",
|
|
126
133
|
"remark-gfm": "4.0.1",
|
|
127
134
|
"remark-math": "6.0.0",
|
|
128
135
|
"scroll-into-view-if-needed": "3.1.0",
|
|
129
136
|
"sonner": "2.0.7",
|
|
137
|
+
"tailwind-merge": "^3.6.0",
|
|
130
138
|
"use-file-picker": "2.1.4",
|
|
131
139
|
"use-stick-to-bottom": "1.1.3",
|
|
132
140
|
"vaul": "1.1.2",
|