@hef2024/llmasaservice-ui 0.20.0 → 0.20.1

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.
@@ -828,3 +828,4 @@ Port is complete when:
828
828
  ---
829
829
 
830
830
  **End of Inventory**
831
+
@@ -128,3 +128,4 @@ If after this fix it still doesn't work, the issue might be:
128
128
  3. **Version issue**: Different version of llmasaservice-client
129
129
 
130
130
  **Next Step**: Check if we need to add error callbacks to the `send()` function instead of relying on the error state.
131
+
package/FIX-APPLIED.md CHANGED
@@ -232,3 +232,4 @@ If after refreshing and testing again the error banner still doesn't appear:
232
232
  **Date:** December 15, 2025
233
233
  **Components:** AIChatPanel, ChatPanel
234
234
  **Breaking Changes:** None
235
+
@@ -244,3 +244,4 @@ All files modified, tested, and documented. Ready for:
244
244
  **Lines Changed:** ~500 (including docs)
245
245
  **Breaking Changes:** 0
246
246
  **User Impact:** Significantly improved error handling UX
247
+
package/dist/index.css CHANGED
@@ -3505,3 +3505,448 @@ button[data-pending=true]::after {
3505
3505
  transform: translateY(0);
3506
3506
  }
3507
3507
  }
3508
+ .ai-chat-modal-overlay {
3509
+ position: fixed;
3510
+ top: 0;
3511
+ left: 0;
3512
+ right: 0;
3513
+ bottom: 0;
3514
+ background: rgba(0, 0, 0, 0.5);
3515
+ display: flex;
3516
+ align-items: center;
3517
+ justify-content: center;
3518
+ z-index: 10000;
3519
+ animation: fadeIn 0.15s ease-out;
3520
+ }
3521
+ @keyframes fadeIn {
3522
+ from {
3523
+ opacity: 0;
3524
+ }
3525
+ to {
3526
+ opacity: 1;
3527
+ }
3528
+ }
3529
+ .ai-chat-modal-content {
3530
+ background: white;
3531
+ border-radius: 12px;
3532
+ padding: 24px;
3533
+ max-width: 500px;
3534
+ width: 90%;
3535
+ max-height: 80vh;
3536
+ overflow: auto;
3537
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
3538
+ animation: slideUp 0.2s ease-out;
3539
+ }
3540
+ .dark-theme .ai-chat-modal-content {
3541
+ background: #1f2937;
3542
+ color: #f9fafb;
3543
+ }
3544
+ @keyframes slideUp {
3545
+ from {
3546
+ opacity: 0;
3547
+ transform: translateY(10px);
3548
+ }
3549
+ to {
3550
+ opacity: 1;
3551
+ transform: translateY(0);
3552
+ }
3553
+ }
3554
+ .ai-chat-modal-header {
3555
+ display: flex;
3556
+ align-items: center;
3557
+ justify-content: space-between;
3558
+ margin-bottom: 16px;
3559
+ }
3560
+ .ai-chat-modal-header h3 {
3561
+ margin: 0;
3562
+ font-size: 18px;
3563
+ font-weight: 600;
3564
+ color: #1f2937;
3565
+ }
3566
+ .dark-theme .ai-chat-modal-header h3 {
3567
+ color: #f9fafb;
3568
+ }
3569
+ .ai-chat-modal-close {
3570
+ background: none;
3571
+ border: none;
3572
+ font-size: 24px;
3573
+ line-height: 1;
3574
+ padding: 0;
3575
+ width: 28px;
3576
+ height: 28px;
3577
+ border-radius: 6px;
3578
+ cursor: pointer;
3579
+ color: #6b7280;
3580
+ transition: all 0.15s;
3581
+ }
3582
+ .ai-chat-modal-close:hover {
3583
+ background: #f3f4f6;
3584
+ color: #1f2937;
3585
+ }
3586
+ .dark-theme .ai-chat-modal-close {
3587
+ color: #9ca3af;
3588
+ }
3589
+ .dark-theme .ai-chat-modal-close:hover {
3590
+ background: #374151;
3591
+ color: #f9fafb;
3592
+ }
3593
+ .ai-chat-modal-body {
3594
+ margin-bottom: 20px;
3595
+ }
3596
+ .ai-chat-modal-text {
3597
+ color: #6b7280;
3598
+ font-size: 14px;
3599
+ margin-bottom: 16px;
3600
+ line-height: 1.5;
3601
+ }
3602
+ .dark-theme .ai-chat-modal-text {
3603
+ color: #9ca3af;
3604
+ }
3605
+ .ai-chat-modal-field {
3606
+ margin-bottom: 16px;
3607
+ }
3608
+ .ai-chat-modal-field label {
3609
+ display: block;
3610
+ font-size: 13px;
3611
+ font-weight: 500;
3612
+ color: #374151;
3613
+ margin-bottom: 6px;
3614
+ }
3615
+ .dark-theme .ai-chat-modal-field label {
3616
+ color: #e5e7eb;
3617
+ }
3618
+ .ai-chat-modal-input {
3619
+ width: 100%;
3620
+ padding: 10px 12px;
3621
+ border: 1px solid #d1d5db;
3622
+ border-radius: 8px;
3623
+ font-size: 14px;
3624
+ color: #1f2937;
3625
+ background: white;
3626
+ transition: all 0.15s;
3627
+ box-sizing: border-box;
3628
+ }
3629
+ .ai-chat-modal-input:focus {
3630
+ outline: none;
3631
+ border-color: #3b82f6;
3632
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
3633
+ }
3634
+ .dark-theme .ai-chat-modal-input {
3635
+ background: #111827;
3636
+ border-color: #374151;
3637
+ color: #f9fafb;
3638
+ }
3639
+ .dark-theme .ai-chat-modal-input:focus {
3640
+ border-color: #60a5fa;
3641
+ box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
3642
+ }
3643
+ .ai-chat-modal-footer {
3644
+ display: flex;
3645
+ gap: 12px;
3646
+ justify-content: flex-end;
3647
+ }
3648
+ .ai-chat-modal-button {
3649
+ padding: 10px 20px;
3650
+ border-radius: 8px;
3651
+ font-size: 14px;
3652
+ font-weight: 500;
3653
+ cursor: pointer;
3654
+ transition: all 0.15s;
3655
+ border: none;
3656
+ }
3657
+ .ai-chat-modal-button--primary {
3658
+ background: #3b82f6;
3659
+ color: white;
3660
+ }
3661
+ .ai-chat-modal-button--primary:hover:not(:disabled) {
3662
+ background: #2563eb;
3663
+ }
3664
+ .ai-chat-modal-button--primary:disabled {
3665
+ opacity: 0.5;
3666
+ cursor: not-allowed;
3667
+ }
3668
+ .ai-chat-modal-button--secondary {
3669
+ background: #f3f4f6;
3670
+ color: #374151;
3671
+ }
3672
+ .ai-chat-modal-button--secondary:hover {
3673
+ background: #e5e7eb;
3674
+ }
3675
+ .dark-theme .ai-chat-modal-button--secondary {
3676
+ background: #374151;
3677
+ color: #e5e7eb;
3678
+ }
3679
+ .dark-theme .ai-chat-modal-button--secondary:hover {
3680
+ background: #4b5563;
3681
+ }
3682
+ .ai-chat-tool-info-modal {
3683
+ max-width: 800px;
3684
+ width: 95%;
3685
+ }
3686
+ .ai-chat-tool-info-container {
3687
+ display: flex;
3688
+ gap: 16px;
3689
+ margin-bottom: 20px;
3690
+ }
3691
+ .ai-chat-tool-info-section {
3692
+ flex: 1;
3693
+ }
3694
+ .ai-chat-tool-info-section h4 {
3695
+ font-size: 14px;
3696
+ font-weight: 600;
3697
+ margin: 0 0 8px 0;
3698
+ color: #374151;
3699
+ }
3700
+ .dark-theme .ai-chat-tool-info-section h4 {
3701
+ color: #e5e7eb;
3702
+ }
3703
+ .ai-chat-tool-info-json {
3704
+ width: 100%;
3705
+ min-height: 300px;
3706
+ max-height: 400px;
3707
+ padding: 12px;
3708
+ border: 1px solid #d1d5db;
3709
+ border-radius: 8px;
3710
+ font-family:
3711
+ "Monaco",
3712
+ "Courier New",
3713
+ monospace;
3714
+ font-size: 12px;
3715
+ background: #f9fafb;
3716
+ color: #1f2937;
3717
+ resize: vertical;
3718
+ box-sizing: border-box;
3719
+ }
3720
+ .dark-theme .ai-chat-tool-info-json {
3721
+ background: #111827;
3722
+ border-color: #374151;
3723
+ color: #e5e7eb;
3724
+ }
3725
+ .ai-chat-button-container {
3726
+ display: flex;
3727
+ gap: 8px;
3728
+ padding: 12px 16px;
3729
+ border-top: 1px solid #e5e7eb;
3730
+ background: #f9fafb;
3731
+ }
3732
+ .dark-theme .ai-chat-button-container {
3733
+ border-top-color: #374151;
3734
+ background: #111827;
3735
+ }
3736
+ .ai-chat-save-button,
3737
+ .ai-chat-email-button,
3738
+ .ai-chat-cta-button {
3739
+ flex: 1;
3740
+ min-width: 0;
3741
+ }
3742
+ .ai-chat-customer-email-panel {
3743
+ display: flex;
3744
+ flex-wrap: wrap;
3745
+ align-items: center;
3746
+ gap: 8px;
3747
+ padding: 12px 16px;
3748
+ border-top: 1px solid #e5e7eb;
3749
+ background: #fffbeb;
3750
+ }
3751
+ .dark-theme .ai-chat-customer-email-panel {
3752
+ background: #422006;
3753
+ border-top-color: #78350f;
3754
+ }
3755
+ .ai-chat-customer-email-input {
3756
+ flex: 1;
3757
+ min-width: 200px;
3758
+ padding: 8px 12px;
3759
+ border: 1px solid #d1d5db;
3760
+ border-radius: 8px;
3761
+ font-size: 14px;
3762
+ color: #1f2937;
3763
+ background: white;
3764
+ transition: all 0.15s;
3765
+ }
3766
+ .ai-chat-customer-email-input:focus {
3767
+ outline: none;
3768
+ border-color: #3b82f6;
3769
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
3770
+ }
3771
+ .ai-chat-customer-email-input--error {
3772
+ border-color: #ef4444;
3773
+ }
3774
+ .ai-chat-customer-email-input--error:focus {
3775
+ box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
3776
+ }
3777
+ .dark-theme .ai-chat-customer-email-input {
3778
+ background: #111827;
3779
+ border-color: #78350f;
3780
+ color: #f9fafb;
3781
+ }
3782
+ .dark-theme .ai-chat-customer-email-input:focus {
3783
+ border-color: #60a5fa;
3784
+ box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
3785
+ }
3786
+ .ai-chat-email-set-button {
3787
+ flex-shrink: 0;
3788
+ }
3789
+ .ai-chat-email-error-message {
3790
+ width: 100%;
3791
+ color: #dc2626;
3792
+ font-size: 13px;
3793
+ margin-top: -4px;
3794
+ }
3795
+ .dark-theme .ai-chat-email-error-message {
3796
+ color: #fca5a5;
3797
+ }
3798
+ .ai-chat-approve-tools-panel {
3799
+ padding: 16px;
3800
+ border-top: 1px solid #e5e7eb;
3801
+ border-bottom: 1px solid #e5e7eb;
3802
+ background: #fef3c7;
3803
+ }
3804
+ .dark-theme .ai-chat-approve-tools-panel {
3805
+ background: #78350f;
3806
+ border-top-color: #92400e;
3807
+ border-bottom-color: #92400e;
3808
+ }
3809
+ .ai-chat-approve-tools-header {
3810
+ font-size: 14px;
3811
+ font-weight: 600;
3812
+ color: #92400e;
3813
+ margin-bottom: 4px;
3814
+ }
3815
+ .dark-theme .ai-chat-approve-tools-header {
3816
+ color: #fef3c7;
3817
+ }
3818
+ .ai-chat-approve-tools-description {
3819
+ font-size: 13px;
3820
+ color: #78350f;
3821
+ margin-bottom: 12px;
3822
+ }
3823
+ .dark-theme .ai-chat-approve-tools-description {
3824
+ color: #fde68a;
3825
+ }
3826
+ .ai-chat-approve-tool-item {
3827
+ margin-bottom: 12px;
3828
+ }
3829
+ .ai-chat-approve-tool-item:last-child {
3830
+ margin-bottom: 0;
3831
+ }
3832
+ .ai-chat-approve-tool-name {
3833
+ font-size: 13px;
3834
+ font-weight: 600;
3835
+ color: #92400e;
3836
+ margin-bottom: 6px;
3837
+ font-family:
3838
+ "Monaco",
3839
+ "Courier New",
3840
+ monospace;
3841
+ }
3842
+ .dark-theme .ai-chat-approve-tool-name {
3843
+ color: #fef3c7;
3844
+ }
3845
+ .ai-chat-approve-tools-buttons {
3846
+ display: flex;
3847
+ gap: 6px;
3848
+ flex-wrap: wrap;
3849
+ }
3850
+ .ai-chat-approve-tools-button {
3851
+ flex: 1;
3852
+ min-width: 80px;
3853
+ }
3854
+ .ai-chat-email-input-message {
3855
+ color: #991b1b;
3856
+ font-size: 0.8em;
3857
+ margin-top: 8px;
3858
+ margin-bottom: 8px;
3859
+ padding-left: 8px;
3860
+ }
3861
+ .dark-theme .ai-chat-email-input-message {
3862
+ color: #fca5a5;
3863
+ }
3864
+ .ai-chat-email-input-container {
3865
+ display: flex;
3866
+ flex-direction: row;
3867
+ width: 100%;
3868
+ gap: 8px;
3869
+ margin-top: 8px;
3870
+ margin-bottom: 8px;
3871
+ }
3872
+ .ai-chat-email-input {
3873
+ flex: 1;
3874
+ color: #1f2937;
3875
+ padding: 8px 12px;
3876
+ background-color: white;
3877
+ border: 1px solid #d1d5db;
3878
+ border-radius: 4px;
3879
+ font-size: 14px;
3880
+ }
3881
+ .dark-theme .ai-chat-email-input {
3882
+ color: #f9fafb;
3883
+ background-color: #1f2937;
3884
+ border-color: #374151;
3885
+ }
3886
+ .ai-chat-email-input:focus {
3887
+ outline: none;
3888
+ border-color: #3b82f6;
3889
+ }
3890
+ .ai-chat-email-input-invalid {
3891
+ flex: 1;
3892
+ color: #1f2937;
3893
+ padding: 8px 12px;
3894
+ background-color: #fef2f2;
3895
+ border: 1px solid #ef4444;
3896
+ border-radius: 4px;
3897
+ font-size: 14px;
3898
+ }
3899
+ .dark-theme .ai-chat-email-input-invalid {
3900
+ color: #f9fafb;
3901
+ background-color: #7f1d1d;
3902
+ border-color: #991b1b;
3903
+ }
3904
+ .ai-chat-email-input-invalid::placeholder {
3905
+ color: #991b1b;
3906
+ }
3907
+ .dark-theme .ai-chat-email-input-invalid::placeholder {
3908
+ color: #fca5a5;
3909
+ }
3910
+ .ai-chat-email-input-invalid:focus {
3911
+ outline: none;
3912
+ border-color: #dc2626;
3913
+ }
3914
+ .ai-chat-email-input-set {
3915
+ flex: 1;
3916
+ color: #1f2937;
3917
+ padding: 8px 12px;
3918
+ background-color: white;
3919
+ border: 0px solid white;
3920
+ opacity: 0.7;
3921
+ user-select: none;
3922
+ border-radius: 4px;
3923
+ font-size: 14px;
3924
+ }
3925
+ .dark-theme .ai-chat-email-input-set {
3926
+ color: #f9fafb;
3927
+ background-color: #1f2937;
3928
+ border-color: #1f2937;
3929
+ }
3930
+ .ai-chat-email-edit-button {
3931
+ padding: 8px 12px;
3932
+ background: transparent;
3933
+ border: 1px solid #d1d5db;
3934
+ border-radius: 4px;
3935
+ cursor: pointer;
3936
+ color: #374151;
3937
+ font-size: 16px;
3938
+ display: flex;
3939
+ align-items: center;
3940
+ justify-content: center;
3941
+ transition: background-color 0.15s;
3942
+ }
3943
+ .ai-chat-email-edit-button:hover {
3944
+ background-color: #f3f4f6;
3945
+ }
3946
+ .dark-theme .ai-chat-email-edit-button {
3947
+ border-color: #374151;
3948
+ color: #9ca3af;
3949
+ }
3950
+ .dark-theme .ai-chat-email-edit-button:hover {
3951
+ background-color: #374151;
3952
+ }
package/dist/index.d.mts CHANGED
@@ -232,6 +232,24 @@ interface AIAgentPanelProps {
232
232
  followOnPrompt?: string;
233
233
  historyListLimit?: number;
234
234
  showConversationHistory?: boolean;
235
+ cssUrl?: string;
236
+ markdownClass?: string;
237
+ width?: string;
238
+ height?: string;
239
+ scrollToEnd?: boolean;
240
+ prismStyle?: any;
241
+ showSaveButton?: boolean;
242
+ showEmailButton?: boolean;
243
+ messages?: {
244
+ role: "user" | "assistant";
245
+ content: string;
246
+ }[];
247
+ showCallToAction?: boolean;
248
+ callToActionButtonText?: string;
249
+ callToActionEmailAddress?: string;
250
+ callToActionEmailSubject?: string;
251
+ customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
252
+ customerEmailCapturePlaceholder?: string;
235
253
  }
236
254
  declare const AIAgentPanel: React__default.ForwardRefExoticComponent<AIAgentPanelProps & React__default.RefAttributes<AIAgentPanelHandle>>;
237
255
 
@@ -308,6 +326,24 @@ interface AIChatPanelProps {
308
326
  maxContextTokens?: number;
309
327
  enableContextDetailView?: boolean;
310
328
  onConversationCreated?: (conversationId: string) => void;
329
+ cssUrl?: string;
330
+ markdownClass?: string;
331
+ width?: string;
332
+ height?: string;
333
+ scrollToEnd?: boolean;
334
+ prismStyle?: any;
335
+ showSaveButton?: boolean;
336
+ showEmailButton?: boolean;
337
+ messages?: {
338
+ role: "user" | "assistant";
339
+ content: string;
340
+ }[];
341
+ showCallToAction?: boolean;
342
+ callToActionButtonText?: string;
343
+ callToActionEmailAddress?: string;
344
+ callToActionEmailSubject?: string;
345
+ customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
346
+ customerEmailCapturePlaceholder?: string;
311
347
  }
312
348
  /**
313
349
  * Context section for the context viewer
package/dist/index.d.ts CHANGED
@@ -232,6 +232,24 @@ interface AIAgentPanelProps {
232
232
  followOnPrompt?: string;
233
233
  historyListLimit?: number;
234
234
  showConversationHistory?: boolean;
235
+ cssUrl?: string;
236
+ markdownClass?: string;
237
+ width?: string;
238
+ height?: string;
239
+ scrollToEnd?: boolean;
240
+ prismStyle?: any;
241
+ showSaveButton?: boolean;
242
+ showEmailButton?: boolean;
243
+ messages?: {
244
+ role: "user" | "assistant";
245
+ content: string;
246
+ }[];
247
+ showCallToAction?: boolean;
248
+ callToActionButtonText?: string;
249
+ callToActionEmailAddress?: string;
250
+ callToActionEmailSubject?: string;
251
+ customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
252
+ customerEmailCapturePlaceholder?: string;
235
253
  }
236
254
  declare const AIAgentPanel: React__default.ForwardRefExoticComponent<AIAgentPanelProps & React__default.RefAttributes<AIAgentPanelHandle>>;
237
255
 
@@ -308,6 +326,24 @@ interface AIChatPanelProps {
308
326
  maxContextTokens?: number;
309
327
  enableContextDetailView?: boolean;
310
328
  onConversationCreated?: (conversationId: string) => void;
329
+ cssUrl?: string;
330
+ markdownClass?: string;
331
+ width?: string;
332
+ height?: string;
333
+ scrollToEnd?: boolean;
334
+ prismStyle?: any;
335
+ showSaveButton?: boolean;
336
+ showEmailButton?: boolean;
337
+ messages?: {
338
+ role: "user" | "assistant";
339
+ content: string;
340
+ }[];
341
+ showCallToAction?: boolean;
342
+ callToActionButtonText?: string;
343
+ callToActionEmailAddress?: string;
344
+ callToActionEmailSubject?: string;
345
+ customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
346
+ customerEmailCapturePlaceholder?: string;
311
347
  }
312
348
  /**
313
349
  * Context section for the context viewer