@hef2024/llmasaservice-ui 0.25.3 → 0.26.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.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,9 +4055,89 @@ 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: auto;
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;
@@ -4188,6 +4493,47 @@ button[data-pending=true]::after {
4188
4493
  max-height: 400px;
4189
4494
  overflow-y: auto;
4190
4495
  }
4496
+ .dark-theme .ai-chat-user-input-popover {
4497
+ box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
4498
+ }
4499
+ .dark-theme .ai-chat-user-input-popover__question {
4500
+ background: rgba(2, 6, 23, 0.55);
4501
+ }
4502
+ .dark-theme .ai-chat-user-input-popover__question-index {
4503
+ background: rgba(96, 165, 250, 0.2);
4504
+ color: #93c5fd;
4505
+ }
4506
+ .dark-theme .ai-chat-user-input-popover__progress {
4507
+ border-color: rgba(148, 163, 184, 0.45);
4508
+ color: rgba(203, 213, 225, 0.9);
4509
+ }
4510
+ .dark-theme .ai-chat-user-input-popover__option {
4511
+ background: rgba(15, 23, 42, 0.7);
4512
+ }
4513
+ .dark-theme .ai-chat-user-input-popover__button--primary {
4514
+ background: #3b82f6;
4515
+ }
4516
+ .dark-theme .ai-chat-user-input-popover__button--primary:hover {
4517
+ background: #2563eb;
4518
+ }
4519
+ .dark-theme .ai-chat-agent-mode-trigger {
4520
+ color: var(--ai-chat-footer-text, #9ca3af);
4521
+ }
4522
+ .dark-theme .ai-chat-agent-mode-trigger:hover {
4523
+ background: rgba(156, 163, 175, 0.16);
4524
+ color: var(--ai-chat-input-text, #f9fafb);
4525
+ }
4526
+ .dark-theme .ai-chat-agent-mode-trigger--expanded,
4527
+ .dark-theme .ai-chat-agent-mode-trigger--active {
4528
+ border-color: rgba(148, 163, 184, 0.36);
4529
+ background: rgba(148, 163, 184, 0.18);
4530
+ }
4531
+ .dark-theme .ai-chat-agent-mode-trigger--active {
4532
+ border-color: rgba(167, 139, 250, 0.7);
4533
+ background: rgba(139, 92, 246, 0.28);
4534
+ color: #c4b5fd;
4535
+ box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.35);
4536
+ }
4191
4537
  .dark-theme .ai-chat-context-pill {
4192
4538
  background: var(--ai-chat-suggestion-bg, #374151);
4193
4539
  }
@@ -4207,6 +4553,13 @@ button[data-pending=true]::after {
4207
4553
  background: #111827;
4208
4554
  }
4209
4555
  @container chat-panel (max-width: 380px) {
4556
+ .ai-chat-user-input-popover {
4557
+ max-height: min(62vh, 420px);
4558
+ padding: 10px;
4559
+ }
4560
+ .ai-chat-user-input-popover__question {
4561
+ padding: 8px;
4562
+ }
4210
4563
  .ai-chat-context-pill__label {
4211
4564
  font-size: 11px;
4212
4565
  }
@@ -4293,6 +4646,90 @@ button[data-pending=true]::after {
4293
4646
  .dark-theme .ai-chat-error-banner__close:hover {
4294
4647
  background: rgba(252, 165, 165, 0.1);
4295
4648
  }
4649
+ .ai-chat-compaction-inline-status {
4650
+ display: flex;
4651
+ align-items: center;
4652
+ gap: 12px;
4653
+ padding: 8px 16px 4px;
4654
+ color: #64748b;
4655
+ font-size: 12px;
4656
+ font-weight: 500;
4657
+ letter-spacing: 0.01em;
4658
+ }
4659
+ .ai-chat-compaction-inline-status::before,
4660
+ .ai-chat-compaction-inline-status::after {
4661
+ content: "";
4662
+ flex: 1;
4663
+ height: 1px;
4664
+ background: rgba(100, 116, 139, 0.35);
4665
+ }
4666
+ .dark-theme .ai-chat-compaction-inline-status {
4667
+ color: #cbd5e1;
4668
+ }
4669
+ .dark-theme .ai-chat-compaction-inline-status::before,
4670
+ .dark-theme .ai-chat-compaction-inline-status::after {
4671
+ background: rgba(148, 163, 184, 0.4);
4672
+ }
4673
+ .ai-chat-compaction-banner {
4674
+ display: flex;
4675
+ align-items: center;
4676
+ justify-content: space-between;
4677
+ gap: 12px;
4678
+ padding: 10px 14px;
4679
+ margin: 8px 16px 0;
4680
+ border-radius: 8px;
4681
+ border: 1px solid transparent;
4682
+ animation: slideDown 0.2s ease-out;
4683
+ }
4684
+ .ai-chat-compaction-banner--info {
4685
+ background: #eff6ff;
4686
+ border-color: #bfdbfe;
4687
+ }
4688
+ .ai-chat-compaction-banner--warning {
4689
+ background: #fffbeb;
4690
+ border-color: #fde68a;
4691
+ }
4692
+ .ai-chat-compaction-banner--success {
4693
+ background: #ecfdf3;
4694
+ border-color: #86efac;
4695
+ }
4696
+ .ai-chat-compaction-banner__message {
4697
+ color: #0f172a;
4698
+ font-size: 13px;
4699
+ line-height: 1.45;
4700
+ }
4701
+ .ai-chat-compaction-banner__close {
4702
+ flex-shrink: 0;
4703
+ background: none;
4704
+ border: none;
4705
+ color: #334155;
4706
+ cursor: pointer;
4707
+ border-radius: 4px;
4708
+ padding: 4px;
4709
+ transition: background-color 0.15s;
4710
+ }
4711
+ .ai-chat-compaction-banner__close:hover {
4712
+ background: rgba(15, 23, 42, 0.08);
4713
+ }
4714
+ .dark-theme .ai-chat-compaction-banner--info {
4715
+ background: rgba(30, 64, 175, 0.22);
4716
+ border-color: rgba(96, 165, 250, 0.45);
4717
+ }
4718
+ .dark-theme .ai-chat-compaction-banner--warning {
4719
+ background: rgba(120, 53, 15, 0.35);
4720
+ border-color: rgba(251, 191, 36, 0.5);
4721
+ }
4722
+ .dark-theme .ai-chat-compaction-banner--success {
4723
+ background: rgba(20, 83, 45, 0.35);
4724
+ border-color: rgba(74, 222, 128, 0.5);
4725
+ }
4726
+ .dark-theme .ai-chat-compaction-banner__message,
4727
+ .dark-theme .ai-chat-compaction-banner__close {
4728
+ color: #e2e8f0;
4729
+ }
4730
+ .dark-theme .ai-chat-compaction-banner__close:hover {
4731
+ background: rgba(226, 232, 240, 0.12);
4732
+ }
4296
4733
  @keyframes slideDown {
4297
4734
  from {
4298
4735
  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 };