@copilotz/chat-ui 0.8.5 → 0.9.0

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.d.cts CHANGED
@@ -125,6 +125,11 @@ interface ChatMessage {
125
125
  /** Canonical frontend sender identity. Prefer this over legacy sender fields. */
126
126
  sender?: ChatSender;
127
127
  }
128
+ interface ChatThreadTag {
129
+ id: string;
130
+ name: string;
131
+ color?: string;
132
+ }
128
133
  interface ChatThread {
129
134
  id: string;
130
135
  title: string;
@@ -132,6 +137,7 @@ interface ChatThread {
132
137
  updatedAt: number;
133
138
  messageCount: number;
134
139
  isArchived?: boolean;
140
+ tags?: ChatThreadTag[];
135
141
  metadata?: Record<string, any>;
136
142
  }
137
143
  interface ChatMarkdownConfig {
@@ -209,6 +215,15 @@ interface ChatConfig {
209
215
  renameThread?: string;
210
216
  archiveThread?: string;
211
217
  unarchiveThread?: string;
218
+ manageTags?: string;
219
+ tags?: string;
220
+ addTag?: string;
221
+ removeTag?: string;
222
+ tagNamePlaceholder?: string;
223
+ untagged?: string;
224
+ groupBy?: string;
225
+ groupByDate?: string;
226
+ groupByTag?: string;
212
227
  today?: string;
213
228
  yesterday?: string;
214
229
  createNewThread?: string;
@@ -242,6 +257,13 @@ interface ChatConfig {
242
257
  enableRegeneration?: boolean;
243
258
  showActivity?: boolean;
244
259
  showActivityDetails?: boolean;
260
+ threadTags?: {
261
+ enabled?: boolean;
262
+ groupingEnabled?: boolean;
263
+ defaultGroupBy?: "date" | "tag";
264
+ allowCreate?: boolean;
265
+ allowDrag?: boolean;
266
+ };
245
267
  maxAttachments?: number;
246
268
  maxFileSize?: number;
247
269
  acceptedFileTypes?: string[];
@@ -282,6 +304,16 @@ interface ChatConfig {
282
304
  };
283
305
  /** Additional actions to render in the header */
284
306
  headerActions?: ReactNode;
307
+ /** Additional items to render in the header ellipsis menu */
308
+ headerMenuItems?: ChatHeaderMenuItem[];
309
+ }
310
+ interface ChatHeaderMenuItem {
311
+ id: string;
312
+ label: string;
313
+ icon?: ReactNode;
314
+ onSelect?: () => void;
315
+ variant?: "default" | "destructive";
316
+ disabled?: boolean;
285
317
  }
286
318
  interface ChatUserMenuItem {
287
319
  id: string;
@@ -312,6 +344,7 @@ interface ChatCallbacks {
312
344
  onRenameThread?: (threadId: string, newTitle: string, callback?: StateCallback<ChatState>) => void;
313
345
  onDeleteThread?: (threadId: string, callback?: StateCallback<ChatState>) => void;
314
346
  onArchiveThread?: (threadId: string, callback?: StateCallback<ChatState>) => void;
347
+ onUpdateThreadTags?: (threadId: string, tags: ChatThreadTag[], callback?: StateCallback<ChatState>) => void;
315
348
  onCopyMessage?: (messageId: string, content: string, callback?: StateCallback<ChatState>) => void;
316
349
  onAttachmentRemove?: (attachmentIndex: number, callback?: StateCallback<ChatState>) => void;
317
350
  onViewProfile?: () => void;
@@ -481,4 +514,4 @@ declare function mergeConfig(_baseConfig: ChatConfig, userConfig?: Partial<ChatC
481
514
  declare const getAttachmentKindFromMimeType: (mimeType?: string | null) => MediaAttachmentKind;
482
515
  declare const getMimeTypeFromDataUrl: (dataUrl: string) => string | null;
483
516
 
484
- export { type AgentOption, AssistantActivity, type AssistantActivityBlock, type AssistantActivityItem, type AssistantActivityKind, type AssistantActivityStatus, type AudioAttachment, type ChatCallbacks, type ChatConfig, type ChatMarkdownConfig, type ChatMessage, type ChatSender, type ChatState, type ChatThread, ChatUI, type ChatUserContext, ChatUserContextProvider, type ChatUserMenuItem, type ChatUserMenuSection, type ChatV2Props, type CreateVoiceProvider, type FileUploadProgress, type MediaAttachment, type MediaAttachmentKind, type MemoryItem, type MessageAction, type MessageActionEvent, MessageSenderAvatar, type StateCallback, type StreamingUpdate, type ToolCall, type UserCustomField, type VoiceComposerState, type VoiceProvider, type VoiceProviderHandlers, type VoiceProviderOptions, type VoiceReviewMode, type VoiceSegment, type VoiceTranscript, type VoiceTranscriptMode, defaultChatConfig, getAttachmentKindFromMimeType, getMimeTypeFromDataUrl, mergeConfig, resolveMessageSenderDisplay, useChatUserContext };
517
+ export { type AgentOption, AssistantActivity, type AssistantActivityBlock, type AssistantActivityItem, type AssistantActivityKind, type AssistantActivityStatus, type AudioAttachment, type ChatCallbacks, type ChatConfig, type ChatHeaderMenuItem, type ChatMarkdownConfig, type ChatMessage, type ChatSender, type ChatState, type ChatThread, type ChatThreadTag, ChatUI, type ChatUserContext, ChatUserContextProvider, type ChatUserMenuItem, type ChatUserMenuSection, type ChatV2Props, type CreateVoiceProvider, type FileUploadProgress, type MediaAttachment, type MediaAttachmentKind, type MemoryItem, type MessageAction, type MessageActionEvent, MessageSenderAvatar, type StateCallback, type StreamingUpdate, type ToolCall, type UserCustomField, type VoiceComposerState, type VoiceProvider, type VoiceProviderHandlers, type VoiceProviderOptions, type VoiceReviewMode, type VoiceSegment, type VoiceTranscript, type VoiceTranscriptMode, defaultChatConfig, getAttachmentKindFromMimeType, getMimeTypeFromDataUrl, mergeConfig, resolveMessageSenderDisplay, useChatUserContext };
package/dist/index.d.ts CHANGED
@@ -125,6 +125,11 @@ interface ChatMessage {
125
125
  /** Canonical frontend sender identity. Prefer this over legacy sender fields. */
126
126
  sender?: ChatSender;
127
127
  }
128
+ interface ChatThreadTag {
129
+ id: string;
130
+ name: string;
131
+ color?: string;
132
+ }
128
133
  interface ChatThread {
129
134
  id: string;
130
135
  title: string;
@@ -132,6 +137,7 @@ interface ChatThread {
132
137
  updatedAt: number;
133
138
  messageCount: number;
134
139
  isArchived?: boolean;
140
+ tags?: ChatThreadTag[];
135
141
  metadata?: Record<string, any>;
136
142
  }
137
143
  interface ChatMarkdownConfig {
@@ -209,6 +215,15 @@ interface ChatConfig {
209
215
  renameThread?: string;
210
216
  archiveThread?: string;
211
217
  unarchiveThread?: string;
218
+ manageTags?: string;
219
+ tags?: string;
220
+ addTag?: string;
221
+ removeTag?: string;
222
+ tagNamePlaceholder?: string;
223
+ untagged?: string;
224
+ groupBy?: string;
225
+ groupByDate?: string;
226
+ groupByTag?: string;
212
227
  today?: string;
213
228
  yesterday?: string;
214
229
  createNewThread?: string;
@@ -242,6 +257,13 @@ interface ChatConfig {
242
257
  enableRegeneration?: boolean;
243
258
  showActivity?: boolean;
244
259
  showActivityDetails?: boolean;
260
+ threadTags?: {
261
+ enabled?: boolean;
262
+ groupingEnabled?: boolean;
263
+ defaultGroupBy?: "date" | "tag";
264
+ allowCreate?: boolean;
265
+ allowDrag?: boolean;
266
+ };
245
267
  maxAttachments?: number;
246
268
  maxFileSize?: number;
247
269
  acceptedFileTypes?: string[];
@@ -282,6 +304,16 @@ interface ChatConfig {
282
304
  };
283
305
  /** Additional actions to render in the header */
284
306
  headerActions?: ReactNode;
307
+ /** Additional items to render in the header ellipsis menu */
308
+ headerMenuItems?: ChatHeaderMenuItem[];
309
+ }
310
+ interface ChatHeaderMenuItem {
311
+ id: string;
312
+ label: string;
313
+ icon?: ReactNode;
314
+ onSelect?: () => void;
315
+ variant?: "default" | "destructive";
316
+ disabled?: boolean;
285
317
  }
286
318
  interface ChatUserMenuItem {
287
319
  id: string;
@@ -312,6 +344,7 @@ interface ChatCallbacks {
312
344
  onRenameThread?: (threadId: string, newTitle: string, callback?: StateCallback<ChatState>) => void;
313
345
  onDeleteThread?: (threadId: string, callback?: StateCallback<ChatState>) => void;
314
346
  onArchiveThread?: (threadId: string, callback?: StateCallback<ChatState>) => void;
347
+ onUpdateThreadTags?: (threadId: string, tags: ChatThreadTag[], callback?: StateCallback<ChatState>) => void;
315
348
  onCopyMessage?: (messageId: string, content: string, callback?: StateCallback<ChatState>) => void;
316
349
  onAttachmentRemove?: (attachmentIndex: number, callback?: StateCallback<ChatState>) => void;
317
350
  onViewProfile?: () => void;
@@ -481,4 +514,4 @@ declare function mergeConfig(_baseConfig: ChatConfig, userConfig?: Partial<ChatC
481
514
  declare const getAttachmentKindFromMimeType: (mimeType?: string | null) => MediaAttachmentKind;
482
515
  declare const getMimeTypeFromDataUrl: (dataUrl: string) => string | null;
483
516
 
484
- export { type AgentOption, AssistantActivity, type AssistantActivityBlock, type AssistantActivityItem, type AssistantActivityKind, type AssistantActivityStatus, type AudioAttachment, type ChatCallbacks, type ChatConfig, type ChatMarkdownConfig, type ChatMessage, type ChatSender, type ChatState, type ChatThread, ChatUI, type ChatUserContext, ChatUserContextProvider, type ChatUserMenuItem, type ChatUserMenuSection, type ChatV2Props, type CreateVoiceProvider, type FileUploadProgress, type MediaAttachment, type MediaAttachmentKind, type MemoryItem, type MessageAction, type MessageActionEvent, MessageSenderAvatar, type StateCallback, type StreamingUpdate, type ToolCall, type UserCustomField, type VoiceComposerState, type VoiceProvider, type VoiceProviderHandlers, type VoiceProviderOptions, type VoiceReviewMode, type VoiceSegment, type VoiceTranscript, type VoiceTranscriptMode, defaultChatConfig, getAttachmentKindFromMimeType, getMimeTypeFromDataUrl, mergeConfig, resolveMessageSenderDisplay, useChatUserContext };
517
+ export { type AgentOption, AssistantActivity, type AssistantActivityBlock, type AssistantActivityItem, type AssistantActivityKind, type AssistantActivityStatus, type AudioAttachment, type ChatCallbacks, type ChatConfig, type ChatHeaderMenuItem, type ChatMarkdownConfig, type ChatMessage, type ChatSender, type ChatState, type ChatThread, type ChatThreadTag, ChatUI, type ChatUserContext, ChatUserContextProvider, type ChatUserMenuItem, type ChatUserMenuSection, type ChatV2Props, type CreateVoiceProvider, type FileUploadProgress, type MediaAttachment, type MediaAttachmentKind, type MemoryItem, type MessageAction, type MessageActionEvent, MessageSenderAvatar, type StateCallback, type StreamingUpdate, type ToolCall, type UserCustomField, type VoiceComposerState, type VoiceProvider, type VoiceProviderHandlers, type VoiceProviderOptions, type VoiceReviewMode, type VoiceSegment, type VoiceTranscript, type VoiceTranscriptMode, defaultChatConfig, getAttachmentKindFromMimeType, getMimeTypeFromDataUrl, mergeConfig, resolveMessageSenderDisplay, useChatUserContext };