@gendive/chatllm 0.8.1 → 0.10.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.
@@ -65,6 +65,16 @@ interface MarkdownRendererProps {
65
65
  className?: string;
66
66
  /** 선택지 클릭 핸들러 */
67
67
  onChoiceClick?: (choice: ChoiceOption) => void;
68
+ /**
69
+ * @description Thinking 블록 표시 여부
70
+ * @Todo vibecode - AI 추론 과정 표시 (기본: true)
71
+ */
72
+ showThinking?: boolean;
73
+ /**
74
+ * @description Thinking 블록 기본 펼침 상태
75
+ * @Todo vibecode - true면 펼쳐진 상태로 표시 (기본: false)
76
+ */
77
+ thinkingDefaultOpen?: boolean;
68
78
  }
69
79
  declare const MarkdownRenderer: React$1.FC<MarkdownRendererProps>;
70
80
 
@@ -265,6 +275,65 @@ interface ChatUIProps {
265
275
  enableAutoExtraction?: boolean;
266
276
  /** 정보 추출 설정 */
267
277
  infoExtractionConfig?: Partial<InfoExtractionConfig>;
278
+ /**
279
+ * @description 외부 스토리지 사용 여부
280
+ * @Todo vibecode - true 시 localStorage 대신 콜백 사용
281
+ */
282
+ useExternalStorage?: boolean;
283
+ /**
284
+ * @description 세션 목록 로드 콜백
285
+ * @Todo vibecode - 컴포넌트 마운트 시 호출
286
+ */
287
+ onLoadSessions?: () => Promise<{
288
+ id: string;
289
+ title: string;
290
+ }[]>;
291
+ /**
292
+ * @description 세션 생성 콜백
293
+ * @Todo vibecode - 새 채팅 생성 시 호출
294
+ */
295
+ onCreateSession?: () => Promise<{
296
+ id: string;
297
+ title: string;
298
+ }>;
299
+ /**
300
+ * @description 세션 상세 로드 콜백 (메시지 포함)
301
+ * @Todo vibecode - 세션 선택 시 호출 (lazy loading)
302
+ */
303
+ onLoadSession?: (sessionId: string) => Promise<{
304
+ id: string;
305
+ title: string;
306
+ messages: ChatMessage[];
307
+ memory_data?: object;
308
+ }>;
309
+ /**
310
+ * @description 세션 삭제 콜백
311
+ * @Todo vibecode - 세션 삭제 시 호출
312
+ */
313
+ onDeleteSession?: (sessionId: string) => Promise<void>;
314
+ /**
315
+ * @description 세션 제목 수정 콜백
316
+ * @Todo vibecode - 세션 제목 변경 시 호출
317
+ */
318
+ onUpdateSessionTitle?: (sessionId: string, title: string) => Promise<void>;
319
+ /**
320
+ * @description 메시지 저장 콜백
321
+ * @Todo vibecode - 메시지 전송 완료 후 호출
322
+ */
323
+ onSaveMessages?: (sessionId: string, messages: {
324
+ role: 'USER' | 'ASSISTANT';
325
+ message: string;
326
+ }[]) => Promise<void>;
327
+ /**
328
+ * @description Thinking 블록 표시 여부
329
+ * @Todo vibecode - AI 추론 과정 표시 (기본: true)
330
+ */
331
+ showThinking?: boolean;
332
+ /**
333
+ * @description Thinking 블록 기본 펼침 상태
334
+ * @Todo vibecode - true면 펼쳐진 상태로 표시 (기본: false)
335
+ */
336
+ thinkingDefaultOpen?: boolean;
268
337
  }
269
338
  interface SendMessageParams {
270
339
  messages: {
@@ -327,6 +396,16 @@ interface MessageListProps {
327
396
  editingId: string | null;
328
397
  /** 선택지 클릭 핸들러 */
329
398
  onChoiceClick?: (choice: ChoiceOption) => void;
399
+ /**
400
+ * @description Thinking 블록 표시 여부
401
+ * @Todo vibecode - AI 추론 과정 표시 (기본: true)
402
+ */
403
+ showThinking?: boolean;
404
+ /**
405
+ * @description Thinking 블록 기본 펼침 상태
406
+ * @Todo vibecode - true면 펼쳐진 상태로 표시 (기본: false)
407
+ */
408
+ thinkingDefaultOpen?: boolean;
330
409
  }
331
410
  interface MessageBubbleProps {
332
411
  message: ChatMessage;
@@ -344,6 +423,16 @@ interface MessageBubbleProps {
344
423
  models?: ModelConfig[];
345
424
  alternatives?: AlternativeResponse[];
346
425
  onChoiceClick?: (choice: ChoiceOption) => void;
426
+ /**
427
+ * @description Thinking 블록 표시 여부
428
+ * @Todo vibecode - AI 추론 과정 표시 (기본: true)
429
+ */
430
+ showThinking?: boolean;
431
+ /**
432
+ * @description Thinking 블록 기본 펼침 상태
433
+ * @Todo vibecode - true면 펼쳐진 상태로 표시 (기본: false)
434
+ */
435
+ thinkingDefaultOpen?: boolean;
347
436
  }
348
437
  interface InputProps {
349
438
  value: string;
@@ -437,6 +526,16 @@ interface UseChatUIReturn {
437
526
  compressionState: CompressionState | null;
438
527
  /** 수동으로 정보 추출 트리거 */
439
528
  extractUserInfo: () => Promise<void>;
529
+ /**
530
+ * @description 세션 목록 로딩 상태
531
+ * @Todo vibecode - 외부 스토리지 사용 시 세션 목록 로드 중
532
+ */
533
+ isSessionsLoading: boolean;
534
+ /**
535
+ * @description 단일 세션 로딩 상태
536
+ * @Todo vibecode - 외부 스토리지 사용 시 세션 상세 로드 중
537
+ */
538
+ isSessionLoading: boolean;
440
539
  }
441
540
 
442
541
  /**
@@ -489,6 +588,55 @@ interface UseChatUIOptions {
489
588
  globalMemoryConfig?: GlobalMemoryConfig;
490
589
  /** 자동 정보 추출 활성화 (기본: true) */
491
590
  enableAutoExtraction?: boolean;
591
+ /**
592
+ * @description 외부 스토리지 사용 여부
593
+ * @Todo vibecode - true 시 localStorage 대신 콜백 사용
594
+ */
595
+ useExternalStorage?: boolean;
596
+ /**
597
+ * @description 세션 목록 로드 콜백
598
+ * @Todo vibecode - 컴포넌트 마운트 시 호출
599
+ */
600
+ onLoadSessions?: () => Promise<{
601
+ id: string;
602
+ title: string;
603
+ }[]>;
604
+ /**
605
+ * @description 세션 생성 콜백
606
+ * @Todo vibecode - 새 채팅 생성 시 호출
607
+ */
608
+ onCreateSession?: () => Promise<{
609
+ id: string;
610
+ title: string;
611
+ }>;
612
+ /**
613
+ * @description 세션 상세 로드 콜백 (메시지 포함)
614
+ * @Todo vibecode - 세션 선택 시 호출 (lazy loading)
615
+ */
616
+ onLoadSession?: (sessionId: string) => Promise<{
617
+ id: string;
618
+ title: string;
619
+ messages: ChatMessage[];
620
+ memory_data?: object;
621
+ }>;
622
+ /**
623
+ * @description 세션 삭제 콜백
624
+ * @Todo vibecode - 세션 삭제 시 호출
625
+ */
626
+ onDeleteSession?: (sessionId: string) => Promise<void>;
627
+ /**
628
+ * @description 세션 제목 수정 콜백
629
+ * @Todo vibecode - 세션 제목 변경 시 호출
630
+ */
631
+ onUpdateSessionTitle?: (sessionId: string, title: string) => Promise<void>;
632
+ /**
633
+ * @description 메시지 저장 콜백
634
+ * @Todo vibecode - 메시지 전송 완료 후 호출
635
+ */
636
+ onSaveMessages?: (sessionId: string, messages: {
637
+ role: 'USER' | 'ASSISTANT';
638
+ message: string;
639
+ }[]) => Promise<void>;
492
640
  }
493
641
  declare const useChatUI: (options: UseChatUIOptions) => UseChatUIReturn;
494
642
 
@@ -65,6 +65,16 @@ interface MarkdownRendererProps {
65
65
  className?: string;
66
66
  /** 선택지 클릭 핸들러 */
67
67
  onChoiceClick?: (choice: ChoiceOption) => void;
68
+ /**
69
+ * @description Thinking 블록 표시 여부
70
+ * @Todo vibecode - AI 추론 과정 표시 (기본: true)
71
+ */
72
+ showThinking?: boolean;
73
+ /**
74
+ * @description Thinking 블록 기본 펼침 상태
75
+ * @Todo vibecode - true면 펼쳐진 상태로 표시 (기본: false)
76
+ */
77
+ thinkingDefaultOpen?: boolean;
68
78
  }
69
79
  declare const MarkdownRenderer: React$1.FC<MarkdownRendererProps>;
70
80
 
@@ -265,6 +275,65 @@ interface ChatUIProps {
265
275
  enableAutoExtraction?: boolean;
266
276
  /** 정보 추출 설정 */
267
277
  infoExtractionConfig?: Partial<InfoExtractionConfig>;
278
+ /**
279
+ * @description 외부 스토리지 사용 여부
280
+ * @Todo vibecode - true 시 localStorage 대신 콜백 사용
281
+ */
282
+ useExternalStorage?: boolean;
283
+ /**
284
+ * @description 세션 목록 로드 콜백
285
+ * @Todo vibecode - 컴포넌트 마운트 시 호출
286
+ */
287
+ onLoadSessions?: () => Promise<{
288
+ id: string;
289
+ title: string;
290
+ }[]>;
291
+ /**
292
+ * @description 세션 생성 콜백
293
+ * @Todo vibecode - 새 채팅 생성 시 호출
294
+ */
295
+ onCreateSession?: () => Promise<{
296
+ id: string;
297
+ title: string;
298
+ }>;
299
+ /**
300
+ * @description 세션 상세 로드 콜백 (메시지 포함)
301
+ * @Todo vibecode - 세션 선택 시 호출 (lazy loading)
302
+ */
303
+ onLoadSession?: (sessionId: string) => Promise<{
304
+ id: string;
305
+ title: string;
306
+ messages: ChatMessage[];
307
+ memory_data?: object;
308
+ }>;
309
+ /**
310
+ * @description 세션 삭제 콜백
311
+ * @Todo vibecode - 세션 삭제 시 호출
312
+ */
313
+ onDeleteSession?: (sessionId: string) => Promise<void>;
314
+ /**
315
+ * @description 세션 제목 수정 콜백
316
+ * @Todo vibecode - 세션 제목 변경 시 호출
317
+ */
318
+ onUpdateSessionTitle?: (sessionId: string, title: string) => Promise<void>;
319
+ /**
320
+ * @description 메시지 저장 콜백
321
+ * @Todo vibecode - 메시지 전송 완료 후 호출
322
+ */
323
+ onSaveMessages?: (sessionId: string, messages: {
324
+ role: 'USER' | 'ASSISTANT';
325
+ message: string;
326
+ }[]) => Promise<void>;
327
+ /**
328
+ * @description Thinking 블록 표시 여부
329
+ * @Todo vibecode - AI 추론 과정 표시 (기본: true)
330
+ */
331
+ showThinking?: boolean;
332
+ /**
333
+ * @description Thinking 블록 기본 펼침 상태
334
+ * @Todo vibecode - true면 펼쳐진 상태로 표시 (기본: false)
335
+ */
336
+ thinkingDefaultOpen?: boolean;
268
337
  }
269
338
  interface SendMessageParams {
270
339
  messages: {
@@ -327,6 +396,16 @@ interface MessageListProps {
327
396
  editingId: string | null;
328
397
  /** 선택지 클릭 핸들러 */
329
398
  onChoiceClick?: (choice: ChoiceOption) => void;
399
+ /**
400
+ * @description Thinking 블록 표시 여부
401
+ * @Todo vibecode - AI 추론 과정 표시 (기본: true)
402
+ */
403
+ showThinking?: boolean;
404
+ /**
405
+ * @description Thinking 블록 기본 펼침 상태
406
+ * @Todo vibecode - true면 펼쳐진 상태로 표시 (기본: false)
407
+ */
408
+ thinkingDefaultOpen?: boolean;
330
409
  }
331
410
  interface MessageBubbleProps {
332
411
  message: ChatMessage;
@@ -344,6 +423,16 @@ interface MessageBubbleProps {
344
423
  models?: ModelConfig[];
345
424
  alternatives?: AlternativeResponse[];
346
425
  onChoiceClick?: (choice: ChoiceOption) => void;
426
+ /**
427
+ * @description Thinking 블록 표시 여부
428
+ * @Todo vibecode - AI 추론 과정 표시 (기본: true)
429
+ */
430
+ showThinking?: boolean;
431
+ /**
432
+ * @description Thinking 블록 기본 펼침 상태
433
+ * @Todo vibecode - true면 펼쳐진 상태로 표시 (기본: false)
434
+ */
435
+ thinkingDefaultOpen?: boolean;
347
436
  }
348
437
  interface InputProps {
349
438
  value: string;
@@ -437,6 +526,16 @@ interface UseChatUIReturn {
437
526
  compressionState: CompressionState | null;
438
527
  /** 수동으로 정보 추출 트리거 */
439
528
  extractUserInfo: () => Promise<void>;
529
+ /**
530
+ * @description 세션 목록 로딩 상태
531
+ * @Todo vibecode - 외부 스토리지 사용 시 세션 목록 로드 중
532
+ */
533
+ isSessionsLoading: boolean;
534
+ /**
535
+ * @description 단일 세션 로딩 상태
536
+ * @Todo vibecode - 외부 스토리지 사용 시 세션 상세 로드 중
537
+ */
538
+ isSessionLoading: boolean;
440
539
  }
441
540
 
442
541
  /**
@@ -489,6 +588,55 @@ interface UseChatUIOptions {
489
588
  globalMemoryConfig?: GlobalMemoryConfig;
490
589
  /** 자동 정보 추출 활성화 (기본: true) */
491
590
  enableAutoExtraction?: boolean;
591
+ /**
592
+ * @description 외부 스토리지 사용 여부
593
+ * @Todo vibecode - true 시 localStorage 대신 콜백 사용
594
+ */
595
+ useExternalStorage?: boolean;
596
+ /**
597
+ * @description 세션 목록 로드 콜백
598
+ * @Todo vibecode - 컴포넌트 마운트 시 호출
599
+ */
600
+ onLoadSessions?: () => Promise<{
601
+ id: string;
602
+ title: string;
603
+ }[]>;
604
+ /**
605
+ * @description 세션 생성 콜백
606
+ * @Todo vibecode - 새 채팅 생성 시 호출
607
+ */
608
+ onCreateSession?: () => Promise<{
609
+ id: string;
610
+ title: string;
611
+ }>;
612
+ /**
613
+ * @description 세션 상세 로드 콜백 (메시지 포함)
614
+ * @Todo vibecode - 세션 선택 시 호출 (lazy loading)
615
+ */
616
+ onLoadSession?: (sessionId: string) => Promise<{
617
+ id: string;
618
+ title: string;
619
+ messages: ChatMessage[];
620
+ memory_data?: object;
621
+ }>;
622
+ /**
623
+ * @description 세션 삭제 콜백
624
+ * @Todo vibecode - 세션 삭제 시 호출
625
+ */
626
+ onDeleteSession?: (sessionId: string) => Promise<void>;
627
+ /**
628
+ * @description 세션 제목 수정 콜백
629
+ * @Todo vibecode - 세션 제목 변경 시 호출
630
+ */
631
+ onUpdateSessionTitle?: (sessionId: string, title: string) => Promise<void>;
632
+ /**
633
+ * @description 메시지 저장 콜백
634
+ * @Todo vibecode - 메시지 전송 완료 후 호출
635
+ */
636
+ onSaveMessages?: (sessionId: string, messages: {
637
+ role: 'USER' | 'ASSISTANT';
638
+ message: string;
639
+ }[]) => Promise<void>;
492
640
  }
493
641
  declare const useChatUI: (options: UseChatUIOptions) => UseChatUIReturn;
494
642