@docyrus/ui-pro-ai-assistant 0.4.6 → 0.4.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 +5 -1
- package/dist/components/sharing-editor.d.ts +8 -0
- package/dist/docy-assistant.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-deployment-data.d.ts +2 -0
- package/dist/hooks/use-sharing.d.ts +21 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +27249 -26451
- package/dist/index.js.map +1 -1
- package/dist/lib/api-client.d.ts +1 -0
- package/dist/lib/assistant-api-actions.d.ts +10 -1
- package/dist/styles.css +45 -0
- package/dist/types/index.d.ts +60 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -238,11 +238,14 @@ The main chat interface component.
|
|
|
238
238
|
| `supportFiles` | `boolean` | `true` | File uploads |
|
|
239
239
|
| `supportDocumentSearch` | `boolean` | `true` | Document search |
|
|
240
240
|
| `supportDeepResearch` | `boolean` | `true` | Deep research mode |
|
|
241
|
-
| `supportMultiModels` | `boolean` | `true` | Model selector |
|
|
241
|
+
| `supportMultiModels` | `boolean` | `true` | Model selector (also read from agent config `supportMultipleModels`) |
|
|
242
242
|
| `supportWorkCanvas` | `boolean` | `true` | Work canvas panel |
|
|
243
243
|
| `supportedFileFormats` | `string[]` | — | Allowed upload MIME types / extensions |
|
|
244
244
|
| `enableVoice` | `boolean` | `false` | Voice input mode |
|
|
245
245
|
| `enableMicrophone` | `boolean` | `true` | Microphone button |
|
|
246
|
+
| `enableSharing` | `boolean` | `false` | Show share button on thread headers |
|
|
247
|
+
|
|
248
|
+
> **Note:** Feature props serve as defaults. When the agent deployment is loaded, the API response capabilities (`supportWebSearch`, `documentSearch`, `supportDeepResearch`, `supportThinking`, `featureWorks`, `supportFiles`, `supportMultipleModels`, `promptOptimizationChoice`) take precedence over prop values.
|
|
246
249
|
|
|
247
250
|
#### Agent selection
|
|
248
251
|
|
|
@@ -265,6 +268,7 @@ The main chat interface component.
|
|
|
265
268
|
| `onMessageSend` | `(message: string) => void` | Fires when a message is sent |
|
|
266
269
|
| `onVoiceStart` | `() => void` | Fires when voice recording starts |
|
|
267
270
|
| `onVoiceEnd` | `() => void` | Fires when voice recording ends |
|
|
271
|
+
| `onShare` | `(info: { dataSourceId: string; recordId: string }) => void` | Custom share handler. When provided, the thread header share button calls this instead of the built-in sharing editor |
|
|
268
272
|
|
|
269
273
|
#### Initial prompt
|
|
270
274
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface SharingEditorProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onOpenChange: (open: boolean) => void;
|
|
4
|
+
dataSourceId: string;
|
|
5
|
+
recordId: string;
|
|
6
|
+
isFullscreen?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function SharingEditor({ open, onOpenChange, dataSourceId, recordId, isFullscreen }: SharingEditorProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/docy-assistant.d.ts
CHANGED
|
@@ -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, initialPrompt, initialModelId, initialFeatures, initialFiles, ...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, ...props }: DocyAssistantProps & {
|
|
4
4
|
ref?: RefObject<HTMLDivElement | null>;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { useSpeechRecognition } from './use-speech-recognition';
|
|
|
7
7
|
export { createInitialUIState, type UIState, useUIState } from './use-ui-state';
|
|
8
8
|
export { useWorksState, type WorksState } from './use-works-state';
|
|
9
9
|
export { useResolvedRecordFields, clearRecordFieldsCache, type ResolvedDataSource, type UseResolvedRecordFieldsResult } from './use-resolved-record-fields';
|
|
10
|
+
export { useSharing, type UseSharingOptions, type UseSharingReturn } from './use-sharing';
|
|
@@ -7,6 +7,7 @@ export interface AgentCapabilities {
|
|
|
7
7
|
supportThinking: boolean;
|
|
8
8
|
supportWorkCanvas: boolean;
|
|
9
9
|
supportFiles: boolean;
|
|
10
|
+
supportMultiModels: boolean;
|
|
10
11
|
}
|
|
11
12
|
export interface UseDeploymentDataResult {
|
|
12
13
|
models: Model[];
|
|
@@ -22,6 +23,7 @@ export interface UseDeploymentDataResult {
|
|
|
22
23
|
activeMcpServers: Record<string, boolean>;
|
|
23
24
|
toggleMcpServer: (id: string, active: boolean) => void;
|
|
24
25
|
capabilities: AgentCapabilities | null;
|
|
26
|
+
promptOptimizationChoice: string | null;
|
|
25
27
|
isLoading: boolean;
|
|
26
28
|
error: Error | null;
|
|
27
29
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Principal, type PrincipalType, type ShareItem } from '../types';
|
|
2
|
+
export interface UseSharingOptions {
|
|
3
|
+
dataSourceId: string;
|
|
4
|
+
recordId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UseSharingReturn {
|
|
7
|
+
shares: ShareItem[];
|
|
8
|
+
principals: Principal[];
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
isPrincipalsLoading: boolean;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
loadShares: () => Promise<void>;
|
|
13
|
+
loadPrincipals: () => Promise<void>;
|
|
14
|
+
addShares: (items: {
|
|
15
|
+
principalType: PrincipalType;
|
|
16
|
+
principalId: string | null;
|
|
17
|
+
}[]) => Promise<boolean>;
|
|
18
|
+
updatePermission: (share: ShareItem, permissions: number) => Promise<boolean>;
|
|
19
|
+
removeShare: (share: ShareItem) => Promise<boolean>;
|
|
20
|
+
}
|
|
21
|
+
export declare function useSharing({ dataSourceId, recordId }: UseSharingOptions): UseSharingReturn;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export { type AssistantConfig, AssistantProvider, type AssistantUser, type DataS
|
|
|
3
3
|
export { AssistantI18nProvider, useAssistantTranslation } from './i18n';
|
|
4
4
|
export { AgentTriggerWidget, type AgentTriggerWidgetProps } from './components/agent-trigger-widget';
|
|
5
5
|
export { type PromptFeatureFlags } from './components/agent-trigger-widget/agent-trigger-prompt';
|
|
6
|
-
export type { InitialFeatureFlags, Project, Work, WorkTypes } from './types';
|
|
6
|
+
export type { InitialFeatureFlags, Principal, PrincipalType, Project, ShareItem, Work, WorkTypes } from './types';
|
|
7
|
+
export { BASE_DATA_SOURCE_ID, SHARE_PERMISSIONS, SHARE_PERMISSION_LEVELS } from './types';
|