@yushaw/sanqian-chat 0.2.41 → 0.2.42

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.
@@ -1350,6 +1350,8 @@ interface CompactChatHistoryConfig {
1350
1350
  /** Label shown on highlighted rows. */
1351
1351
  highlightedLabel?: string | ((conversation: ConversationInfo) => string | null | undefined);
1352
1352
  }
1353
+ type LegacyNewConversationRef = React.MutableRefObject<(() => void) | null>;
1354
+ type ExtendedNewConversationRef = React.MutableRefObject<((options?: ConversationSwitchOptions) => void) | null>;
1353
1355
  interface CompactChatProps {
1354
1356
  /** Chat adapter for backend communication */
1355
1357
  adapter: ChatAdapter;
@@ -1384,7 +1386,7 @@ interface CompactChatProps {
1384
1386
  /** Ref to expose sendMessage function for external input */
1385
1387
  sendMessageRef?: React.MutableRefObject<((message: string) => void) | null>;
1386
1388
  /** Ref to expose newConversation function */
1387
- newConversationRef?: React.MutableRefObject<((options?: ConversationSwitchOptions) => void) | null>;
1389
+ newConversationRef?: LegacyNewConversationRef | ExtendedNewConversationRef;
1388
1390
  /** Ref to expose loadConversation function */
1389
1391
  loadConversationRef?: React.MutableRefObject<((id: string, options?: ConversationSwitchOptions) => Promise<void>) | null>;
1390
1392
  /** Ref to expose stopStreaming function */
@@ -1350,6 +1350,8 @@ interface CompactChatHistoryConfig {
1350
1350
  /** Label shown on highlighted rows. */
1351
1351
  highlightedLabel?: string | ((conversation: ConversationInfo) => string | null | undefined);
1352
1352
  }
1353
+ type LegacyNewConversationRef = React.MutableRefObject<(() => void) | null>;
1354
+ type ExtendedNewConversationRef = React.MutableRefObject<((options?: ConversationSwitchOptions) => void) | null>;
1353
1355
  interface CompactChatProps {
1354
1356
  /** Chat adapter for backend communication */
1355
1357
  adapter: ChatAdapter;
@@ -1384,7 +1386,7 @@ interface CompactChatProps {
1384
1386
  /** Ref to expose sendMessage function for external input */
1385
1387
  sendMessageRef?: React.MutableRefObject<((message: string) => void) | null>;
1386
1388
  /** Ref to expose newConversation function */
1387
- newConversationRef?: React.MutableRefObject<((options?: ConversationSwitchOptions) => void) | null>;
1389
+ newConversationRef?: LegacyNewConversationRef | ExtendedNewConversationRef;
1388
1390
  /** Ref to expose loadConversation function */
1389
1391
  loadConversationRef?: React.MutableRefObject<((id: string, options?: ConversationSwitchOptions) => Promise<void>) | null>;
1390
1392
  /** Ref to expose stopStreaming function */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yushaw/sanqian-chat",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "Floating chat window SDK for Sanqian AI Assistant",
5
5
  "main": "./dist/main/index.js",
6
6
  "types": "./dist/main/index.d.ts",