@hef2024/llmasaservice-ui 0.25.3 → 0.26.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.
package/dist/index.css CHANGED
@@ -1537,6 +1537,7 @@ button[data-pending=true]::after {
1537
1537
  --ai-loading-spinner: #3b82f6;
1538
1538
  --ai-resize-handle-width: 4px;
1539
1539
  --ai-resize-handle-color: transparent;
1540
+ --ai-resize-handle-idle: rgba(100, 100, 100, 0.15);
1540
1541
  --ai-resize-handle-hover: #3b82f6;
1541
1542
  --ai-chat-bg: #ffffff;
1542
1543
  }
@@ -1664,7 +1665,7 @@ button[data-pending=true]::after {
1664
1665
  background-color: var(--ai-resize-handle-hover);
1665
1666
  }
1666
1667
  .ai-agent-panel:hover .ai-agent-panel__resize-handle {
1667
- background-color: rgba(100, 100, 100, 0.15);
1668
+ background-color: var(--ai-resize-handle-idle);
1668
1669
  }
1669
1670
  .ai-agent-panel--right .ai-agent-panel__resize-handle {
1670
1671
  order: -1 !important;
@@ -1844,6 +1845,15 @@ button[data-pending=true]::after {
1844
1845
  text-overflow: ellipsis;
1845
1846
  line-height: 1.5;
1846
1847
  }
1848
+ .ai-agent-panel__conversation-subtitle {
1849
+ margin-top: 2px;
1850
+ font-size: 11px;
1851
+ line-height: 1.25;
1852
+ color: var(--ai-conversation-meta-color);
1853
+ white-space: nowrap;
1854
+ overflow: hidden;
1855
+ text-overflow: ellipsis;
1856
+ }
1847
1857
  .ai-agent-panel__conversation-preview {
1848
1858
  font-size: 11px;
1849
1859
  color: var(--ai-conversation-preview-color);
@@ -2415,6 +2425,9 @@ button[data-pending=true]::after {
2415
2425
  .ai-agent-panel__conversation--current {
2416
2426
  background-color: rgba(59, 130, 246, 0.08) !important;
2417
2427
  }
2428
+ .ai-agent-panel__conversation--just-focused {
2429
+ box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
2430
+ }
2418
2431
  .ai-agent-panel__conversation--in-active {
2419
2432
  opacity: 0.7;
2420
2433
  }
@@ -3380,6 +3393,212 @@ button[data-pending=true]::after {
3380
3393
  .ai-chat-panel__input-container--dropdown-open {
3381
3394
  border-color: var(--ai-chat-input-focus-border);
3382
3395
  }
3396
+ .ai-chat-user-input-popover {
3397
+ position: absolute;
3398
+ bottom: calc(100% + 10px);
3399
+ left: 0;
3400
+ right: 0;
3401
+ z-index: 1002;
3402
+ display: flex;
3403
+ flex-direction: column;
3404
+ gap: 10px;
3405
+ padding: 12px;
3406
+ background: var(--ai-chat-input-bg);
3407
+ border: 1px solid var(--ai-chat-input-border);
3408
+ border-radius: 12px;
3409
+ box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
3410
+ max-height: min(58vh, 520px);
3411
+ overflow: auto;
3412
+ animation: aiUserInputPopoverSlideUp 0.16s ease-out;
3413
+ }
3414
+ @keyframes aiUserInputPopoverSlideUp {
3415
+ from {
3416
+ opacity: 0;
3417
+ transform: translateY(6px);
3418
+ }
3419
+ to {
3420
+ opacity: 1;
3421
+ transform: translateY(0);
3422
+ }
3423
+ }
3424
+ .ai-chat-user-input-popover__header {
3425
+ display: flex;
3426
+ align-items: center;
3427
+ justify-content: space-between;
3428
+ gap: 10px;
3429
+ }
3430
+ .ai-chat-user-input-popover__header-meta {
3431
+ display: inline-flex;
3432
+ align-items: center;
3433
+ gap: 8px;
3434
+ }
3435
+ .ai-chat-user-input-popover__progress {
3436
+ display: inline-flex;
3437
+ align-items: center;
3438
+ justify-content: center;
3439
+ border-radius: 999px;
3440
+ border: 1px solid var(--ai-chat-input-border);
3441
+ padding: 2px 8px;
3442
+ font-size: 11px;
3443
+ font-weight: 600;
3444
+ color: var(--ai-chat-input-placeholder);
3445
+ }
3446
+ .ai-chat-user-input-popover__title {
3447
+ font-size: 13px;
3448
+ font-weight: 600;
3449
+ color: var(--ai-chat-input-text);
3450
+ }
3451
+ .ai-chat-user-input-popover__instructions {
3452
+ font-size: 12px;
3453
+ line-height: 1.45;
3454
+ color: var(--ai-chat-input-placeholder);
3455
+ }
3456
+ .ai-chat-user-input-popover__cancel-inline {
3457
+ border: none;
3458
+ background: transparent;
3459
+ color: var(--ai-chat-input-placeholder);
3460
+ font-size: 11px;
3461
+ font-weight: 600;
3462
+ cursor: pointer;
3463
+ padding: 2px 4px;
3464
+ }
3465
+ .ai-chat-user-input-popover__cancel-inline:hover {
3466
+ color: var(--ai-chat-input-text);
3467
+ }
3468
+ .ai-chat-user-input-popover__questions {
3469
+ display: flex;
3470
+ flex-direction: column;
3471
+ gap: 10px;
3472
+ }
3473
+ .ai-chat-user-input-popover__question {
3474
+ border: 1px solid var(--ai-chat-suggestion-border, #e5e7eb);
3475
+ border-radius: 10px;
3476
+ padding: 10px;
3477
+ background: var(--ai-chat-suggestion-bg, #f8fafc);
3478
+ }
3479
+ .ai-chat-user-input-popover__question-header {
3480
+ display: flex;
3481
+ align-items: center;
3482
+ gap: 6px;
3483
+ margin-bottom: 6px;
3484
+ }
3485
+ .ai-chat-user-input-popover__question-index {
3486
+ width: 18px;
3487
+ height: 18px;
3488
+ border-radius: 999px;
3489
+ background: rgba(59, 130, 246, 0.12);
3490
+ color: #2563eb;
3491
+ font-size: 11px;
3492
+ font-weight: 700;
3493
+ display: inline-flex;
3494
+ align-items: center;
3495
+ justify-content: center;
3496
+ }
3497
+ .ai-chat-user-input-popover__question-title {
3498
+ font-size: 11px;
3499
+ font-weight: 600;
3500
+ letter-spacing: 0.02em;
3501
+ color: var(--ai-chat-input-placeholder);
3502
+ text-transform: uppercase;
3503
+ }
3504
+ .ai-chat-user-input-popover__question-text {
3505
+ font-size: 13px;
3506
+ color: var(--ai-chat-input-text);
3507
+ margin-bottom: 8px;
3508
+ line-height: 1.45;
3509
+ }
3510
+ .ai-chat-user-input-popover__options {
3511
+ display: flex;
3512
+ flex-direction: column;
3513
+ gap: 6px;
3514
+ }
3515
+ .ai-chat-user-input-popover__option {
3516
+ display: flex;
3517
+ align-items: flex-start;
3518
+ gap: 8px;
3519
+ padding: 7px 8px;
3520
+ border: 1px solid var(--ai-chat-suggestion-border, #e5e7eb);
3521
+ border-radius: 8px;
3522
+ background: var(--ai-chat-input-bg, #fff);
3523
+ cursor: pointer;
3524
+ }
3525
+ .ai-chat-user-input-popover__option input[type=radio] {
3526
+ margin-top: 2px;
3527
+ }
3528
+ .ai-chat-user-input-popover__option-content {
3529
+ display: flex;
3530
+ flex-direction: column;
3531
+ gap: 2px;
3532
+ }
3533
+ .ai-chat-user-input-popover__option-label {
3534
+ font-size: 12px;
3535
+ font-weight: 600;
3536
+ color: var(--ai-chat-input-text);
3537
+ }
3538
+ .ai-chat-user-input-popover__option-description {
3539
+ font-size: 11px;
3540
+ color: var(--ai-chat-input-placeholder);
3541
+ line-height: 1.4;
3542
+ }
3543
+ .ai-chat-user-input-popover__writein {
3544
+ width: 100%;
3545
+ margin-top: 8px;
3546
+ min-height: 56px;
3547
+ border: 1px solid var(--ai-chat-input-border);
3548
+ border-radius: 8px;
3549
+ background: var(--ai-chat-input-bg);
3550
+ color: var(--ai-chat-input-text);
3551
+ padding: 8px 10px;
3552
+ resize: vertical;
3553
+ font-family: inherit;
3554
+ font-size: 12px;
3555
+ line-height: 1.45;
3556
+ }
3557
+ .ai-chat-user-input-popover__writein:focus {
3558
+ outline: none;
3559
+ border-color: var(--ai-chat-input-focus-border);
3560
+ box-shadow: 0 0 0 3px var(--ai-chat-input-focus-ring);
3561
+ }
3562
+ .ai-chat-user-input-popover__error {
3563
+ font-size: 12px;
3564
+ color: #dc2626;
3565
+ }
3566
+ .ai-chat-user-input-popover__actions {
3567
+ display: flex;
3568
+ justify-content: space-between;
3569
+ align-items: center;
3570
+ gap: 8px;
3571
+ }
3572
+ .ai-chat-user-input-popover__actions-left,
3573
+ .ai-chat-user-input-popover__actions-right {
3574
+ display: inline-flex;
3575
+ align-items: center;
3576
+ gap: 8px;
3577
+ }
3578
+ .ai-chat-user-input-popover__button {
3579
+ border-radius: 8px;
3580
+ font-size: 12px;
3581
+ font-weight: 600;
3582
+ padding: 7px 10px;
3583
+ border: 1px solid transparent;
3584
+ cursor: pointer;
3585
+ }
3586
+ .ai-chat-user-input-popover__button--secondary {
3587
+ background: transparent;
3588
+ border-color: var(--ai-chat-input-border);
3589
+ color: var(--ai-chat-input-placeholder);
3590
+ }
3591
+ .ai-chat-user-input-popover__button--secondary:hover {
3592
+ border-color: var(--ai-chat-input-focus-border);
3593
+ color: var(--ai-chat-input-text);
3594
+ }
3595
+ .ai-chat-user-input-popover__button--primary {
3596
+ background: #2563eb;
3597
+ color: #fff;
3598
+ }
3599
+ .ai-chat-user-input-popover__button--primary:hover {
3600
+ background: #1d4ed8;
3601
+ }
3383
3602
  .ai-chat-panel__input-container .ai-chat-panel__input {
3384
3603
  border-top: none;
3385
3604
  padding: 8px 8px 4px 8px;
@@ -3495,11 +3714,17 @@ button[data-pending=true]::after {
3495
3714
  .ai-chat-panel__input-footer {
3496
3715
  display: flex;
3497
3716
  align-items: center;
3498
- justify-content: space-between;
3717
+ justify-content: flex-start;
3499
3718
  gap: 8px;
3500
3719
  padding: 0 8px 8px 8px;
3501
3720
  flex-shrink: 0;
3502
3721
  }
3722
+ .ai-chat-input-footer__left {
3723
+ display: inline-flex;
3724
+ align-items: center;
3725
+ gap: 6px;
3726
+ min-width: 0;
3727
+ }
3503
3728
  .ai-chat-panel__input-footer-spacer {
3504
3729
  flex: 1;
3505
3730
  }
@@ -3830,14 +4055,96 @@ button[data-pending=true]::after {
3830
4055
  }
3831
4056
  }
3832
4057
  .ai-chat-context-pill-wrapper {
4058
+ display: flex;
4059
+ align-items: center;
4060
+ gap: 4px;
4061
+ flex-shrink: 0;
4062
+ margin-left: 0;
4063
+ }
4064
+ .ai-chat-context-pill-anchor {
3833
4065
  position: relative;
3834
4066
  flex-shrink: 0;
3835
4067
  }
4068
+ .ai-chat-agent-mode-trigger {
4069
+ display: inline-flex;
4070
+ align-items: center;
4071
+ gap: 0;
4072
+ min-height: 30px;
4073
+ padding: 2px 6px;
4074
+ border: 1px solid transparent;
4075
+ border-radius: 8px;
4076
+ background: transparent;
4077
+ color: var(--ai-chat-footer-text, #6b7280);
4078
+ font-size: 12px;
4079
+ font-family: inherit;
4080
+ cursor: pointer;
4081
+ transition:
4082
+ background-color 0.15s ease,
4083
+ color 0.15s ease,
4084
+ border-color 0.15s ease;
4085
+ }
4086
+ .ai-chat-agent-mode-trigger:hover {
4087
+ background: var(--ai-button-ghost-hover, rgba(0, 0, 0, 0.04));
4088
+ color: var(--ai-chat-input-text, #1f2937);
4089
+ }
4090
+ .ai-chat-agent-mode-trigger:disabled {
4091
+ opacity: 0.6;
4092
+ cursor: default;
4093
+ }
4094
+ .ai-chat-agent-mode-trigger--active:disabled {
4095
+ opacity: 1;
4096
+ }
4097
+ .ai-chat-agent-mode-trigger__icon {
4098
+ display: inline-flex;
4099
+ align-items: center;
4100
+ justify-content: center;
4101
+ width: 24px;
4102
+ height: 24px;
4103
+ }
4104
+ .ai-chat-agent-mode-trigger__icon .ai-chat-icon-sm {
4105
+ width: 24px;
4106
+ height: 24px;
4107
+ }
4108
+ .ai-chat-agent-mode-trigger__label {
4109
+ max-width: 0;
4110
+ margin-left: 0;
4111
+ opacity: 0;
4112
+ overflow: hidden;
4113
+ white-space: nowrap;
4114
+ text-transform: lowercase;
4115
+ font-weight: 500;
4116
+ transition:
4117
+ max-width 0.2s ease,
4118
+ opacity 0.2s ease,
4119
+ margin-left 0.2s ease;
4120
+ }
4121
+ .ai-chat-agent-mode-trigger--expanded,
4122
+ .ai-chat-agent-mode-trigger--active {
4123
+ border-color: var(--ai-chat-input-border, #d1d5db);
4124
+ background: rgba(148, 163, 184, 0.1);
4125
+ }
4126
+ .ai-chat-agent-mode-trigger--active {
4127
+ border-color: rgba(139, 92, 246, 0.55);
4128
+ background: rgba(139, 92, 246, 0.16);
4129
+ color: #6d28d9;
4130
+ box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.24);
4131
+ }
4132
+ .ai-chat-agent-mode-trigger--active .ai-chat-agent-mode-trigger__icon svg {
4133
+ transform-origin: center;
4134
+ }
4135
+ .ai-chat-agent-mode-trigger--expanded .ai-chat-agent-mode-trigger__label,
4136
+ .ai-chat-agent-mode-trigger--active .ai-chat-agent-mode-trigger__label {
4137
+ max-width: 170px;
4138
+ margin-left: 4px;
4139
+ opacity: 1;
4140
+ }
3836
4141
  .ai-chat-context-pill {
3837
4142
  display: flex;
3838
4143
  align-items: center;
3839
- gap: 6px;
3840
- padding: 4px 10px;
4144
+ justify-content: center;
4145
+ gap: 0;
4146
+ min-width: 30px;
4147
+ padding: 4px 8px;
3841
4148
  background: var(--ai-chat-suggestion-bg, #f3f4f6);
3842
4149
  border: none;
3843
4150
  border-radius: 999px;
@@ -3867,6 +4174,17 @@ button[data-pending=true]::after {
3867
4174
  color: var(--ai-sidebar-text-muted, #6b7280);
3868
4175
  font-size: 12px;
3869
4176
  }
4177
+ .ai-chat-context-pill__icon {
4178
+ display: inline-flex;
4179
+ align-items: center;
4180
+ justify-content: center;
4181
+ width: 14px;
4182
+ height: 14px;
4183
+ }
4184
+ .ai-chat-context-pill__icon .ai-chat-icon-sm {
4185
+ width: 14px;
4186
+ height: 14px;
4187
+ }
3870
4188
  .ai-chat-context-pill__tokens {
3871
4189
  display: none;
3872
4190
  }
@@ -4188,6 +4506,47 @@ button[data-pending=true]::after {
4188
4506
  max-height: 400px;
4189
4507
  overflow-y: auto;
4190
4508
  }
4509
+ .dark-theme .ai-chat-user-input-popover {
4510
+ box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
4511
+ }
4512
+ .dark-theme .ai-chat-user-input-popover__question {
4513
+ background: rgba(2, 6, 23, 0.55);
4514
+ }
4515
+ .dark-theme .ai-chat-user-input-popover__question-index {
4516
+ background: rgba(96, 165, 250, 0.2);
4517
+ color: #93c5fd;
4518
+ }
4519
+ .dark-theme .ai-chat-user-input-popover__progress {
4520
+ border-color: rgba(148, 163, 184, 0.45);
4521
+ color: rgba(203, 213, 225, 0.9);
4522
+ }
4523
+ .dark-theme .ai-chat-user-input-popover__option {
4524
+ background: rgba(15, 23, 42, 0.7);
4525
+ }
4526
+ .dark-theme .ai-chat-user-input-popover__button--primary {
4527
+ background: #3b82f6;
4528
+ }
4529
+ .dark-theme .ai-chat-user-input-popover__button--primary:hover {
4530
+ background: #2563eb;
4531
+ }
4532
+ .dark-theme .ai-chat-agent-mode-trigger {
4533
+ color: var(--ai-chat-footer-text, #9ca3af);
4534
+ }
4535
+ .dark-theme .ai-chat-agent-mode-trigger:hover {
4536
+ background: rgba(156, 163, 175, 0.16);
4537
+ color: var(--ai-chat-input-text, #f9fafb);
4538
+ }
4539
+ .dark-theme .ai-chat-agent-mode-trigger--expanded,
4540
+ .dark-theme .ai-chat-agent-mode-trigger--active {
4541
+ border-color: rgba(148, 163, 184, 0.36);
4542
+ background: rgba(148, 163, 184, 0.18);
4543
+ }
4544
+ .dark-theme .ai-chat-agent-mode-trigger--active {
4545
+ border-color: rgba(167, 139, 250, 0.7);
4546
+ background: rgba(139, 92, 246, 0.28);
4547
+ color: #c4b5fd;
4548
+ box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.35);
4549
+ }
4191
4550
  .dark-theme .ai-chat-context-pill {
4192
4551
  background: var(--ai-chat-suggestion-bg, #374151);
4193
4552
  }
@@ -4207,6 +4566,13 @@ button[data-pending=true]::after {
4207
4566
  background: #111827;
4208
4567
  }
4209
4568
  @container chat-panel (max-width: 380px) {
4569
+ .ai-chat-user-input-popover {
4570
+ max-height: min(62vh, 420px);
4571
+ padding: 10px;
4572
+ }
4573
+ .ai-chat-user-input-popover__question {
4574
+ padding: 8px;
4575
+ }
4210
4576
  .ai-chat-context-pill__label {
4211
4577
  font-size: 11px;
4212
4578
  }
@@ -4293,6 +4659,90 @@ button[data-pending=true]::after {
4293
4659
  .dark-theme .ai-chat-error-banner__close:hover {
4294
4660
  background: rgba(252, 165, 165, 0.1);
4295
4661
  }
4662
+ .ai-chat-compaction-inline-status {
4663
+ display: flex;
4664
+ align-items: center;
4665
+ gap: 12px;
4666
+ padding: 8px 16px 4px;
4667
+ color: #64748b;
4668
+ font-size: 12px;
4669
+ font-weight: 500;
4670
+ letter-spacing: 0.01em;
4671
+ }
4672
+ .ai-chat-compaction-inline-status::before,
4673
+ .ai-chat-compaction-inline-status::after {
4674
+ content: "";
4675
+ flex: 1;
4676
+ height: 1px;
4677
+ background: rgba(100, 116, 139, 0.35);
4678
+ }
4679
+ .dark-theme .ai-chat-compaction-inline-status {
4680
+ color: #cbd5e1;
4681
+ }
4682
+ .dark-theme .ai-chat-compaction-inline-status::before,
4683
+ .dark-theme .ai-chat-compaction-inline-status::after {
4684
+ background: rgba(148, 163, 184, 0.4);
4685
+ }
4686
+ .ai-chat-compaction-banner {
4687
+ display: flex;
4688
+ align-items: center;
4689
+ justify-content: space-between;
4690
+ gap: 12px;
4691
+ padding: 10px 14px;
4692
+ margin: 8px 16px 0;
4693
+ border-radius: 8px;
4694
+ border: 1px solid transparent;
4695
+ animation: slideDown 0.2s ease-out;
4696
+ }
4697
+ .ai-chat-compaction-banner--info {
4698
+ background: #eff6ff;
4699
+ border-color: #bfdbfe;
4700
+ }
4701
+ .ai-chat-compaction-banner--warning {
4702
+ background: #fffbeb;
4703
+ border-color: #fde68a;
4704
+ }
4705
+ .ai-chat-compaction-banner--success {
4706
+ background: #ecfdf3;
4707
+ border-color: #86efac;
4708
+ }
4709
+ .ai-chat-compaction-banner__message {
4710
+ color: #0f172a;
4711
+ font-size: 13px;
4712
+ line-height: 1.45;
4713
+ }
4714
+ .ai-chat-compaction-banner__close {
4715
+ flex-shrink: 0;
4716
+ background: none;
4717
+ border: none;
4718
+ color: #334155;
4719
+ cursor: pointer;
4720
+ border-radius: 4px;
4721
+ padding: 4px;
4722
+ transition: background-color 0.15s;
4723
+ }
4724
+ .ai-chat-compaction-banner__close:hover {
4725
+ background: rgba(15, 23, 42, 0.08);
4726
+ }
4727
+ .dark-theme .ai-chat-compaction-banner--info {
4728
+ background: rgba(30, 64, 175, 0.22);
4729
+ border-color: rgba(96, 165, 250, 0.45);
4730
+ }
4731
+ .dark-theme .ai-chat-compaction-banner--warning {
4732
+ background: rgba(120, 53, 15, 0.35);
4733
+ border-color: rgba(251, 191, 36, 0.5);
4734
+ }
4735
+ .dark-theme .ai-chat-compaction-banner--success {
4736
+ background: rgba(20, 83, 45, 0.35);
4737
+ border-color: rgba(74, 222, 128, 0.5);
4738
+ }
4739
+ .dark-theme .ai-chat-compaction-banner__message,
4740
+ .dark-theme .ai-chat-compaction-banner__close {
4741
+ color: #e2e8f0;
4742
+ }
4743
+ .dark-theme .ai-chat-compaction-banner__close:hover {
4744
+ background: rgba(226, 232, 240, 0.12);
4745
+ }
4296
4746
  @keyframes slideDown {
4297
4747
  from {
4298
4748
  opacity: 0;
package/dist/index.d.mts CHANGED
@@ -173,6 +173,46 @@ interface BeforeSendPayload {
173
173
  content: string;
174
174
  }[];
175
175
  }
176
+ type CompactionAction = 'none' | 'compacted' | 'fallback_window';
177
+ interface CompactionTokenUsage {
178
+ projectedBefore: number;
179
+ projectedAfter: number;
180
+ warnThreshold: number;
181
+ compactThreshold: number;
182
+ targetThreshold: number;
183
+ }
184
+ interface CompactContextInput {
185
+ prompt: string;
186
+ conversationId: string | null;
187
+ agentId?: string | null;
188
+ service?: string | null;
189
+ messages: {
190
+ role: string;
191
+ content: string;
192
+ }[];
193
+ data: {
194
+ key: string;
195
+ data: string;
196
+ }[];
197
+ maxContextTokens: number;
198
+ totalContextTokens: number;
199
+ warnRatio: number;
200
+ compactRatio: number;
201
+ targetRatio: number;
202
+ preserveTurns: number;
203
+ projectedTokens: CompactionTokenUsage;
204
+ }
205
+ interface CompactContextResult {
206
+ action: CompactionAction;
207
+ prompt: string;
208
+ messages: {
209
+ role: string;
210
+ content: string;
211
+ }[];
212
+ warning?: string | null;
213
+ tokenUsage?: Partial<CompactionTokenUsage> | null;
214
+ metadata?: Record<string, unknown> | null;
215
+ }
176
216
  type TraceContextMode = 'standard' | 'full';
177
217
  interface LocalToolExecutorContext {
178
218
  toolName: string;
@@ -269,6 +309,8 @@ interface AIChatPanelProps {
269
309
  onToggleSection?: (sectionId: string, enabled: boolean) => void;
270
310
  onConversationCreated?: (conversationId: string) => void;
271
311
  onBeforeSend?: (payload: BeforeSendPayload) => Promise<void> | void;
312
+ compactContext?: (input: CompactContextInput) => Promise<CompactContextResult> | CompactContextResult;
313
+ compactionPreserveTurns?: number;
272
314
  cssUrl?: string;
273
315
  markdownClass?: string;
274
316
  width?: string;
@@ -288,6 +330,7 @@ interface AIChatPanelProps {
288
330
  customerEmailCaptureMode?: "HIDE" | "OPTIONAL" | "REQUIRED";
289
331
  customerEmailCapturePlaceholder?: string;
290
332
  toolStatusLabelFormatter?: ToolStatusLabelFormatter;
333
+ composerAgentModeControl?: ComposerAgentModeControl;
291
334
  }
292
335
  /**
293
336
  * Context section for the context viewer
@@ -300,6 +343,13 @@ interface ContextSection$1 {
300
343
  data?: Record<string, unknown>;
301
344
  rawData?: string;
302
345
  }
346
+ interface ComposerAgentModeControl {
347
+ active?: boolean;
348
+ disabled?: boolean;
349
+ label?: string;
350
+ title?: string;
351
+ onActivate?: () => void;
352
+ }
303
353
  type ContextDataFormat$1 = 'json' | 'toon' | 'markdown' | 'text';
304
354
  declare const _default: React__default.NamedExoticComponent<AIChatPanelProps>;
305
355
 
@@ -341,6 +391,19 @@ interface APIConversationSummary {
341
391
  agentId?: string;
342
392
  messageCount?: number;
343
393
  }
394
+ /**
395
+ * Active conversation state for multi-conversation support
396
+ */
397
+ interface ActiveConversation {
398
+ conversationId: string;
399
+ stableKey: string;
400
+ agentId: string;
401
+ history: Record<string, AIChatHistoryEntry>;
402
+ transcriptLoaded: boolean;
403
+ isLoading: boolean;
404
+ title: string;
405
+ conversationInitialPrompt?: string;
406
+ }
344
407
  /**
345
408
  * Agent configuration with optional local overrides
346
409
  */
@@ -389,6 +452,8 @@ interface AIAgentPanelProps {
389
452
  onAgentSwitch?: (fromAgent: string, toAgent: string) => void;
390
453
  onConversationChange?: (conversationId: string) => void;
391
454
  onBeforeSend?: (payload: BeforeSendPayload) => Promise<void> | void;
455
+ compactContext?: (input: CompactContextInput) => Promise<CompactContextResult> | CompactContextResult;
456
+ compactionPreserveTurns?: number;
392
457
  historyChangedCallback?: (history: Record<string, AIChatHistoryEntry>) => void;
393
458
  responseCompleteCallback?: (callId: string, prompt: string, response: string) => void;
394
459
  thumbsUpClick?: (callId: string) => void;
@@ -411,6 +476,7 @@ interface AIAgentPanelProps {
411
476
  followOnQuestions?: string[];
412
477
  followOnPrompt?: string;
413
478
  historyListLimit?: number;
479
+ conversationSubtitleResolver?: (conversationId: string, conversation?: APIConversationSummary | ActiveConversation) => string | null | undefined;
414
480
  showConversationHistory?: boolean;
415
481
  cssUrl?: string;
416
482
  markdownClass?: string;
@@ -435,6 +501,7 @@ interface AIAgentPanelProps {
435
501
  traceContextMode?: TraceContextMode;
436
502
  autoApproveTools?: boolean | string[];
437
503
  toolStatusLabelFormatter?: ToolStatusLabelFormatter;
504
+ composerAgentModeControl?: ComposerAgentModeControl;
438
505
  }
439
506
  declare const AIAgentPanel: React__default.ForwardRefExoticComponent<AIAgentPanelProps & React__default.RefAttributes<AIAgentPanelHandle>>;
440
507
 
@@ -683,4 +750,4 @@ interface ThinkingBlockProps {
683
750
  */
684
751
  declare const ThinkingBlock: React__default.FC<ThinkingBlockProps>;
685
752
 
686
- export { AIAgentPanel, type AIAgentPanelProps, type AIChatHistoryEntry, _default as AIChatPanel, type AIChatPanelProps, type APIConversationSummary, type AgentContext, type AgentMetadata, AgentPanel, type AgentPanelProps, type AgentProfile, type ArtifactBlockType, Button, type ButtonProps, ChatPanel, type ChatPanelProps, type ContextDataFormat, type ContextSection, type Conversation, type ConversationGroup, Dialog, DialogFooter, type DialogFooterProps, type DialogProps, Input, type InputProps, type MCPAuthHeaderResolver, type MCPAuthHeaderResolverInput, type MCPAuthPhase, type MCPServer, type ObjectContextSection, type PlanningStep, type PlanningStepStatus, type RawContextSection, type ResponseArtifactBlock, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, ThinkingBlock, type ThinkingBlockProps, type ThinkingBlockType, type ToolCallStatus, type ToolStatusLabelFormatter, type ToolStatusLabelFormatterInput, Tooltip, type TooltipProps, WordFadeIn, type WordFadeInProps, useAgentRegistry, useConversationStore };
753
+ export { AIAgentPanel, type AIAgentPanelProps, type AIChatHistoryEntry, _default as AIChatPanel, type AIChatPanelProps, type APIConversationSummary, type AgentContext, type AgentMetadata, AgentPanel, type AgentPanelProps, type AgentProfile, type ArtifactBlockType, Button, type ButtonProps, ChatPanel, type ChatPanelProps, type CompactContextInput, type CompactContextResult, type CompactionAction, type CompactionTokenUsage, type ComposerAgentModeControl, type ContextDataFormat, type ContextSection, type Conversation, type ConversationGroup, Dialog, DialogFooter, type DialogFooterProps, type DialogProps, Input, type InputProps, type MCPAuthHeaderResolver, type MCPAuthHeaderResolverInput, type MCPAuthPhase, type MCPServer, type ObjectContextSection, type PlanningStep, type PlanningStepStatus, type RawContextSection, type ResponseArtifactBlock, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, ThinkingBlock, type ThinkingBlockProps, type ThinkingBlockType, type ToolCallStatus, type ToolStatusLabelFormatter, type ToolStatusLabelFormatterInput, Tooltip, type TooltipProps, WordFadeIn, type WordFadeInProps, useAgentRegistry, useConversationStore };