@docyrus/ui-pro-ai-assistant 0.6.8 → 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/agent-tabs.d.ts +33 -0
- package/dist/docy-assistant.d.ts +1 -1
- package/dist/hooks/use-assistant-api.d.ts +7 -0
- package/dist/index.js +1104 -1026
- package/dist/index.js.map +1 -1
- package/dist/styles.css +17 -34
- package/dist/types/index.d.ts +5 -6
- package/dist/views/assistant-view.d.ts +11 -5
- package/dist/views/chat-panel.d.ts +6 -1
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -85,7 +85,6 @@
|
|
|
85
85
|
--color-indigo-900: oklch(35.9% 0.144 278.697);
|
|
86
86
|
--color-indigo-950: oklch(25.7% 0.09 281.288);
|
|
87
87
|
--color-violet-100: oklch(94.3% 0.029 294.588);
|
|
88
|
-
--color-violet-200: oklch(89.4% 0.057 293.283);
|
|
89
88
|
--color-violet-300: oklch(81.1% 0.111 293.571);
|
|
90
89
|
--color-violet-600: oklch(54.1% 0.281 293.009);
|
|
91
90
|
--color-violet-700: oklch(49.1% 0.27 292.581);
|
|
@@ -1470,9 +1469,6 @@
|
|
|
1470
1469
|
.w-36 {
|
|
1471
1470
|
width: calc(var(--spacing) * 36);
|
|
1472
1471
|
}
|
|
1473
|
-
.w-40 {
|
|
1474
|
-
width: calc(var(--spacing) * 40);
|
|
1475
|
-
}
|
|
1476
1472
|
.w-44 {
|
|
1477
1473
|
width: calc(var(--spacing) * 44);
|
|
1478
1474
|
}
|
|
@@ -1650,9 +1646,6 @@
|
|
|
1650
1646
|
.max-w-\[200px\] {
|
|
1651
1647
|
max-width: 200px;
|
|
1652
1648
|
}
|
|
1653
|
-
.max-w-\[260px\] {
|
|
1654
|
-
max-width: 260px;
|
|
1655
|
-
}
|
|
1656
1649
|
.max-w-\[300px\] {
|
|
1657
1650
|
max-width: 300px;
|
|
1658
1651
|
}
|
|
@@ -3107,18 +3100,6 @@
|
|
|
3107
3100
|
--tw-gradient-from: var(--color-sky-100);
|
|
3108
3101
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
3109
3102
|
}
|
|
3110
|
-
.from-transparent {
|
|
3111
|
-
--tw-gradient-from: transparent;
|
|
3112
|
-
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
3113
|
-
}
|
|
3114
|
-
.via-violet-200\/60 {
|
|
3115
|
-
--tw-gradient-via: color-mix(in srgb, oklch(89.4% 0.057 293.283) 60%, transparent);
|
|
3116
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3117
|
-
--tw-gradient-via: color-mix(in oklab, var(--color-violet-200) 60%, transparent);
|
|
3118
|
-
}
|
|
3119
|
-
--tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
|
|
3120
|
-
--tw-gradient-stops: var(--tw-gradient-via-stops);
|
|
3121
|
-
}
|
|
3122
3103
|
.to-indigo-100 {
|
|
3123
3104
|
--tw-gradient-to: var(--color-indigo-100);
|
|
3124
3105
|
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
@@ -3517,9 +3498,6 @@
|
|
|
3517
3498
|
.pl-10 {
|
|
3518
3499
|
padding-left: calc(var(--spacing) * 10);
|
|
3519
3500
|
}
|
|
3520
|
-
.pl-12 {
|
|
3521
|
-
padding-left: calc(var(--spacing) * 12);
|
|
3522
|
-
}
|
|
3523
3501
|
.pl-\[5px\] {
|
|
3524
3502
|
padding-left: 5px;
|
|
3525
3503
|
}
|
|
@@ -4368,10 +4346,6 @@
|
|
|
4368
4346
|
--tw-duration: 500ms;
|
|
4369
4347
|
transition-duration: 500ms;
|
|
4370
4348
|
}
|
|
4371
|
-
.duration-700 {
|
|
4372
|
-
--tw-duration: 700ms;
|
|
4373
|
-
transition-duration: 700ms;
|
|
4374
|
-
}
|
|
4375
4349
|
.duration-1000 {
|
|
4376
4350
|
--tw-duration: 1000ms;
|
|
4377
4351
|
transition-duration: 1000ms;
|
|
@@ -4548,14 +4522,6 @@
|
|
|
4548
4522
|
}
|
|
4549
4523
|
}
|
|
4550
4524
|
}
|
|
4551
|
-
.group-hover\:translate-x-full {
|
|
4552
|
-
&:is(:where(.group):hover *) {
|
|
4553
|
-
@media (hover: hover) {
|
|
4554
|
-
--tw-translate-x: 100%;
|
|
4555
|
-
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
4556
|
-
}
|
|
4557
|
-
}
|
|
4558
|
-
}
|
|
4559
4525
|
.group-hover\:translate-y-0 {
|
|
4560
4526
|
&:is(:where(.group):hover *) {
|
|
4561
4527
|
@media (hover: hover) {
|
|
@@ -4631,6 +4597,13 @@
|
|
|
4631
4597
|
}
|
|
4632
4598
|
}
|
|
4633
4599
|
}
|
|
4600
|
+
.group-hover\/tab\:opacity-100 {
|
|
4601
|
+
&:is(:where(.group\/tab):hover *) {
|
|
4602
|
+
@media (hover: hover) {
|
|
4603
|
+
opacity: 100%;
|
|
4604
|
+
}
|
|
4605
|
+
}
|
|
4606
|
+
}
|
|
4634
4607
|
.group-hover\/title\:opacity-100 {
|
|
4635
4608
|
&:is(:where(.group\/title):hover *) {
|
|
4636
4609
|
@media (hover: hover) {
|
|
@@ -6432,6 +6405,16 @@
|
|
|
6432
6405
|
}
|
|
6433
6406
|
}
|
|
6434
6407
|
}
|
|
6408
|
+
.hover\:bg-background\/50 {
|
|
6409
|
+
&:hover {
|
|
6410
|
+
@media (hover: hover) {
|
|
6411
|
+
background-color: var(--background);
|
|
6412
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
6413
|
+
background-color: color-mix(in oklab, var(--background) 50%, transparent);
|
|
6414
|
+
}
|
|
6415
|
+
}
|
|
6416
|
+
}
|
|
6417
|
+
}
|
|
6435
6418
|
.hover\:bg-destructive\/10 {
|
|
6436
6419
|
&:hover {
|
|
6437
6420
|
@media (hover: hover) {
|
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[];
|
|
@@ -72,21 +76,23 @@ export interface InlineModeProps extends AssistantViewCommonProps {
|
|
|
72
76
|
onTabChange?: (tab: number) => void;
|
|
73
77
|
onExpand?: () => void;
|
|
74
78
|
onNewChat?: () => void;
|
|
75
|
-
enableNavDropdown?: boolean;
|
|
76
79
|
isFullscreen?: boolean;
|
|
77
80
|
renderSessionsView?: () => ReactNode;
|
|
78
81
|
renderProjectsView?: () => ReactNode;
|
|
79
82
|
renderWorksView?: () => ReactNode;
|
|
80
83
|
renderMemoriesView?: () => ReactNode;
|
|
81
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;
|
|
82
92
|
hideCloseButton?: boolean;
|
|
83
|
-
hideAgentSelector?: boolean;
|
|
84
93
|
hideBorder?: boolean;
|
|
85
94
|
showHeader?: boolean;
|
|
86
95
|
hideHeaderOnWelcome?: boolean;
|
|
87
|
-
agentSelectorUrl?: string;
|
|
88
|
-
baseAgentSelectorUrl?: string;
|
|
89
|
-
onAgentChange?: (agentId: string, agentType: 'base' | 'deployment') => void;
|
|
90
96
|
t: (key: string) => string;
|
|
91
97
|
}
|
|
92
98
|
export interface ConversationModeProps extends AssistantViewCommonProps {
|
|
@@ -82,5 +82,10 @@ export interface ChatPanelProps {
|
|
|
82
82
|
} | null;
|
|
83
83
|
/** Called when the user dismisses the app context chip. */
|
|
84
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;
|
|
85
90
|
}
|
|
86
|
-
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 }: 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;
|
package/package.json
CHANGED