@copilotz/chat-ui 0.1.9 → 0.1.11
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/dist/index.cjs +246 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +284 -87
- package/dist/index.js.map +1 -1
- package/dist/styles.css +21 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -117,6 +117,8 @@ interface ChatConfig {
|
|
|
117
117
|
inputHelpText?: string;
|
|
118
118
|
thinking?: string;
|
|
119
119
|
defaultThreadName?: string;
|
|
120
|
+
showMoreMessage?: string;
|
|
121
|
+
showLessMessage?: string;
|
|
120
122
|
};
|
|
121
123
|
features?: {
|
|
122
124
|
enableThreads?: boolean;
|
|
@@ -135,6 +137,11 @@ interface ChatConfig {
|
|
|
135
137
|
showAvatars?: boolean;
|
|
136
138
|
compactMode?: boolean;
|
|
137
139
|
showWordCount?: boolean;
|
|
140
|
+
collapseLongMessages?: boolean;
|
|
141
|
+
collapseLongMessagesForUserOnly?: boolean;
|
|
142
|
+
longMessagePreviewChars?: number;
|
|
143
|
+
longMessageChunkChars?: number;
|
|
144
|
+
renderUserMarkdown?: boolean;
|
|
138
145
|
};
|
|
139
146
|
customComponent?: {
|
|
140
147
|
label?: string;
|
|
@@ -359,6 +366,15 @@ interface MessageProps {
|
|
|
359
366
|
className?: string;
|
|
360
367
|
toolUsedLabel?: string;
|
|
361
368
|
thinkingLabel?: string;
|
|
369
|
+
showMoreLabel?: string;
|
|
370
|
+
showLessLabel?: string;
|
|
371
|
+
collapseLongMessages?: boolean;
|
|
372
|
+
collapseLongMessagesForUserOnly?: boolean;
|
|
373
|
+
longMessagePreviewChars?: number;
|
|
374
|
+
longMessageChunkChars?: number;
|
|
375
|
+
renderUserMarkdown?: boolean;
|
|
376
|
+
isExpanded?: boolean;
|
|
377
|
+
onToggleExpanded?: (messageId: string) => void;
|
|
362
378
|
/** When true, hides the avatar and name (for grouped consecutive messages from same sender) */
|
|
363
379
|
isGrouped?: boolean;
|
|
364
380
|
}
|
|
@@ -565,12 +581,18 @@ declare const configUtils: {
|
|
|
565
581
|
showAvatars?: boolean;
|
|
566
582
|
compactMode?: boolean;
|
|
567
583
|
showWordCount?: boolean;
|
|
584
|
+
collapseLongMessages?: boolean;
|
|
585
|
+
collapseLongMessagesForUserOnly?: boolean;
|
|
586
|
+
longMessagePreviewChars?: number;
|
|
587
|
+
longMessageChunkChars?: number;
|
|
588
|
+
renderUserMarkdown?: boolean;
|
|
568
589
|
};
|
|
569
590
|
};
|
|
570
591
|
};
|
|
571
592
|
|
|
572
593
|
declare function cn(...inputs: ClassValue[]): string;
|
|
573
594
|
declare const formatDate: (timestamp: number, labels?: ChatConfig["labels"]) => string;
|
|
595
|
+
declare const createObjectUrlFromDataUrl: (dataUrl: string) => string | null;
|
|
574
596
|
|
|
575
597
|
declare const chatUtils: {
|
|
576
598
|
generateId: () => string;
|
|
@@ -581,4 +603,4 @@ declare const chatUtils: {
|
|
|
581
603
|
generateThreadTitle: (firstMessage: string) => string;
|
|
582
604
|
};
|
|
583
605
|
|
|
584
|
-
export { type AgentOption, type ChatCallbacks, type ChatConfig, ChatHeader, type ChatHeaderConfig, type ChatHeaderProps, ChatInput, type ChatMessage, type ChatState, type ChatThread, ChatUI, type ChatUserContext, ChatUserContextProvider, type ChatV2Props, type CustomField, type FileUploadProgress, type MediaAttachment, type MemoryItem, Message, type MessageAction, type MessageActionEvent, Sidebar, type SidebarConfig, type SidebarProps, type StateCallback, type StreamingUpdate, ThreadManager, type ToolCall, type UserCustomField, UserMenu, type UserMenuCallbacks, type UserMenuConfig, type UserMenuProps, type UserMenuUser, UserProfile, type UserProfileConfig, type UserProfileProps, type UserProfileUser, chatConfigPresets, chatUtils, cn, configUtils, defaultChatConfig, featureFlags, formatDate, mergeConfig, themeUtils, useChatUserContext, validateConfig };
|
|
606
|
+
export { type AgentOption, type ChatCallbacks, type ChatConfig, ChatHeader, type ChatHeaderConfig, type ChatHeaderProps, ChatInput, type ChatMessage, type ChatState, type ChatThread, ChatUI, type ChatUserContext, ChatUserContextProvider, type ChatV2Props, type CustomField, type FileUploadProgress, type MediaAttachment, type MemoryItem, Message, type MessageAction, type MessageActionEvent, Sidebar, type SidebarConfig, type SidebarProps, type StateCallback, type StreamingUpdate, ThreadManager, type ToolCall, type UserCustomField, UserMenu, type UserMenuCallbacks, type UserMenuConfig, type UserMenuProps, type UserMenuUser, UserProfile, type UserProfileConfig, type UserProfileProps, type UserProfileUser, chatConfigPresets, chatUtils, cn, configUtils, createObjectUrlFromDataUrl, defaultChatConfig, featureFlags, formatDate, mergeConfig, themeUtils, useChatUserContext, validateConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -117,6 +117,8 @@ interface ChatConfig {
|
|
|
117
117
|
inputHelpText?: string;
|
|
118
118
|
thinking?: string;
|
|
119
119
|
defaultThreadName?: string;
|
|
120
|
+
showMoreMessage?: string;
|
|
121
|
+
showLessMessage?: string;
|
|
120
122
|
};
|
|
121
123
|
features?: {
|
|
122
124
|
enableThreads?: boolean;
|
|
@@ -135,6 +137,11 @@ interface ChatConfig {
|
|
|
135
137
|
showAvatars?: boolean;
|
|
136
138
|
compactMode?: boolean;
|
|
137
139
|
showWordCount?: boolean;
|
|
140
|
+
collapseLongMessages?: boolean;
|
|
141
|
+
collapseLongMessagesForUserOnly?: boolean;
|
|
142
|
+
longMessagePreviewChars?: number;
|
|
143
|
+
longMessageChunkChars?: number;
|
|
144
|
+
renderUserMarkdown?: boolean;
|
|
138
145
|
};
|
|
139
146
|
customComponent?: {
|
|
140
147
|
label?: string;
|
|
@@ -359,6 +366,15 @@ interface MessageProps {
|
|
|
359
366
|
className?: string;
|
|
360
367
|
toolUsedLabel?: string;
|
|
361
368
|
thinkingLabel?: string;
|
|
369
|
+
showMoreLabel?: string;
|
|
370
|
+
showLessLabel?: string;
|
|
371
|
+
collapseLongMessages?: boolean;
|
|
372
|
+
collapseLongMessagesForUserOnly?: boolean;
|
|
373
|
+
longMessagePreviewChars?: number;
|
|
374
|
+
longMessageChunkChars?: number;
|
|
375
|
+
renderUserMarkdown?: boolean;
|
|
376
|
+
isExpanded?: boolean;
|
|
377
|
+
onToggleExpanded?: (messageId: string) => void;
|
|
362
378
|
/** When true, hides the avatar and name (for grouped consecutive messages from same sender) */
|
|
363
379
|
isGrouped?: boolean;
|
|
364
380
|
}
|
|
@@ -565,12 +581,18 @@ declare const configUtils: {
|
|
|
565
581
|
showAvatars?: boolean;
|
|
566
582
|
compactMode?: boolean;
|
|
567
583
|
showWordCount?: boolean;
|
|
584
|
+
collapseLongMessages?: boolean;
|
|
585
|
+
collapseLongMessagesForUserOnly?: boolean;
|
|
586
|
+
longMessagePreviewChars?: number;
|
|
587
|
+
longMessageChunkChars?: number;
|
|
588
|
+
renderUserMarkdown?: boolean;
|
|
568
589
|
};
|
|
569
590
|
};
|
|
570
591
|
};
|
|
571
592
|
|
|
572
593
|
declare function cn(...inputs: ClassValue[]): string;
|
|
573
594
|
declare const formatDate: (timestamp: number, labels?: ChatConfig["labels"]) => string;
|
|
595
|
+
declare const createObjectUrlFromDataUrl: (dataUrl: string) => string | null;
|
|
574
596
|
|
|
575
597
|
declare const chatUtils: {
|
|
576
598
|
generateId: () => string;
|
|
@@ -581,4 +603,4 @@ declare const chatUtils: {
|
|
|
581
603
|
generateThreadTitle: (firstMessage: string) => string;
|
|
582
604
|
};
|
|
583
605
|
|
|
584
|
-
export { type AgentOption, type ChatCallbacks, type ChatConfig, ChatHeader, type ChatHeaderConfig, type ChatHeaderProps, ChatInput, type ChatMessage, type ChatState, type ChatThread, ChatUI, type ChatUserContext, ChatUserContextProvider, type ChatV2Props, type CustomField, type FileUploadProgress, type MediaAttachment, type MemoryItem, Message, type MessageAction, type MessageActionEvent, Sidebar, type SidebarConfig, type SidebarProps, type StateCallback, type StreamingUpdate, ThreadManager, type ToolCall, type UserCustomField, UserMenu, type UserMenuCallbacks, type UserMenuConfig, type UserMenuProps, type UserMenuUser, UserProfile, type UserProfileConfig, type UserProfileProps, type UserProfileUser, chatConfigPresets, chatUtils, cn, configUtils, defaultChatConfig, featureFlags, formatDate, mergeConfig, themeUtils, useChatUserContext, validateConfig };
|
|
606
|
+
export { type AgentOption, type ChatCallbacks, type ChatConfig, ChatHeader, type ChatHeaderConfig, type ChatHeaderProps, ChatInput, type ChatMessage, type ChatState, type ChatThread, ChatUI, type ChatUserContext, ChatUserContextProvider, type ChatV2Props, type CustomField, type FileUploadProgress, type MediaAttachment, type MemoryItem, Message, type MessageAction, type MessageActionEvent, Sidebar, type SidebarConfig, type SidebarProps, type StateCallback, type StreamingUpdate, ThreadManager, type ToolCall, type UserCustomField, UserMenu, type UserMenuCallbacks, type UserMenuConfig, type UserMenuProps, type UserMenuUser, UserProfile, type UserProfileConfig, type UserProfileProps, type UserProfileUser, chatConfigPresets, chatUtils, cn, configUtils, createObjectUrlFromDataUrl, defaultChatConfig, featureFlags, formatDate, mergeConfig, themeUtils, useChatUserContext, validateConfig };
|