@aparte/core 1.5.0 → 1.7.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/client/agent-runner.d.ts.map +1 -1
- package/dist/client/aparte-client.d.ts +6 -0
- package/dist/client/aparte-client.d.ts.map +1 -1
- package/dist/client/stream-adapter.d.ts +72 -2
- package/dist/client/stream-adapter.d.ts.map +1 -1
- package/dist/client/wire-history.d.ts +5 -2
- package/dist/client/wire-history.d.ts.map +1 -1
- package/dist/components/bubble/aparte-chat-bubble.d.ts +15 -1
- package/dist/components/bubble/aparte-chat-bubble.d.ts.map +1 -1
- package/dist/components/conversation-list/aparte-conversation-list.d.ts +46 -22
- package/dist/components/conversation-list/aparte-conversation-list.d.ts.map +1 -1
- package/dist/components/viewport/aparte-chat-viewport.d.ts +10 -0
- package/dist/components/viewport/aparte-chat-viewport.d.ts.map +1 -1
- package/dist/config/aparte-config.d.ts +112 -4
- package/dist/config/aparte-config.d.ts.map +1 -1
- package/dist/config/bubble-shell-renderer.d.ts +3 -0
- package/dist/config/bubble-shell-renderer.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/locale.d.ts +9 -0
- package/dist/config/locale.d.ts.map +1 -1
- package/dist/custom-elements.json +1233 -77
- package/dist/{defer-hydration-lK-7XQXf.js → defer-hydration-o5MFsc_Z.js} +730 -237
- package/dist/defer-hydration-o5MFsc_Z.js.map +1 -0
- package/dist/elicitation/panel.d.ts.map +1 -1
- package/dist/host/aparte-chat-host.d.ts +8 -0
- package/dist/host/aparte-chat-host.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +278 -211
- package/dist/index.js.map +1 -1
- package/dist/index.node.d.ts +11 -3
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.js +46 -36
- package/dist/index.node.js.map +1 -1
- package/dist/kit-keyboard-BUSLQ5i4.js +434 -0
- package/dist/kit-keyboard-BUSLQ5i4.js.map +1 -0
- package/dist/renderers/segment-renderers.d.ts.map +1 -1
- package/dist/renderers/segments/activity.d.ts +5 -0
- package/dist/renderers/segments/activity.d.ts.map +1 -0
- package/dist/renderers/segments/tool-call.d.ts.map +1 -1
- package/dist/transport/agent-handler.d.ts.map +1 -1
- package/dist/types/chat.d.ts +22 -0
- package/dist/types/chat.d.ts.map +1 -1
- package/dist/types/event-map.d.ts +4 -0
- package/dist/types/event-map.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/segments.d.ts +53 -1
- package/dist/types/segments.d.ts.map +1 -1
- package/dist/types/tools.d.ts +67 -1
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/menu.d.ts +90 -0
- package/dist/utils/menu.d.ts.map +1 -0
- package/dist/utils/segment-list.d.ts +49 -0
- package/dist/utils/segment-list.d.ts.map +1 -0
- package/dist/utils/tabs.d.ts +49 -0
- package/dist/utils/tabs.d.ts.map +1 -0
- package/dist/utils/tool-line.d.ts +36 -9
- package/dist/utils/tool-line.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/defer-hydration-lK-7XQXf.js.map +0 -1
|
@@ -313,6 +313,22 @@
|
|
|
313
313
|
"module": "./types/index.js"
|
|
314
314
|
}
|
|
315
315
|
},
|
|
316
|
+
{
|
|
317
|
+
"kind": "js",
|
|
318
|
+
"name": "AparteActivitySegment",
|
|
319
|
+
"declaration": {
|
|
320
|
+
"name": "AparteActivitySegment",
|
|
321
|
+
"module": "./types/index.js"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"kind": "js",
|
|
326
|
+
"name": "AparteActivityRenderer",
|
|
327
|
+
"declaration": {
|
|
328
|
+
"name": "AparteActivityRenderer",
|
|
329
|
+
"module": "./types/index.js"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
316
332
|
{
|
|
317
333
|
"kind": "js",
|
|
318
334
|
"name": "AparteSegmentBase",
|
|
@@ -793,6 +809,14 @@
|
|
|
793
809
|
"module": "./types/index.js"
|
|
794
810
|
}
|
|
795
811
|
},
|
|
812
|
+
{
|
|
813
|
+
"kind": "js",
|
|
814
|
+
"name": "AparteToolRun",
|
|
815
|
+
"declaration": {
|
|
816
|
+
"name": "AparteToolRun",
|
|
817
|
+
"module": "./types/index.js"
|
|
818
|
+
}
|
|
819
|
+
},
|
|
796
820
|
{
|
|
797
821
|
"kind": "js",
|
|
798
822
|
"name": "AparteToolRenderer",
|
|
@@ -841,6 +865,22 @@
|
|
|
841
865
|
"module": "./types/index.js"
|
|
842
866
|
}
|
|
843
867
|
},
|
|
868
|
+
{
|
|
869
|
+
"kind": "js",
|
|
870
|
+
"name": "AparteToolLine",
|
|
871
|
+
"declaration": {
|
|
872
|
+
"name": "AparteToolLine",
|
|
873
|
+
"module": "./types/index.js"
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"kind": "js",
|
|
878
|
+
"name": "AparteToolLineOpen",
|
|
879
|
+
"declaration": {
|
|
880
|
+
"name": "AparteToolLineOpen",
|
|
881
|
+
"module": "./types/index.js"
|
|
882
|
+
}
|
|
883
|
+
},
|
|
844
884
|
{
|
|
845
885
|
"kind": "js",
|
|
846
886
|
"name": "AparteToolCallView",
|
|
@@ -2017,6 +2057,14 @@
|
|
|
2017
2057
|
"module": "./config/index.js"
|
|
2018
2058
|
}
|
|
2019
2059
|
},
|
|
2060
|
+
{
|
|
2061
|
+
"kind": "js",
|
|
2062
|
+
"name": "onRenderersChange",
|
|
2063
|
+
"declaration": {
|
|
2064
|
+
"name": "onRenderersChange",
|
|
2065
|
+
"module": "./config/index.js"
|
|
2066
|
+
}
|
|
2067
|
+
},
|
|
2020
2068
|
{
|
|
2021
2069
|
"kind": "js",
|
|
2022
2070
|
"name": "AparteConfigChangeEventDetail",
|
|
@@ -2449,6 +2497,38 @@
|
|
|
2449
2497
|
"module": "./client/stream-adapter.js"
|
|
2450
2498
|
}
|
|
2451
2499
|
},
|
|
2500
|
+
{
|
|
2501
|
+
"kind": "js",
|
|
2502
|
+
"name": "runSubAgent",
|
|
2503
|
+
"declaration": {
|
|
2504
|
+
"name": "runSubAgent",
|
|
2505
|
+
"module": "./client/stream-adapter.js"
|
|
2506
|
+
}
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
"kind": "js",
|
|
2510
|
+
"name": "startSubAgent",
|
|
2511
|
+
"declaration": {
|
|
2512
|
+
"name": "startSubAgent",
|
|
2513
|
+
"module": "./client/stream-adapter.js"
|
|
2514
|
+
}
|
|
2515
|
+
},
|
|
2516
|
+
{
|
|
2517
|
+
"kind": "js",
|
|
2518
|
+
"name": "AparteRunEventContext",
|
|
2519
|
+
"declaration": {
|
|
2520
|
+
"name": "AparteRunEventContext",
|
|
2521
|
+
"module": "./config/aparte-config.js"
|
|
2522
|
+
}
|
|
2523
|
+
},
|
|
2524
|
+
{
|
|
2525
|
+
"kind": "js",
|
|
2526
|
+
"name": "AparteRunEventObserver",
|
|
2527
|
+
"declaration": {
|
|
2528
|
+
"name": "AparteRunEventObserver",
|
|
2529
|
+
"module": "./config/aparte-config.js"
|
|
2530
|
+
}
|
|
2531
|
+
},
|
|
2452
2532
|
{
|
|
2453
2533
|
"kind": "js",
|
|
2454
2534
|
"name": "createAgentStreamRunner",
|
|
@@ -2617,6 +2697,70 @@
|
|
|
2617
2697
|
"module": "./utils/place-floating.js"
|
|
2618
2698
|
}
|
|
2619
2699
|
},
|
|
2700
|
+
{
|
|
2701
|
+
"kind": "js",
|
|
2702
|
+
"name": "enhanceMenu",
|
|
2703
|
+
"declaration": {
|
|
2704
|
+
"name": "enhanceMenu",
|
|
2705
|
+
"module": "./utils/menu.js"
|
|
2706
|
+
}
|
|
2707
|
+
},
|
|
2708
|
+
{
|
|
2709
|
+
"kind": "js",
|
|
2710
|
+
"name": "enhanceContextMenu",
|
|
2711
|
+
"declaration": {
|
|
2712
|
+
"name": "enhanceContextMenu",
|
|
2713
|
+
"module": "./utils/menu.js"
|
|
2714
|
+
}
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
"kind": "js",
|
|
2718
|
+
"name": "AparteMenuOptions",
|
|
2719
|
+
"declaration": {
|
|
2720
|
+
"name": "AparteMenuOptions",
|
|
2721
|
+
"module": "./utils/menu.js"
|
|
2722
|
+
}
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
"kind": "js",
|
|
2726
|
+
"name": "AparteContextMenuOptions",
|
|
2727
|
+
"declaration": {
|
|
2728
|
+
"name": "AparteContextMenuOptions",
|
|
2729
|
+
"module": "./utils/menu.js"
|
|
2730
|
+
}
|
|
2731
|
+
},
|
|
2732
|
+
{
|
|
2733
|
+
"kind": "js",
|
|
2734
|
+
"name": "AparteMenuSelectDetail",
|
|
2735
|
+
"declaration": {
|
|
2736
|
+
"name": "AparteMenuSelectDetail",
|
|
2737
|
+
"module": "./utils/menu.js"
|
|
2738
|
+
}
|
|
2739
|
+
},
|
|
2740
|
+
{
|
|
2741
|
+
"kind": "js",
|
|
2742
|
+
"name": "enhanceTabs",
|
|
2743
|
+
"declaration": {
|
|
2744
|
+
"name": "enhanceTabs",
|
|
2745
|
+
"module": "./utils/tabs.js"
|
|
2746
|
+
}
|
|
2747
|
+
},
|
|
2748
|
+
{
|
|
2749
|
+
"kind": "js",
|
|
2750
|
+
"name": "AparteTabsOptions",
|
|
2751
|
+
"declaration": {
|
|
2752
|
+
"name": "AparteTabsOptions",
|
|
2753
|
+
"module": "./utils/tabs.js"
|
|
2754
|
+
}
|
|
2755
|
+
},
|
|
2756
|
+
{
|
|
2757
|
+
"kind": "js",
|
|
2758
|
+
"name": "AparteTabChangeDetail",
|
|
2759
|
+
"declaration": {
|
|
2760
|
+
"name": "AparteTabChangeDetail",
|
|
2761
|
+
"module": "./utils/tabs.js"
|
|
2762
|
+
}
|
|
2763
|
+
},
|
|
2620
2764
|
{
|
|
2621
2765
|
"kind": "js",
|
|
2622
2766
|
"name": "uuid",
|
|
@@ -2657,6 +2801,38 @@
|
|
|
2657
2801
|
"module": "./utils/segments.js"
|
|
2658
2802
|
}
|
|
2659
2803
|
},
|
|
2804
|
+
{
|
|
2805
|
+
"kind": "js",
|
|
2806
|
+
"name": "createSegmentList",
|
|
2807
|
+
"declaration": {
|
|
2808
|
+
"name": "createSegmentList",
|
|
2809
|
+
"module": "./utils/segment-list.js"
|
|
2810
|
+
}
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
"kind": "js",
|
|
2814
|
+
"name": "AparteSegmentList",
|
|
2815
|
+
"declaration": {
|
|
2816
|
+
"name": "AparteSegmentList",
|
|
2817
|
+
"module": "./utils/segment-list.js"
|
|
2818
|
+
}
|
|
2819
|
+
},
|
|
2820
|
+
{
|
|
2821
|
+
"kind": "js",
|
|
2822
|
+
"name": "pluralize",
|
|
2823
|
+
"declaration": {
|
|
2824
|
+
"name": "pluralize",
|
|
2825
|
+
"module": "./utils/plural.js"
|
|
2826
|
+
}
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
"kind": "js",
|
|
2830
|
+
"name": "formatDuration",
|
|
2831
|
+
"declaration": {
|
|
2832
|
+
"name": "formatDuration",
|
|
2833
|
+
"module": "./utils/format-duration.js"
|
|
2834
|
+
}
|
|
2835
|
+
},
|
|
2660
2836
|
{
|
|
2661
2837
|
"kind": "js",
|
|
2662
2838
|
"name": "AparteHostHandlersConfig",
|
|
@@ -3195,6 +3371,22 @@
|
|
|
3195
3371
|
"module": "./types/index.js"
|
|
3196
3372
|
}
|
|
3197
3373
|
},
|
|
3374
|
+
{
|
|
3375
|
+
"kind": "js",
|
|
3376
|
+
"name": "AparteActivitySegment",
|
|
3377
|
+
"declaration": {
|
|
3378
|
+
"name": "AparteActivitySegment",
|
|
3379
|
+
"module": "./types/index.js"
|
|
3380
|
+
}
|
|
3381
|
+
},
|
|
3382
|
+
{
|
|
3383
|
+
"kind": "js",
|
|
3384
|
+
"name": "AparteActivityRenderer",
|
|
3385
|
+
"declaration": {
|
|
3386
|
+
"name": "AparteActivityRenderer",
|
|
3387
|
+
"module": "./types/index.js"
|
|
3388
|
+
}
|
|
3389
|
+
},
|
|
3198
3390
|
{
|
|
3199
3391
|
"kind": "js",
|
|
3200
3392
|
"name": "AparteSegmentBase",
|
|
@@ -3675,6 +3867,14 @@
|
|
|
3675
3867
|
"module": "./types/index.js"
|
|
3676
3868
|
}
|
|
3677
3869
|
},
|
|
3870
|
+
{
|
|
3871
|
+
"kind": "js",
|
|
3872
|
+
"name": "AparteToolRun",
|
|
3873
|
+
"declaration": {
|
|
3874
|
+
"name": "AparteToolRun",
|
|
3875
|
+
"module": "./types/index.js"
|
|
3876
|
+
}
|
|
3877
|
+
},
|
|
3678
3878
|
{
|
|
3679
3879
|
"kind": "js",
|
|
3680
3880
|
"name": "AparteToolRenderer",
|
|
@@ -3723,6 +3923,22 @@
|
|
|
3723
3923
|
"module": "./types/index.js"
|
|
3724
3924
|
}
|
|
3725
3925
|
},
|
|
3926
|
+
{
|
|
3927
|
+
"kind": "js",
|
|
3928
|
+
"name": "AparteToolLine",
|
|
3929
|
+
"declaration": {
|
|
3930
|
+
"name": "AparteToolLine",
|
|
3931
|
+
"module": "./types/index.js"
|
|
3932
|
+
}
|
|
3933
|
+
},
|
|
3934
|
+
{
|
|
3935
|
+
"kind": "js",
|
|
3936
|
+
"name": "AparteToolLineOpen",
|
|
3937
|
+
"declaration": {
|
|
3938
|
+
"name": "AparteToolLineOpen",
|
|
3939
|
+
"module": "./types/index.js"
|
|
3940
|
+
}
|
|
3941
|
+
},
|
|
3726
3942
|
{
|
|
3727
3943
|
"kind": "js",
|
|
3728
3944
|
"name": "AparteToolCallView",
|
|
@@ -4715,6 +4931,14 @@
|
|
|
4715
4931
|
"module": "./config/index.js"
|
|
4716
4932
|
}
|
|
4717
4933
|
},
|
|
4934
|
+
{
|
|
4935
|
+
"kind": "js",
|
|
4936
|
+
"name": "onRenderersChange",
|
|
4937
|
+
"declaration": {
|
|
4938
|
+
"name": "onRenderersChange",
|
|
4939
|
+
"module": "./config/index.js"
|
|
4940
|
+
}
|
|
4941
|
+
},
|
|
4718
4942
|
{
|
|
4719
4943
|
"kind": "js",
|
|
4720
4944
|
"name": "AparteConfigChangeEventDetail",
|
|
@@ -5195,6 +5419,70 @@
|
|
|
5195
5419
|
"module": "./utils/place-floating.js"
|
|
5196
5420
|
}
|
|
5197
5421
|
},
|
|
5422
|
+
{
|
|
5423
|
+
"kind": "js",
|
|
5424
|
+
"name": "enhanceMenu",
|
|
5425
|
+
"declaration": {
|
|
5426
|
+
"name": "enhanceMenu",
|
|
5427
|
+
"module": "./utils/menu.js"
|
|
5428
|
+
}
|
|
5429
|
+
},
|
|
5430
|
+
{
|
|
5431
|
+
"kind": "js",
|
|
5432
|
+
"name": "enhanceContextMenu",
|
|
5433
|
+
"declaration": {
|
|
5434
|
+
"name": "enhanceContextMenu",
|
|
5435
|
+
"module": "./utils/menu.js"
|
|
5436
|
+
}
|
|
5437
|
+
},
|
|
5438
|
+
{
|
|
5439
|
+
"kind": "js",
|
|
5440
|
+
"name": "AparteMenuOptions",
|
|
5441
|
+
"declaration": {
|
|
5442
|
+
"name": "AparteMenuOptions",
|
|
5443
|
+
"module": "./utils/menu.js"
|
|
5444
|
+
}
|
|
5445
|
+
},
|
|
5446
|
+
{
|
|
5447
|
+
"kind": "js",
|
|
5448
|
+
"name": "AparteContextMenuOptions",
|
|
5449
|
+
"declaration": {
|
|
5450
|
+
"name": "AparteContextMenuOptions",
|
|
5451
|
+
"module": "./utils/menu.js"
|
|
5452
|
+
}
|
|
5453
|
+
},
|
|
5454
|
+
{
|
|
5455
|
+
"kind": "js",
|
|
5456
|
+
"name": "AparteMenuSelectDetail",
|
|
5457
|
+
"declaration": {
|
|
5458
|
+
"name": "AparteMenuSelectDetail",
|
|
5459
|
+
"module": "./utils/menu.js"
|
|
5460
|
+
}
|
|
5461
|
+
},
|
|
5462
|
+
{
|
|
5463
|
+
"kind": "js",
|
|
5464
|
+
"name": "enhanceTabs",
|
|
5465
|
+
"declaration": {
|
|
5466
|
+
"name": "enhanceTabs",
|
|
5467
|
+
"module": "./utils/tabs.js"
|
|
5468
|
+
}
|
|
5469
|
+
},
|
|
5470
|
+
{
|
|
5471
|
+
"kind": "js",
|
|
5472
|
+
"name": "AparteTabsOptions",
|
|
5473
|
+
"declaration": {
|
|
5474
|
+
"name": "AparteTabsOptions",
|
|
5475
|
+
"module": "./utils/tabs.js"
|
|
5476
|
+
}
|
|
5477
|
+
},
|
|
5478
|
+
{
|
|
5479
|
+
"kind": "js",
|
|
5480
|
+
"name": "AparteTabChangeDetail",
|
|
5481
|
+
"declaration": {
|
|
5482
|
+
"name": "AparteTabChangeDetail",
|
|
5483
|
+
"module": "./utils/tabs.js"
|
|
5484
|
+
}
|
|
5485
|
+
},
|
|
5198
5486
|
{
|
|
5199
5487
|
"kind": "js",
|
|
5200
5488
|
"name": "uuid",
|
|
@@ -5235,6 +5523,38 @@
|
|
|
5235
5523
|
"module": "./utils/segments.js"
|
|
5236
5524
|
}
|
|
5237
5525
|
},
|
|
5526
|
+
{
|
|
5527
|
+
"kind": "js",
|
|
5528
|
+
"name": "createSegmentList",
|
|
5529
|
+
"declaration": {
|
|
5530
|
+
"name": "createSegmentList",
|
|
5531
|
+
"module": "./utils/segment-list.js"
|
|
5532
|
+
}
|
|
5533
|
+
},
|
|
5534
|
+
{
|
|
5535
|
+
"kind": "js",
|
|
5536
|
+
"name": "AparteSegmentList",
|
|
5537
|
+
"declaration": {
|
|
5538
|
+
"name": "AparteSegmentList",
|
|
5539
|
+
"module": "./utils/segment-list.js"
|
|
5540
|
+
}
|
|
5541
|
+
},
|
|
5542
|
+
{
|
|
5543
|
+
"kind": "js",
|
|
5544
|
+
"name": "pluralize",
|
|
5545
|
+
"declaration": {
|
|
5546
|
+
"name": "pluralize",
|
|
5547
|
+
"module": "./utils/plural.js"
|
|
5548
|
+
}
|
|
5549
|
+
},
|
|
5550
|
+
{
|
|
5551
|
+
"kind": "js",
|
|
5552
|
+
"name": "formatDuration",
|
|
5553
|
+
"declaration": {
|
|
5554
|
+
"name": "formatDuration",
|
|
5555
|
+
"module": "./utils/format-duration.js"
|
|
5556
|
+
}
|
|
5557
|
+
},
|
|
5238
5558
|
{
|
|
5239
5559
|
"kind": "js",
|
|
5240
5560
|
"name": "AparteHostHandlersConfig",
|
|
@@ -5291,6 +5611,38 @@
|
|
|
5291
5611
|
"module": "./client/stream-adapter.js"
|
|
5292
5612
|
}
|
|
5293
5613
|
},
|
|
5614
|
+
{
|
|
5615
|
+
"kind": "js",
|
|
5616
|
+
"name": "runSubAgent",
|
|
5617
|
+
"declaration": {
|
|
5618
|
+
"name": "runSubAgent",
|
|
5619
|
+
"module": "./client/stream-adapter.js"
|
|
5620
|
+
}
|
|
5621
|
+
},
|
|
5622
|
+
{
|
|
5623
|
+
"kind": "js",
|
|
5624
|
+
"name": "startSubAgent",
|
|
5625
|
+
"declaration": {
|
|
5626
|
+
"name": "startSubAgent",
|
|
5627
|
+
"module": "./client/stream-adapter.js"
|
|
5628
|
+
}
|
|
5629
|
+
},
|
|
5630
|
+
{
|
|
5631
|
+
"kind": "js",
|
|
5632
|
+
"name": "AparteRunEventContext",
|
|
5633
|
+
"declaration": {
|
|
5634
|
+
"name": "AparteRunEventContext",
|
|
5635
|
+
"module": "./config/aparte-config.js"
|
|
5636
|
+
}
|
|
5637
|
+
},
|
|
5638
|
+
{
|
|
5639
|
+
"kind": "js",
|
|
5640
|
+
"name": "AparteRunEventObserver",
|
|
5641
|
+
"declaration": {
|
|
5642
|
+
"name": "AparteRunEventObserver",
|
|
5643
|
+
"module": "./config/aparte-config.js"
|
|
5644
|
+
}
|
|
5645
|
+
},
|
|
5294
5646
|
{
|
|
5295
5647
|
"kind": "js",
|
|
5296
5648
|
"name": "createAgentStreamRunner",
|
|
@@ -5939,7 +6291,7 @@
|
|
|
5939
6291
|
{
|
|
5940
6292
|
"name": "event",
|
|
5941
6293
|
"type": {
|
|
5942
|
-
"text": "{ id: string; name: string; input: Record<string, unknown
|
|
6294
|
+
"text": "{ id: string; name: string; input: Record<string, unknown>; agent?: { id: string; name?: string } }"
|
|
5943
6295
|
}
|
|
5944
6296
|
},
|
|
5945
6297
|
{
|
|
@@ -6068,6 +6420,14 @@
|
|
|
6068
6420
|
"default": "new Set<string>()",
|
|
6069
6421
|
"description": "Replies a turn is running into right now, a pause it waits on included: a second\nload of their conversation must not start them again (`resumeDeferred`)."
|
|
6070
6422
|
},
|
|
6423
|
+
{
|
|
6424
|
+
"kind": "field",
|
|
6425
|
+
"name": "_agentNames",
|
|
6426
|
+
"privacy": "private",
|
|
6427
|
+
"readonly": true,
|
|
6428
|
+
"default": "new Map<string, Map<string, string>>()",
|
|
6429
|
+
"description": "The name of each sub-agent of a turn in flight, by reply then `agentId`, as its\n`agent-start` gave it: what a paused run's question says about who asks. A pending\ncall carries only an `agentId`. Lives as long as the turn, never on the message."
|
|
6430
|
+
},
|
|
6071
6431
|
{
|
|
6072
6432
|
"kind": "method",
|
|
6073
6433
|
"name": "_toolsForCurrentModel",
|
|
@@ -6649,6 +7009,12 @@
|
|
|
6649
7009
|
"text": "AparteChatTargetElement"
|
|
6650
7010
|
}
|
|
6651
7011
|
},
|
|
7012
|
+
{
|
|
7013
|
+
"name": "messageId",
|
|
7014
|
+
"type": {
|
|
7015
|
+
"text": "string"
|
|
7016
|
+
}
|
|
7017
|
+
},
|
|
6652
7018
|
{
|
|
6653
7019
|
"name": "pending",
|
|
6654
7020
|
"type": {
|
|
@@ -6698,7 +7064,7 @@
|
|
|
6698
7064
|
{
|
|
6699
7065
|
"name": "call",
|
|
6700
7066
|
"type": {
|
|
6701
|
-
"text": "AparteToolCall"
|
|
7067
|
+
"text": "AparteToolCall & Pick<Parameters<StreamApprovalResolver>[0], 'agent'>"
|
|
6702
7068
|
}
|
|
6703
7069
|
},
|
|
6704
7070
|
{
|
|
@@ -7015,6 +7381,24 @@
|
|
|
7015
7381
|
"default": "engineToolRefusal",
|
|
7016
7382
|
"description": "What a refused tool call tells the model, and who refused it — engine's `toolRefusal`,\nunder core's roof. `reason` is the sentence the model reads (the refuser's own, else\nthe person's words quoted, else \"Tool execution was rejected by the user.\"); `by` and\n`instruction` are what a row shows the person.\n\nFor a runner that answers an agent the loop does not run (an AG-UI agent, a server):\nit writes the sentence the loop writes, so the model reads one refusal however it ran."
|
|
7017
7383
|
},
|
|
7384
|
+
{
|
|
7385
|
+
"kind": "variable",
|
|
7386
|
+
"name": "runSubAgent",
|
|
7387
|
+
"type": {
|
|
7388
|
+
"text": "typeof engineRunSubAgent"
|
|
7389
|
+
},
|
|
7390
|
+
"default": "engineRunSubAgent",
|
|
7391
|
+
"description": "Run a sub-agent from inside a tool handler — engine's `runSubAgent`, under core's roof.\n`run` is the handler's `context.run`, `signal` its second argument; `request` is the\nsub-agent's own conversation. Its events reach the page as the sub-agent's: kept out of\nthe reply, and handed to the observers of AparteConfig.observeRunEvents.\n\nResolves `{ status, text }` and never rejects for a sub-agent that failed, so the tool\ndecides what the model reads. A handler called without a run (a browser tool answering\na paused server run) has nothing to open one from, and rejects with a clear error."
|
|
7392
|
+
},
|
|
7393
|
+
{
|
|
7394
|
+
"kind": "variable",
|
|
7395
|
+
"name": "startSubAgent",
|
|
7396
|
+
"type": {
|
|
7397
|
+
"text": "typeof engineStartSubAgent"
|
|
7398
|
+
},
|
|
7399
|
+
"default": "engineStartSubAgent",
|
|
7400
|
+
"description": "Start a sub-agent in the background, from inside a tool handler — engine's `startSubAgent`.\nThe handler answers at once and the model goes on, writing and calling tools, while the\nsub-agent works on its own line; the reply does not end before it is back. Once the model\nhas nothing more to say, the loop waits for the sub-agents still at work, tells the model\nhow each ended, and asks it again. A Stop, a pause of the run, the turn limit or a crash\nstop it."
|
|
7401
|
+
},
|
|
7018
7402
|
{
|
|
7019
7403
|
"kind": "function",
|
|
7020
7404
|
"name": "createStreamAdapter",
|
|
@@ -7033,6 +7417,11 @@
|
|
|
7033
7417
|
],
|
|
7034
7418
|
"description": "Build the event → DOM adapter for one streamed message. Returns a synchronous\nAparteStreamRunEmitter to hand to `runStreamAgent` as its `emitter`.\nReproduces the inline loop's `targetElement.*` call sequence exactly (validated\nby the engine parity test against the real loop)."
|
|
7035
7419
|
},
|
|
7420
|
+
{
|
|
7421
|
+
"kind": "variable",
|
|
7422
|
+
"name": "id",
|
|
7423
|
+
"default": "`tool-${toolCallId}`"
|
|
7424
|
+
},
|
|
7036
7425
|
{
|
|
7037
7426
|
"kind": "function",
|
|
7038
7427
|
"name": "readableToAsyncIterable",
|
|
@@ -7067,6 +7456,22 @@
|
|
|
7067
7456
|
"module": "src/client/stream-adapter.ts"
|
|
7068
7457
|
}
|
|
7069
7458
|
},
|
|
7459
|
+
{
|
|
7460
|
+
"kind": "js",
|
|
7461
|
+
"name": "runSubAgent",
|
|
7462
|
+
"declaration": {
|
|
7463
|
+
"name": "runSubAgent",
|
|
7464
|
+
"module": "src/client/stream-adapter.ts"
|
|
7465
|
+
}
|
|
7466
|
+
},
|
|
7467
|
+
{
|
|
7468
|
+
"kind": "js",
|
|
7469
|
+
"name": "startSubAgent",
|
|
7470
|
+
"declaration": {
|
|
7471
|
+
"name": "startSubAgent",
|
|
7472
|
+
"module": "src/client/stream-adapter.ts"
|
|
7473
|
+
}
|
|
7474
|
+
},
|
|
7070
7475
|
{
|
|
7071
7476
|
"kind": "js",
|
|
7072
7477
|
"name": "createStreamAdapter",
|
|
@@ -7195,7 +7600,7 @@
|
|
|
7195
7600
|
"name": "options",
|
|
7196
7601
|
"default": "{}",
|
|
7197
7602
|
"type": {
|
|
7198
|
-
"text": "{\n /**\n * Leave this message's paused calls unanswered: the request that RESUMES them
|
|
7603
|
+
"text": "{\n /**\n * Leave this message's paused calls unanswered — and its calls still running: the\n * request that RESUMES them sends the envelope with those calls open, for the\n * server to answer them.\n */\n openDeferred?: boolean;\n }"
|
|
7199
7604
|
}
|
|
7200
7605
|
}
|
|
7201
7606
|
],
|
|
@@ -7235,7 +7640,7 @@
|
|
|
7235
7640
|
}
|
|
7236
7641
|
}
|
|
7237
7642
|
],
|
|
7238
|
-
"description": "Segments → the text a model can read back.\n\nFences and the language tag are kept. Without them the model re-reads its own\ncode as prose — which is how it starts explaining a snippet it believes it\nwrote in English.\n\nA type core does not know — a registered block grammar's (an artifact, a\ncitation, a file), a consumer's custom segment — follows one rule: its\n`content` if it has one, else its `fallback`, else nothing. Dropping such a\nsegment would make a document the model had just produced invisible on the very\nnext turn, so it could not be asked to change the thing it had built. An artifact\nis a plugin's type like any other and follows this rule. Such a segment may also say\nwhat goes around its content (`wire`): the tag a grammar read it from, with the id the\nmodel needs to name it again.\n\n`thinking` and `tool_call` stay out on purpose — the first is the model's own\nscratchpad, and most APIs neither want it back nor bill for it kindly; the\nsecond is not text: `wireMessages` sends a reply's calls as the assistant's\n`toolCalls` and the `tool` messages answering them (`wireTurns`)."
|
|
7643
|
+
"description": "Segments → the text a model can read back.\n\nFences and the language tag are kept. Without them the model re-reads its own\ncode as prose — which is how it starts explaining a snippet it believes it\nwrote in English.\n\nA type core does not know — a registered block grammar's (an artifact, a\ncitation, a file), a consumer's custom segment — follows one rule: its\n`content` if it has one, else its `fallback`, else nothing. Dropping such a\nsegment would make a document the model had just produced invisible on the very\nnext turn, so it could not be asked to change the thing it had built. An artifact\nis a plugin's type like any other and follows this rule. Such a segment may also say\nwhat goes around its content (`wire`): the tag a grammar read it from, with the id the\nmodel needs to name it again.\n\n`activity` stays out too: it is progress shown to a person, and its content the agent's data.\n\n`thinking` and `tool_call` stay out on purpose — the first is the model's own\nscratchpad, and most APIs neither want it back nor bill for it kindly; the\nsecond is not text: `wireMessages` sends a reply's calls as the assistant's\n`toolCalls` and the `tool` messages answering them (`wireTurns`)."
|
|
7239
7644
|
},
|
|
7240
7645
|
{
|
|
7241
7646
|
"kind": "function",
|
|
@@ -7808,7 +8213,8 @@
|
|
|
7808
8213
|
"text": "(cfg: AparteConfig) => void"
|
|
7809
8214
|
}
|
|
7810
8215
|
}
|
|
7811
|
-
]
|
|
8216
|
+
],
|
|
8217
|
+
"description": "Hear when a segment, tool or activity renderer is registered, overridden or taken off, with\nthe config it changed on — once per config per microtask, however many changed. Returns the\nfunction that stops listening.\n\nFor a row loop written outside `<aparte-chat-bubble>` (a sub-agent's conversation, a panel\nthat draws segments): the bubble redraws the rows whose renderer changed, and a loop of\nyour own does the same from here. Not called for any other change of the config."
|
|
7812
8218
|
},
|
|
7813
8219
|
{
|
|
7814
8220
|
"kind": "function",
|
|
@@ -8197,6 +8603,23 @@
|
|
|
8197
8603
|
"privacy": "private",
|
|
8198
8604
|
"default": "new ToolTable<AparteToolDisplay>()"
|
|
8199
8605
|
},
|
|
8606
|
+
{
|
|
8607
|
+
"kind": "field",
|
|
8608
|
+
"name": "_activityRenderers",
|
|
8609
|
+
"privacy": "private",
|
|
8610
|
+
"default": "new Map<string, AparteActivityRenderer>()",
|
|
8611
|
+
"description": "By activity type — see registerActivityRenderer."
|
|
8612
|
+
},
|
|
8613
|
+
{
|
|
8614
|
+
"kind": "field",
|
|
8615
|
+
"name": "_toolLineProvider",
|
|
8616
|
+
"type": {
|
|
8617
|
+
"text": "((segment: AparteToolCallSegment) => AparteToolLine | undefined) | null"
|
|
8618
|
+
},
|
|
8619
|
+
"privacy": "private",
|
|
8620
|
+
"default": "null",
|
|
8621
|
+
"description": "What a plugin says about a call, read after the app's display — see setToolLineProvider."
|
|
8622
|
+
},
|
|
8200
8623
|
{
|
|
8201
8624
|
"kind": "field",
|
|
8202
8625
|
"name": "_streamBlocks",
|
|
@@ -8216,6 +8639,16 @@
|
|
|
8216
8639
|
"privacy": "private",
|
|
8217
8640
|
"default": "new Map()"
|
|
8218
8641
|
},
|
|
8642
|
+
{
|
|
8643
|
+
"kind": "field",
|
|
8644
|
+
"name": "_runEventObservers",
|
|
8645
|
+
"type": {
|
|
8646
|
+
"text": "Array<{ fn: AparteRunEventObserver }>"
|
|
8647
|
+
},
|
|
8648
|
+
"privacy": "private",
|
|
8649
|
+
"default": "[]",
|
|
8650
|
+
"description": "One entry per registration, so each remover takes back its own — see observeRunEvents."
|
|
8651
|
+
},
|
|
8219
8652
|
{
|
|
8220
8653
|
"kind": "field",
|
|
8221
8654
|
"name": "_hostHandlers",
|
|
@@ -9837,6 +10270,51 @@
|
|
|
9837
10270
|
],
|
|
9838
10271
|
"description": "Unregister the renderer registered under this matcher. Calls on screen it drew go back to core's row."
|
|
9839
10272
|
},
|
|
10273
|
+
{
|
|
10274
|
+
"kind": "method",
|
|
10275
|
+
"name": "registerActivityRenderer",
|
|
10276
|
+
"return": {
|
|
10277
|
+
"type": {
|
|
10278
|
+
"text": "() => void"
|
|
10279
|
+
}
|
|
10280
|
+
},
|
|
10281
|
+
"parameters": [
|
|
10282
|
+
{
|
|
10283
|
+
"name": "activityType",
|
|
10284
|
+
"type": {
|
|
10285
|
+
"text": "string"
|
|
10286
|
+
}
|
|
10287
|
+
},
|
|
10288
|
+
{
|
|
10289
|
+
"name": "renderer",
|
|
10290
|
+
"type": {
|
|
10291
|
+
"text": "AparteActivityRenderer"
|
|
10292
|
+
}
|
|
10293
|
+
}
|
|
10294
|
+
],
|
|
10295
|
+
"description": "Draw one type of agent activity — the structured progress an agent reports while it\nworks (\"3 of 5 sources read\"), which reaches the reply as an `activity` segment and is\nupdated in place each time the agent sends it again. Returns the function that takes\nthis renderer off again (it changes nothing once another one has replaced it).\n\nAn activity with no renderer for its type is kept on the message and draws nothing:\nno row, no room, no orphan header on a turn that holds nothing else. It is never sent\nto the model either way. Activities already on screen follow a registration.",
|
|
10296
|
+
"examples": [
|
|
10297
|
+
"const off = aparteGlobalConfig.registerActivityRenderer('search-progress', {\n render: (segment) => {\n const el = document.createElement('p');\n const { read, of } = segment.content as { read: number; of: number };\n el.textContent = `${read} of ${of} sources read`;\n return el;\n },\n update: (el, segment) => {\n const { read, of } = segment.content as { read: number; of: number };\n el.textContent = `${read} of ${of} sources read`;\n },\n});"
|
|
10298
|
+
]
|
|
10299
|
+
},
|
|
10300
|
+
{
|
|
10301
|
+
"kind": "method",
|
|
10302
|
+
"name": "getActivityRenderer",
|
|
10303
|
+
"return": {
|
|
10304
|
+
"type": {
|
|
10305
|
+
"text": "AparteActivityRenderer | undefined"
|
|
10306
|
+
}
|
|
10307
|
+
},
|
|
10308
|
+
"parameters": [
|
|
10309
|
+
{
|
|
10310
|
+
"name": "activityType",
|
|
10311
|
+
"type": {
|
|
10312
|
+
"text": "string"
|
|
10313
|
+
}
|
|
10314
|
+
}
|
|
10315
|
+
],
|
|
10316
|
+
"description": "The renderer registered for an activity type, or undefined."
|
|
10317
|
+
},
|
|
9840
10318
|
{
|
|
9841
10319
|
"kind": "method",
|
|
9842
10320
|
"name": "getToolRenderer",
|
|
@@ -9958,6 +10436,37 @@
|
|
|
9958
10436
|
],
|
|
9959
10437
|
"description": "Whether a tool's calls draw nothing: its display says `hidden`, and no renderer is\nregistered for it MORE specifically. A `'*'` hide therefore leaves a tool with its\nown renderer drawn (a plugin's receipt), while a hide as specific as the renderer\nwins — the app said so for that tool. A hidden call stays in the message, in storage\nand in the model's history; only its row is empty."
|
|
9960
10438
|
},
|
|
10439
|
+
{
|
|
10440
|
+
"kind": "method",
|
|
10441
|
+
"name": "setToolLineProvider",
|
|
10442
|
+
"return": {
|
|
10443
|
+
"type": {
|
|
10444
|
+
"text": "void"
|
|
10445
|
+
}
|
|
10446
|
+
},
|
|
10447
|
+
"parameters": [
|
|
10448
|
+
{
|
|
10449
|
+
"name": "provider",
|
|
10450
|
+
"type": {
|
|
10451
|
+
"text": "((segment: AparteToolCallSegment) => AparteToolLine | undefined) | null"
|
|
10452
|
+
}
|
|
10453
|
+
}
|
|
10454
|
+
],
|
|
10455
|
+
"description": "Say more about a call than its display does: what ran it, what it is doing now, a\nshort note after its state. For a plugin that knows a call from the inside — a\nsub-agent's line is the line of the call that opened it.\n\nOne provider per config; `null` removes it. It is consulted AFTER the app's display,\nfield by field, so the app always wins: `label` and `target` are read when the display\ngives none, `details` when the display has no `details` key. `activity`, a second\nline under the name, and `note` show in every state they are given: give `activity` for\nthe call's whole life, or never, or the row changes height. A function, called whenever the\nrow is drawn, updated or relabelled — never text stored on the segment — so its words\nfollow a language switch. One that throws, or returns nothing, leaves the default\nline. A chat with a config of its own and no provider reads aparteGlobalConfig's.",
|
|
10456
|
+
"examples": [
|
|
10457
|
+
"aparteGlobalConfig.setToolLineProvider((segment) =>\n segment.toolCall.name === 'delegate' ? { activity: 'Reading the parser', note: '3 tools' } : undefined);"
|
|
10458
|
+
]
|
|
10459
|
+
},
|
|
10460
|
+
{
|
|
10461
|
+
"kind": "method",
|
|
10462
|
+
"name": "getToolLineProvider",
|
|
10463
|
+
"return": {
|
|
10464
|
+
"type": {
|
|
10465
|
+
"text": "((segment: AparteToolCallSegment) => AparteToolLine | undefined) | null"
|
|
10466
|
+
}
|
|
10467
|
+
},
|
|
10468
|
+
"description": "The tool-line provider this config reads: its own, else the page's."
|
|
10469
|
+
},
|
|
9961
10470
|
{
|
|
9962
10471
|
"kind": "method",
|
|
9963
10472
|
"name": "_dropToolDisplayField",
|
|
@@ -10158,6 +10667,37 @@
|
|
|
10158
10667
|
},
|
|
10159
10668
|
"description": "The registered block grammars, in registration order."
|
|
10160
10669
|
},
|
|
10670
|
+
{
|
|
10671
|
+
"kind": "method",
|
|
10672
|
+
"name": "observeRunEvents",
|
|
10673
|
+
"return": {
|
|
10674
|
+
"type": {
|
|
10675
|
+
"text": "() => void"
|
|
10676
|
+
}
|
|
10677
|
+
},
|
|
10678
|
+
"parameters": [
|
|
10679
|
+
{
|
|
10680
|
+
"name": "observer",
|
|
10681
|
+
"type": {
|
|
10682
|
+
"text": "AparteRunEventObserver"
|
|
10683
|
+
}
|
|
10684
|
+
}
|
|
10685
|
+
],
|
|
10686
|
+
"description": "Hear every event of a reply's run, before the reply handles it — including the\nevents of its sub-agents, which the reply never draws: an event that carries an\n`agentId`, and `agent-start` / `agent-end`, are kept out of the reply whether anyone\nobserves them or not. This is how a plugin draws a sub-agent's conversation.\n\nA chat hears the observers of its own config first, then those of\naparteGlobalConfig, the way a segment renderer is found: one registered once on\nthe page reaches a chat that carries a config of its own. An observer that throws is\nreported once per reply, and the reply goes on. Returns the function that removes it.",
|
|
10687
|
+
"examples": [
|
|
10688
|
+
"const stop = aparteGlobalConfig.observeRunEvents((event, { messageId }) => {\n if (event.type === 'agent-start') console.info(`${messageId}: ${event.name} started`);\n});"
|
|
10689
|
+
]
|
|
10690
|
+
},
|
|
10691
|
+
{
|
|
10692
|
+
"kind": "method",
|
|
10693
|
+
"name": "getRunEventObservers",
|
|
10694
|
+
"return": {
|
|
10695
|
+
"type": {
|
|
10696
|
+
"text": "AparteRunEventObserver[]"
|
|
10697
|
+
}
|
|
10698
|
+
},
|
|
10699
|
+
"description": "The observers registered on this config, in registration order (read by the stream adapter)."
|
|
10700
|
+
},
|
|
10161
10701
|
{
|
|
10162
10702
|
"kind": "method",
|
|
10163
10703
|
"name": "setConversationManager",
|
|
@@ -10323,7 +10863,7 @@
|
|
|
10323
10863
|
"text": "void"
|
|
10324
10864
|
}
|
|
10325
10865
|
},
|
|
10326
|
-
"description": "Put the configuration back to its defaults: the providers and the selected model,\nthe tools with their renderers and summaries, the renderers and render hooks, the\nMarkdown and highlight providers, the code-language renderers, the sanitizer, the system prompt, the locale, icons,\navatars, actions and host handlers, the conversation manager, the question presenters\nand their queue. Three things stay: the transport, the key sources added with\nAparteConfig.registerKeyProvider| registerKeyProvider() (an `AparteClient`'s\n`keyResolver` among them), and the AparteConfig.subscribe| subscribe() listeners."
|
|
10866
|
+
"description": "Put the configuration back to its defaults: the providers and the selected model,\nthe tools with their renderers and summaries, the tool-line provider, the renderers and render hooks, the\nMarkdown and highlight providers, the code-language renderers, the sanitizer, the system prompt, the locale, icons,\navatars, actions and host handlers, the conversation manager, the question presenters\nand their queue, the run-event observers. Three things stay: the transport, the key sources added with\nAparteConfig.registerKeyProvider| registerKeyProvider() (an `AparteClient`'s\n`keyResolver` among them), and the AparteConfig.subscribe| subscribe() listeners."
|
|
10327
10867
|
},
|
|
10328
10868
|
{
|
|
10329
10869
|
"kind": "method",
|
|
@@ -11155,6 +11695,14 @@
|
|
|
11155
11695
|
"module": "./aparte-config.js"
|
|
11156
11696
|
}
|
|
11157
11697
|
},
|
|
11698
|
+
{
|
|
11699
|
+
"kind": "js",
|
|
11700
|
+
"name": "onRenderersChange",
|
|
11701
|
+
"declaration": {
|
|
11702
|
+
"name": "onRenderersChange",
|
|
11703
|
+
"module": "./aparte-config.js"
|
|
11704
|
+
}
|
|
11705
|
+
},
|
|
11158
11706
|
{
|
|
11159
11707
|
"kind": "js",
|
|
11160
11708
|
"name": "resolveConfig",
|
|
@@ -11503,7 +12051,7 @@
|
|
|
11503
12051
|
"type": {
|
|
11504
12052
|
"text": "AparteLocale"
|
|
11505
12053
|
},
|
|
11506
|
-
"default": "{ inputPlaceholder: \"Type a message...\", sendButton: \"Send\", copy: \"Copy\", copied: \"Copied!\", retry: \"Retry\", thinking: \"Thinking\", elicitationOther: \"Other…\", elicitationOtherPlaceholder: \"Type your answer…\", elicitationOtherLabel: \"Custom answer\", submitButton: \"Submit\", stopButton: \"Stop\", elicitationRecommended: \"Recommended\", elicitationSkip: \"Skip\", elicitationHide: \"Hide for now\", elicitationWaiting: \"Waiting for your answer\", elicitationYes: \"Yes\", elicitationNo: \"No\", elicitationAnswerLabel: \"Your answer\", approvalInstructionPlaceholder: \"Or tell it what to do instead…\", approvalAsk: \"Allow {tool}?\", approvalWaiting: \"Waiting\", scrollToBottom: \"Scroll to bottom\", suggestionsLabel: \"Suggested prompts\", contextLabel: \"Context window\", contextSystem: \"System prompt\", contextTools: \"Tools\", contextSummary: \"Summary\", contextMessages: \"Messages\", contextOther: \"Other\", contextFree: \"Free\", contextTotal: \"Total\", contextReclaim: \"Compacting now would free ~{n} tokens\", contextCompactNow: \"Compact now\", checkpointCount: \"{n} messages summarised for the model\", checkpointCountOne: \"1 message summarised for the model\", checkpointLegacy: \"Earlier messages were summarised\", checkpointGroup: \"Context summary\", checkpointShow: \"Show summary\", checkpointHide: \"Hide summary\", checkpointRestore: \"Restore\", checkpointRestoreConfirm: \"Send the original messages to the model again?\", checkpointPending: \"Summarising the context…\", checkpointFailed: \"Couldn't summarise the context\", toolRunning: \"Running\", toolCompleted: \"Done\", toolRejected: \"Rejected\", toolStopped: \"Stopped\", toolFailed: \"Failed\", toolInput: \"Input\", toolOutput: \"Output\", toolRejectedSaid: \"You said: “{instruction}”\", toolRefusedByPolicy: \"Refused by policy\", toolNotRunAfterRefusal: \"Not run: an earlier call was refused\", toolTimedOut: \"Timed out\", toolUnavailable: \"Not available here\", toolNoApprover: \"No one could approve it\", toolTurnLimit: \"Turn limit reached\", maxTurnsReached: \"Stopped after {n} turns to avoid an endless loop.\", sourcesCount: \"{n} sources\", sourcesOne: \"1 source\", sourcesCard: \"Sources\", sourcePrevious: \"Previous source\", sourceNext: \"Next source\", sourcePosition: \"Source {i} of {n}\", opensInNewTab: \"(opens in a new tab)\", imageLoad: \"Load the image from {host}\", imageLoadNamed: \"Load the image “{alt}” from {host}\", questionDeclined: \"You declined to answer.\", artifactNotCreated: \"Not created\", thoughtFor: \"Thought for {duration}\", thought: \"Thought\", turnWorking: \"Working…\", turnWorked: \"Worked {duration}\", turnUsed: \"Used {tools}\", turnTools: \"one:{n} tool|other:{n} tools\", feedbackReasonTitle: 'What went wrong?', feedbackReasonDismiss: 'Not now', triggersLoading: 'Loading…', triggersEmpty: 'No results', triggersError: 'This list could not be loaded', triggersRetry: 'Try again', triggersBack: 'Back', triggersCommandNew: 'Start a new conversation', triggersCommandStop: 'Stop the reply', triggersCommandRetry: 'Answer again', triggersCommandCopy: 'Copy the last reply', triggersCommandCompact: 'Summarise the earlier messages', triggersCompactNothing: 'There is nothing to compact yet', triggersCompactBusy: 'Wait for the reply to finish', triggersCompactNoWindow: 'This model does not say how much it can read', triggersCompactFailed: 'The summary could not be written', triggersCommandModel: 'Change the model', triggersCommandApproval: 'Change the approval mode', approvalOptionsLabel: \"Your decision\", approvalArgsLabel: \"Arguments\", actionUpload: \"Attach file\", removeAttachment: \"Remove {name}\", messageFrom: \"Message from {name}\", selectSearchPlaceholder: \"Search…\", selectSearchLabel: \"Search options\", loading: \"Loading…\", download: \"Download\", openArtifact: \"Open\", closeArtifact: \"Close\", artifactVersion: \"Version {n} of {total}\", previousVersion: \"Previous version\", nextVersion: \"Next version\", modelContextWindow: \"{n} context\", previewPending: \"Press Preview to run this artifact.\", sandboxError: \"The sandbox failed during generation.\", sandboxErrorHint: \"Common cause: the model produced invalid code (undefined variable, wrong argument type). Retry the request — the model may produce different code.\", preview: \"Preview\", code: \"Code\", generating: \"Generating…\", rebuildingPreview: \"Rebuilding preview…\", typing: \"Typing\", responseCutOff: \"Cut off at the model's length limit.\", error: \"Error\", errorUnreachable: \"The assistant can’t be reached right now. Try again in a moment.\", errorTimeout: \"The answer took too long. Try again in a moment.\", errorRefused: \"The assistant isn’t allowed to answer right now.\", errorRateLimited: \"Too many requests right now. Try again in a moment.\", errorTooLong: \"This conversation is too long for the model. Start a new one.\", errorFailed: \"The assistant couldn’t answer. Try again in a moment.\", errorNoAnswer: \"The assistant couldn’t answer this request.\", running: \"Running...\", run: \"Run\", file: \"File\", modelSelectorPlaceholder: \"Select a model...\", approvalModeLabel: \"Approval mode\", roleNameUser: \"You\", roleNameAssistant: \"Assistant\", yourMessage: \"Your message\", assistantResponse: \"Assistant response\", messageActions: \"Message actions\", edit: \"Edit message\", editConfirm: \"Send\", editCancel: \"Cancel\", feedbackPositive: \"Good response\", feedbackNegative: \"Bad response\", previousResponse: \"Previous response\", nextResponse: \"Next response\", approveTool: \"Approve\", rejectTool: \"Reject\", messageInfo: \"Details\", newChat: \"New Chat\", loadingConversations: \"Loading conversations\", conversationSearchEmpty: \"No conversation matches\", conversationList: \"Conversations\", loadingConversation: \"Loading the conversation\", deleteConversation: \"Delete\", archiveConversation: \"Archive\", unarchiveConversation: \"Unarchive\", conversationActions: \"Conversation actions\", conversationRunning: \"Answering\", conversationWaiting: \"Waiting for you\", renameConversation: \"Rename\", conversationTitle: \"Conversation title\", pinConversation: \"Pin\", unpinConversation: \"Unpin\", deleteConversationConfirm: \"Delete “{title}”?\", cancel: \"Cancel\", conversationGroupPinned: \"Pinned\", conversationGroupToday: \"Today\", conversationGroupYesterday: \"Yesterday\", conversationGroupWeek: \"Previous 7 days\", conversationGroupMonth: \"Previous 30 days\", scrollRailLabel: \"Conversation outline\", sidebarLabel: \"Conversations\", splitHandleLabel: \"Resize the panes\", launcherOpen: \"Open the chat\", launcherClose: \"Close the chat\", launcherHeading: \"Chat\", launcherMaximize: \"Expand the chat\", launcherRestore: \"Shrink the chat\", transcript: \"Transcript\" }",
|
|
12054
|
+
"default": "{ inputPlaceholder: \"Type a message...\", sendButton: \"Send\", copy: \"Copy\", copied: \"Copied!\", retry: \"Retry\", thinking: \"Thinking\", elicitationOther: \"Other…\", elicitationOtherPlaceholder: \"Type your answer…\", elicitationOtherLabel: \"Custom answer\", submitButton: \"Submit\", stopButton: \"Stop\", elicitationRecommended: \"Recommended\", elicitationSkip: \"Skip\", elicitationHide: \"Hide for now\", elicitationWaiting: \"Waiting for your answer\", elicitationYes: \"Yes\", elicitationNo: \"No\", elicitationAnswerLabel: \"Your answer\", approvalInstructionPlaceholder: \"Or tell it what to do instead…\", approvalAsk: \"Allow {tool}?\", approvalAskBy: \"Allow {tool} for {agent}?\", approvalWaiting: \"Waiting\", scrollToBottom: \"Scroll to bottom\", suggestionsLabel: \"Suggested prompts\", contextLabel: \"Context window\", contextSystem: \"System prompt\", contextTools: \"Tools\", contextSummary: \"Summary\", contextMessages: \"Messages\", contextOther: \"Other\", contextFree: \"Free\", contextTotal: \"Total\", contextReclaim: \"Compacting now would free ~{n} tokens\", contextCompactNow: \"Compact now\", checkpointCount: \"{n} messages summarised for the model\", checkpointCountOne: \"1 message summarised for the model\", checkpointLegacy: \"Earlier messages were summarised\", checkpointGroup: \"Context summary\", checkpointShow: \"Show summary\", checkpointHide: \"Hide summary\", checkpointRestore: \"Restore\", checkpointRestoreConfirm: \"Send the original messages to the model again?\", checkpointPending: \"Summarising the context…\", checkpointFailed: \"Couldn't summarise the context\", toolRunning: \"Running\", toolCompleted: \"Done\", toolRejected: \"Rejected\", toolStopped: \"Stopped\", toolFailed: \"Failed\", toolInput: \"Input\", toolOutput: \"Output\", toolRejectedSaid: \"You said: “{instruction}”\", toolRefusedByPolicy: \"Refused by policy\", toolNotRunAfterRefusal: \"Not run: an earlier call was refused\", toolTimedOut: \"Timed out\", toolUnavailable: \"Not available here\", toolNoApprover: \"No one could approve it\", toolTurnLimit: \"Turn limit reached\", maxTurnsReached: \"Stopped after {n} turns to avoid an endless loop.\", sourcesCount: \"{n} sources\", sourcesOne: \"1 source\", sourcesCard: \"Sources\", sourcePrevious: \"Previous source\", sourceNext: \"Next source\", sourcePosition: \"Source {i} of {n}\", opensInNewTab: \"(opens in a new tab)\", imageLoad: \"Load the image from {host}\", imageLoadNamed: \"Load the image “{alt}” from {host}\", questionDeclined: \"You declined to answer.\", artifactNotCreated: \"Not created\", thoughtFor: \"Thought for {duration}\", thought: \"Thought\", turnWorking: \"Working…\", turnWorked: \"Worked {duration}\", turnUsed: \"Used {tools}\", turnTools: \"one:{n} tool|other:{n} tools\", feedbackReasonTitle: 'What went wrong?', feedbackReasonDismiss: 'Not now', triggersLoading: 'Loading…', triggersEmpty: 'No results', triggersError: 'This list could not be loaded', triggersRetry: 'Try again', triggersBack: 'Back', triggersCommandNew: 'Start a new conversation', triggersCommandStop: 'Stop the reply', triggersCommandRetry: 'Answer again', triggersCommandCopy: 'Copy the last reply', triggersCommandCompact: 'Summarise the earlier messages', triggersCompactNothing: 'There is nothing to compact yet', triggersCompactBusy: 'Wait for the reply to finish', triggersCompactNoWindow: 'This model does not say how much it can read', triggersCompactFailed: 'The summary could not be written', triggersCommandModel: 'Change the model', triggersCommandApproval: 'Change the approval mode', approvalOptionsLabel: \"Your decision\", approvalArgsLabel: \"Arguments\", actionUpload: \"Attach file\", removeAttachment: \"Remove {name}\", messageFrom: \"Message from {name}\", selectSearchPlaceholder: \"Search…\", selectSearchLabel: \"Search options\", loading: \"Loading…\", download: \"Download\", openArtifact: \"Open\", closeArtifact: \"Close\", artifactVersion: \"Version {n} of {total}\", previousVersion: \"Previous version\", nextVersion: \"Next version\", modelContextWindow: \"{n} context\", previewPending: \"Press Preview to run this artifact.\", sandboxError: \"The sandbox failed during generation.\", sandboxErrorHint: \"Common cause: the model produced invalid code (undefined variable, wrong argument type). Retry the request — the model may produce different code.\", preview: \"Preview\", code: \"Code\", generating: \"Generating…\", rebuildingPreview: \"Rebuilding preview…\", typing: \"Typing\", responseCutOff: \"Cut off at the model's length limit.\", error: \"Error\", errorUnreachable: \"The assistant can’t be reached right now. Try again in a moment.\", errorTimeout: \"The answer took too long. Try again in a moment.\", errorRefused: \"The assistant isn’t allowed to answer right now.\", errorRateLimited: \"Too many requests right now. Try again in a moment.\", errorTooLong: \"This conversation is too long for the model. Start a new one.\", errorFailed: \"The assistant couldn’t answer. Try again in a moment.\", errorNoAnswer: \"The assistant couldn’t answer this request.\", running: \"Running...\", run: \"Run\", file: \"File\", modelSelectorPlaceholder: \"Select a model...\", approvalModeLabel: \"Approval mode\", roleNameUser: \"You\", roleNameAssistant: \"Assistant\", yourMessage: \"Your message\", assistantResponse: \"Assistant response\", messageActions: \"Message actions\", edit: \"Edit message\", editConfirm: \"Send\", editCancel: \"Cancel\", feedbackPositive: \"Good response\", feedbackNegative: \"Bad response\", previousResponse: \"Previous response\", nextResponse: \"Next response\", approveTool: \"Approve\", rejectTool: \"Reject\", messageInfo: \"Details\", newChat: \"New Chat\", loadingConversations: \"Loading conversations\", conversationSearchEmpty: \"No conversation matches\", conversationList: \"Conversations\", loadingConversation: \"Loading the conversation\", deleteConversation: \"Delete\", archiveConversation: \"Archive\", unarchiveConversation: \"Unarchive\", conversationActions: \"Conversation actions\", conversationRunning: \"Answering\", conversationWaiting: \"Waiting for you\", renameConversation: \"Rename\", conversationTitle: \"Conversation title\", pinConversation: \"Pin\", unpinConversation: \"Unpin\", deleteConversationConfirm: \"Delete “{title}”?\", cancel: \"Cancel\", conversationGroupPinned: \"Pinned\", conversationGroupToday: \"Today\", conversationGroupYesterday: \"Yesterday\", conversationGroupWeek: \"Previous 7 days\", conversationGroupMonth: \"Previous 30 days\", scrollRailLabel: \"Conversation outline\", sidebarLabel: \"Conversations\", splitHandleLabel: \"Resize the panes\", launcherOpen: \"Open the chat\", launcherClose: \"Close the chat\", launcherHeading: \"Chat\", launcherMaximize: \"Expand the chat\", launcherRestore: \"Shrink the chat\", transcript: \"Transcript\" }",
|
|
11507
12055
|
"description": "Default English Locale (Zero-dependency)\nHardcoded to ensure the core works out-of-the-box."
|
|
11508
12056
|
}
|
|
11509
12057
|
],
|
|
@@ -14256,6 +14804,16 @@
|
|
|
14256
14804
|
"default": "null",
|
|
14257
14805
|
"description": "Id of the assistant message currently streaming (null when idle)."
|
|
14258
14806
|
},
|
|
14807
|
+
{
|
|
14808
|
+
"kind": "field",
|
|
14809
|
+
"name": "_step",
|
|
14810
|
+
"type": {
|
|
14811
|
+
"text": "{ messageId: string; name: string } | null"
|
|
14812
|
+
},
|
|
14813
|
+
"privacy": "private",
|
|
14814
|
+
"default": "null",
|
|
14815
|
+
"description": "The step the streaming reply is on: kept until its bubble is painted, never in the list."
|
|
14816
|
+
},
|
|
14259
14817
|
{
|
|
14260
14818
|
"kind": "field",
|
|
14261
14819
|
"name": "_renderedIds",
|
|
@@ -14587,6 +15145,30 @@
|
|
|
14587
15145
|
],
|
|
14588
15146
|
"description": "Atomic partial update of a message by id."
|
|
14589
15147
|
},
|
|
15148
|
+
{
|
|
15149
|
+
"kind": "method",
|
|
15150
|
+
"name": "setStep",
|
|
15151
|
+
"return": {
|
|
15152
|
+
"type": {
|
|
15153
|
+
"text": "void"
|
|
15154
|
+
}
|
|
15155
|
+
},
|
|
15156
|
+
"parameters": [
|
|
15157
|
+
{
|
|
15158
|
+
"name": "messageId",
|
|
15159
|
+
"type": {
|
|
15160
|
+
"text": "string"
|
|
15161
|
+
}
|
|
15162
|
+
},
|
|
15163
|
+
{
|
|
15164
|
+
"name": "name",
|
|
15165
|
+
"type": {
|
|
15166
|
+
"text": "string | null"
|
|
15167
|
+
}
|
|
15168
|
+
}
|
|
15169
|
+
],
|
|
15170
|
+
"description": "Say the step the agent is on in the reply's waiting indicator, or `null` for none. Live\nonly: never written into the message list. Kept for a bubble the framework has not\npainted yet, and given to it when it is."
|
|
15171
|
+
},
|
|
14590
15172
|
{
|
|
14591
15173
|
"kind": "method",
|
|
14592
15174
|
"name": "updateLastMessage",
|
|
@@ -20056,6 +20638,22 @@
|
|
|
20056
20638
|
"module": "./segments.js"
|
|
20057
20639
|
}
|
|
20058
20640
|
},
|
|
20641
|
+
{
|
|
20642
|
+
"kind": "js",
|
|
20643
|
+
"name": "AparteActivitySegment",
|
|
20644
|
+
"declaration": {
|
|
20645
|
+
"name": "AparteActivitySegment",
|
|
20646
|
+
"module": "./segments.js"
|
|
20647
|
+
}
|
|
20648
|
+
},
|
|
20649
|
+
{
|
|
20650
|
+
"kind": "js",
|
|
20651
|
+
"name": "AparteActivityRenderer",
|
|
20652
|
+
"declaration": {
|
|
20653
|
+
"name": "AparteActivityRenderer",
|
|
20654
|
+
"module": "./segments.js"
|
|
20655
|
+
}
|
|
20656
|
+
},
|
|
20059
20657
|
{
|
|
20060
20658
|
"kind": "js",
|
|
20061
20659
|
"name": "AparteSegmentType",
|
|
@@ -20312,6 +20910,14 @@
|
|
|
20312
20910
|
"module": "./tools.js"
|
|
20313
20911
|
}
|
|
20314
20912
|
},
|
|
20913
|
+
{
|
|
20914
|
+
"kind": "js",
|
|
20915
|
+
"name": "AparteToolRun",
|
|
20916
|
+
"declaration": {
|
|
20917
|
+
"name": "AparteToolRun",
|
|
20918
|
+
"module": "./tools.js"
|
|
20919
|
+
}
|
|
20920
|
+
},
|
|
20315
20921
|
{
|
|
20316
20922
|
"kind": "js",
|
|
20317
20923
|
"name": "AparteToolRenderer",
|
|
@@ -20360,6 +20966,22 @@
|
|
|
20360
20966
|
"module": "./tools.js"
|
|
20361
20967
|
}
|
|
20362
20968
|
},
|
|
20969
|
+
{
|
|
20970
|
+
"kind": "js",
|
|
20971
|
+
"name": "AparteToolLine",
|
|
20972
|
+
"declaration": {
|
|
20973
|
+
"name": "AparteToolLine",
|
|
20974
|
+
"module": "./tools.js"
|
|
20975
|
+
}
|
|
20976
|
+
},
|
|
20977
|
+
{
|
|
20978
|
+
"kind": "js",
|
|
20979
|
+
"name": "AparteToolLineOpen",
|
|
20980
|
+
"declaration": {
|
|
20981
|
+
"name": "AparteToolLineOpen",
|
|
20982
|
+
"module": "./tools.js"
|
|
20983
|
+
}
|
|
20984
|
+
},
|
|
20363
20985
|
{
|
|
20364
20986
|
"kind": "js",
|
|
20365
20987
|
"name": "AparteToolCallView",
|
|
@@ -21325,6 +21947,171 @@
|
|
|
21325
21947
|
}
|
|
21326
21948
|
]
|
|
21327
21949
|
},
|
|
21950
|
+
{
|
|
21951
|
+
"kind": "javascript-module",
|
|
21952
|
+
"path": "src/utils/menu.ts",
|
|
21953
|
+
"declarations": [
|
|
21954
|
+
{
|
|
21955
|
+
"kind": "function",
|
|
21956
|
+
"name": "usableIn",
|
|
21957
|
+
"return": {
|
|
21958
|
+
"type": {
|
|
21959
|
+
"text": "boolean"
|
|
21960
|
+
}
|
|
21961
|
+
},
|
|
21962
|
+
"parameters": [
|
|
21963
|
+
{
|
|
21964
|
+
"name": "el",
|
|
21965
|
+
"type": {
|
|
21966
|
+
"text": "HTMLElement"
|
|
21967
|
+
}
|
|
21968
|
+
},
|
|
21969
|
+
{
|
|
21970
|
+
"name": "root",
|
|
21971
|
+
"type": {
|
|
21972
|
+
"text": "HTMLElement"
|
|
21973
|
+
}
|
|
21974
|
+
}
|
|
21975
|
+
],
|
|
21976
|
+
"description": "An item a reader can reach: not `disabled`, not `aria-disabled`, not hidden."
|
|
21977
|
+
},
|
|
21978
|
+
{
|
|
21979
|
+
"kind": "function",
|
|
21980
|
+
"name": "onPress",
|
|
21981
|
+
"return": {
|
|
21982
|
+
"type": {
|
|
21983
|
+
"text": "void"
|
|
21984
|
+
}
|
|
21985
|
+
},
|
|
21986
|
+
"parameters": [
|
|
21987
|
+
{
|
|
21988
|
+
"name": "e",
|
|
21989
|
+
"type": {
|
|
21990
|
+
"text": "Event"
|
|
21991
|
+
}
|
|
21992
|
+
}
|
|
21993
|
+
]
|
|
21994
|
+
},
|
|
21995
|
+
{
|
|
21996
|
+
"kind": "function",
|
|
21997
|
+
"name": "onRelease",
|
|
21998
|
+
"return": {
|
|
21999
|
+
"type": {
|
|
22000
|
+
"text": "void"
|
|
22001
|
+
}
|
|
22002
|
+
}
|
|
22003
|
+
},
|
|
22004
|
+
{
|
|
22005
|
+
"kind": "function",
|
|
22006
|
+
"name": "onScroll",
|
|
22007
|
+
"return": {
|
|
22008
|
+
"type": {
|
|
22009
|
+
"text": "void"
|
|
22010
|
+
}
|
|
22011
|
+
},
|
|
22012
|
+
"parameters": [
|
|
22013
|
+
{
|
|
22014
|
+
"name": "e",
|
|
22015
|
+
"type": {
|
|
22016
|
+
"text": "Event"
|
|
22017
|
+
}
|
|
22018
|
+
}
|
|
22019
|
+
]
|
|
22020
|
+
},
|
|
22021
|
+
{
|
|
22022
|
+
"kind": "function",
|
|
22023
|
+
"name": "enhanceMenu",
|
|
22024
|
+
"return": {
|
|
22025
|
+
"type": {
|
|
22026
|
+
"text": "() => void"
|
|
22027
|
+
}
|
|
22028
|
+
},
|
|
22029
|
+
"parameters": [
|
|
22030
|
+
{
|
|
22031
|
+
"name": "trigger",
|
|
22032
|
+
"type": {
|
|
22033
|
+
"text": "HTMLElement"
|
|
22034
|
+
}
|
|
22035
|
+
},
|
|
22036
|
+
{
|
|
22037
|
+
"name": "menu",
|
|
22038
|
+
"type": {
|
|
22039
|
+
"text": "HTMLElement"
|
|
22040
|
+
}
|
|
22041
|
+
},
|
|
22042
|
+
{
|
|
22043
|
+
"name": "options",
|
|
22044
|
+
"default": "{}",
|
|
22045
|
+
"type": {
|
|
22046
|
+
"text": "AparteMenuOptions"
|
|
22047
|
+
}
|
|
22048
|
+
}
|
|
22049
|
+
],
|
|
22050
|
+
"description": "Drives a menu drawn with the kit (`.aparte-menu`, `role=\"menuitem\"` items) from the button\nthat opens it, the way the WAI-ARIA menu button pattern asks, and returns the function that\nstops it.\n\nThe button opens it on a click (so Enter and Space, which click a button), ArrowDown (on the\nfirst item) and ArrowUp (on the last). Inside, the arrows move and wrap round, Home and End\njump to the ends, and a letter moves to the next item that starts with it; an item that is\n`disabled`, `aria-disabled=\"true\"` or hidden is passed over. Escape closes it and puts the\nfocus back on the button; Tab closes it and moves on from the button. A press outside, the\nfocus leaving or a resize close it, and so does a scroll that moves the button (the page, a\nlist it is in) — not one beside it, such as a reply streaming in. One menu is open at a time.\n\nChoosing an item fires `aparte-menu-select` on the menu with `{ item }`, then closes it and\nputs the focus back. A `menuitemcheckbox` or `menuitemradio` is not ticked for you: set its\n`aria-checked` in that listener. `preventDefault()` on the event keeps the menu open.\n\nThe menu is shown and hidden with `hidden`, and placed with `placeFloating` against the\nbutton, fixed to the window. To open or close it from code, call `trigger.click()`.\n\nTouches no DOM until it is called, so it can be imported on a server."
|
|
22051
|
+
},
|
|
22052
|
+
{
|
|
22053
|
+
"kind": "function",
|
|
22054
|
+
"name": "enhanceContextMenu",
|
|
22055
|
+
"return": {
|
|
22056
|
+
"type": {
|
|
22057
|
+
"text": "() => void"
|
|
22058
|
+
}
|
|
22059
|
+
},
|
|
22060
|
+
"parameters": [
|
|
22061
|
+
{
|
|
22062
|
+
"name": "region",
|
|
22063
|
+
"type": {
|
|
22064
|
+
"text": "HTMLElement"
|
|
22065
|
+
}
|
|
22066
|
+
},
|
|
22067
|
+
{
|
|
22068
|
+
"name": "menu",
|
|
22069
|
+
"type": {
|
|
22070
|
+
"text": "HTMLElement"
|
|
22071
|
+
}
|
|
22072
|
+
},
|
|
22073
|
+
{
|
|
22074
|
+
"name": "options",
|
|
22075
|
+
"default": "{}",
|
|
22076
|
+
"type": {
|
|
22077
|
+
"text": "AparteContextMenuOptions"
|
|
22078
|
+
}
|
|
22079
|
+
}
|
|
22080
|
+
],
|
|
22081
|
+
"description": "The same menu as `enhanceMenu`, opened by a right click, Shift+F10 or the Menu key inside\n`region` — at the pointer for a click, under the focused element for a key — and returns\nthe function that stops it. One menu serves the whole region: `onOpen(target)` says which\nelement it was asked about, so the menu can be filled for that row.\n\nInside, it behaves as `enhanceMenu`'s does: the same keys, the same `aparte-menu-select`,\nthe same ways to close. Escape puts the focus back on the element that had it."
|
|
22082
|
+
},
|
|
22083
|
+
{
|
|
22084
|
+
"kind": "variable",
|
|
22085
|
+
"name": "back"
|
|
22086
|
+
}
|
|
22087
|
+
],
|
|
22088
|
+
"exports": [
|
|
22089
|
+
{
|
|
22090
|
+
"kind": "js",
|
|
22091
|
+
"name": "usableIn",
|
|
22092
|
+
"declaration": {
|
|
22093
|
+
"name": "usableIn",
|
|
22094
|
+
"module": "src/utils/menu.ts"
|
|
22095
|
+
}
|
|
22096
|
+
},
|
|
22097
|
+
{
|
|
22098
|
+
"kind": "js",
|
|
22099
|
+
"name": "enhanceMenu",
|
|
22100
|
+
"declaration": {
|
|
22101
|
+
"name": "enhanceMenu",
|
|
22102
|
+
"module": "src/utils/menu.ts"
|
|
22103
|
+
}
|
|
22104
|
+
},
|
|
22105
|
+
{
|
|
22106
|
+
"kind": "js",
|
|
22107
|
+
"name": "enhanceContextMenu",
|
|
22108
|
+
"declaration": {
|
|
22109
|
+
"name": "enhanceContextMenu",
|
|
22110
|
+
"module": "src/utils/menu.ts"
|
|
22111
|
+
}
|
|
22112
|
+
}
|
|
22113
|
+
]
|
|
22114
|
+
},
|
|
21328
22115
|
{
|
|
21329
22116
|
"kind": "javascript-module",
|
|
21330
22117
|
"path": "src/utils/ndjson.ts",
|
|
@@ -21528,6 +22315,40 @@
|
|
|
21528
22315
|
}
|
|
21529
22316
|
]
|
|
21530
22317
|
},
|
|
22318
|
+
{
|
|
22319
|
+
"kind": "javascript-module",
|
|
22320
|
+
"path": "src/utils/segment-list.ts",
|
|
22321
|
+
"declarations": [
|
|
22322
|
+
{
|
|
22323
|
+
"kind": "function",
|
|
22324
|
+
"name": "createSegmentList",
|
|
22325
|
+
"return": {
|
|
22326
|
+
"type": {
|
|
22327
|
+
"text": "AparteSegmentList"
|
|
22328
|
+
}
|
|
22329
|
+
},
|
|
22330
|
+
"parameters": [
|
|
22331
|
+
{
|
|
22332
|
+
"name": "opts",
|
|
22333
|
+
"type": {
|
|
22334
|
+
"text": "{\n messageId: string;\n segments?: readonly AparteSegment[];\n config?: AparteConfig;\n}"
|
|
22335
|
+
}
|
|
22336
|
+
}
|
|
22337
|
+
],
|
|
22338
|
+
"description": "A segment list a stream adapter can write into, stamped like a message's.\n\n`messageId` is the id stamped on each segment — the message the list belongs to. With a\n`config`, a segment joining the list takes that config's segment defaults\n(`setSegmentDefaults`), as it would in a chat. `segments` is a list saved earlier, adopted.\n\n`addSegment` and `updateSegment` are the writes; `updateMessage` and `setUsage` do nothing\n(there is no message here), and `dispatchEvent` dispatches nothing: the events of the run\nare the caller's to hear, with `observeRunEvents`."
|
|
22339
|
+
}
|
|
22340
|
+
],
|
|
22341
|
+
"exports": [
|
|
22342
|
+
{
|
|
22343
|
+
"kind": "js",
|
|
22344
|
+
"name": "createSegmentList",
|
|
22345
|
+
"declaration": {
|
|
22346
|
+
"name": "createSegmentList",
|
|
22347
|
+
"module": "src/utils/segment-list.ts"
|
|
22348
|
+
}
|
|
22349
|
+
}
|
|
22350
|
+
]
|
|
22351
|
+
},
|
|
21531
22352
|
{
|
|
21532
22353
|
"kind": "javascript-module",
|
|
21533
22354
|
"path": "src/utils/segments.ts",
|
|
@@ -21921,6 +22742,47 @@
|
|
|
21921
22742
|
}
|
|
21922
22743
|
]
|
|
21923
22744
|
},
|
|
22745
|
+
{
|
|
22746
|
+
"kind": "javascript-module",
|
|
22747
|
+
"path": "src/utils/tabs.ts",
|
|
22748
|
+
"declarations": [
|
|
22749
|
+
{
|
|
22750
|
+
"kind": "function",
|
|
22751
|
+
"name": "enhanceTabs",
|
|
22752
|
+
"return": {
|
|
22753
|
+
"type": {
|
|
22754
|
+
"text": "() => void"
|
|
22755
|
+
}
|
|
22756
|
+
},
|
|
22757
|
+
"parameters": [
|
|
22758
|
+
{
|
|
22759
|
+
"name": "tablist",
|
|
22760
|
+
"type": {
|
|
22761
|
+
"text": "HTMLElement"
|
|
22762
|
+
}
|
|
22763
|
+
},
|
|
22764
|
+
{
|
|
22765
|
+
"name": "options",
|
|
22766
|
+
"default": "{}",
|
|
22767
|
+
"type": {
|
|
22768
|
+
"text": "AparteTabsOptions"
|
|
22769
|
+
}
|
|
22770
|
+
}
|
|
22771
|
+
],
|
|
22772
|
+
"description": "Drives a row of tabs drawn with the kit (`role=\"tablist\"`, `role=\"tab\"` buttons with\n`aria-controls`), the way the WAI-ARIA tabs pattern asks, and returns the function that\nstops it.\n\nThe row is one tab stop: the selected tab has `tabindex=\"0\"`, the others `-1`. ArrowRight\nand ArrowLeft move to the next and the previous tab and wrap round — the other way round in\na right-to-left row — or ArrowDown and ArrowUp when the list says\n`aria-orientation=\"vertical\"`. Home and End go to the ends. A tab that is `disabled`,\n`aria-disabled=\"true\"` or hidden is passed over. A click selects too.\n\nSelecting sets `aria-selected`, moves the tab stop, shows the panel the tab's\n`aria-controls` names and puts `hidden` on the others. `aparte-tab-change` fires on the\ntablist just before, with `{ tab, panel, previous }`; `preventDefault()` keeps the current\ntab. To select a tab from code, call its `click()`.\n\nWith nothing marked `aria-selected=\"true\"`, the first tab that can be used is selected.\nTouches no DOM until it is called, so it can be imported on a server."
|
|
22773
|
+
}
|
|
22774
|
+
],
|
|
22775
|
+
"exports": [
|
|
22776
|
+
{
|
|
22777
|
+
"kind": "js",
|
|
22778
|
+
"name": "enhanceTabs",
|
|
22779
|
+
"declaration": {
|
|
22780
|
+
"name": "enhanceTabs",
|
|
22781
|
+
"module": "src/utils/tabs.ts"
|
|
22782
|
+
}
|
|
22783
|
+
}
|
|
22784
|
+
]
|
|
22785
|
+
},
|
|
21924
22786
|
{
|
|
21925
22787
|
"kind": "javascript-module",
|
|
21926
22788
|
"path": "src/utils/tool-input.ts",
|
|
@@ -21966,6 +22828,30 @@
|
|
|
21966
22828
|
"kind": "javascript-module",
|
|
21967
22829
|
"path": "src/utils/tool-line.ts",
|
|
21968
22830
|
"declarations": [
|
|
22831
|
+
{
|
|
22832
|
+
"kind": "function",
|
|
22833
|
+
"name": "toolLineOf",
|
|
22834
|
+
"return": {
|
|
22835
|
+
"type": {
|
|
22836
|
+
"text": "AparteToolLine | undefined"
|
|
22837
|
+
}
|
|
22838
|
+
},
|
|
22839
|
+
"parameters": [
|
|
22840
|
+
{
|
|
22841
|
+
"name": "segment",
|
|
22842
|
+
"type": {
|
|
22843
|
+
"text": "AparteToolCallSegment"
|
|
22844
|
+
}
|
|
22845
|
+
},
|
|
22846
|
+
{
|
|
22847
|
+
"name": "config",
|
|
22848
|
+
"type": {
|
|
22849
|
+
"text": "AparteConfig"
|
|
22850
|
+
}
|
|
22851
|
+
}
|
|
22852
|
+
],
|
|
22853
|
+
"description": "What the config's tool-line provider says about this call (`setToolLineProvider`), or\n`undefined` when there is none, it says nothing, or it throws — the default line then.\nCalled at every draw, update and relabel, never stored: its words follow the locale."
|
|
22854
|
+
},
|
|
21969
22855
|
{
|
|
21970
22856
|
"kind": "function",
|
|
21971
22857
|
"name": "toolNameOf",
|
|
@@ -21986,9 +22872,16 @@
|
|
|
21986
22872
|
"type": {
|
|
21987
22873
|
"text": "AparteConfig"
|
|
21988
22874
|
}
|
|
22875
|
+
},
|
|
22876
|
+
{
|
|
22877
|
+
"name": "line",
|
|
22878
|
+
"default": "toolLineOf(segment, config)",
|
|
22879
|
+
"type": {
|
|
22880
|
+
"text": "AparteToolLine | undefined"
|
|
22881
|
+
}
|
|
21989
22882
|
}
|
|
21990
22883
|
],
|
|
21991
|
-
"description": "The name a call goes by: the label its display declares (`registerToolDisplay`), else\
|
|
22884
|
+
"description": "The name a call goes by: the label its display declares (`registerToolDisplay`), else the\nlabel the tool-line provider gives, else the identifier — the app's wire format, which\ncore never turns into words on its own. A label that throws or says nothing costs the\ncall its label, not its render.\n\n`line` is the provider's answer when the caller already asked for it (the row asks once\nper draw); left out, it is asked here."
|
|
21992
22885
|
},
|
|
21993
22886
|
{
|
|
21994
22887
|
"kind": "function",
|
|
@@ -22010,12 +22903,100 @@
|
|
|
22010
22903
|
"type": {
|
|
22011
22904
|
"text": "AparteConfig"
|
|
22012
22905
|
}
|
|
22906
|
+
},
|
|
22907
|
+
{
|
|
22908
|
+
"name": "line",
|
|
22909
|
+
"default": "toolLineOf(segment, config)",
|
|
22910
|
+
"type": {
|
|
22911
|
+
"text": "AparteToolLine | undefined"
|
|
22912
|
+
}
|
|
22913
|
+
}
|
|
22914
|
+
],
|
|
22915
|
+
"description": "What a call targets, from the summary its display declares, else the target the\ntool-line provider gives — `''` when neither says anything, or when the summary throws:\na summary reads model-chosen input, and a bad one must cost the call its one line, not\nthe bubble its render."
|
|
22916
|
+
},
|
|
22917
|
+
{
|
|
22918
|
+
"kind": "function",
|
|
22919
|
+
"name": "toolTargetPartsOf",
|
|
22920
|
+
"return": {
|
|
22921
|
+
"type": {
|
|
22922
|
+
"text": "{ text: string; isWords: boolean }"
|
|
22923
|
+
}
|
|
22924
|
+
},
|
|
22925
|
+
"parameters": [
|
|
22926
|
+
{
|
|
22927
|
+
"name": "segment",
|
|
22928
|
+
"type": {
|
|
22929
|
+
"text": "AparteToolCallSegment"
|
|
22930
|
+
}
|
|
22931
|
+
},
|
|
22932
|
+
{
|
|
22933
|
+
"name": "config",
|
|
22934
|
+
"type": {
|
|
22935
|
+
"text": "AparteConfig"
|
|
22936
|
+
}
|
|
22937
|
+
},
|
|
22938
|
+
{
|
|
22939
|
+
"name": "line",
|
|
22940
|
+
"default": "toolLineOf(segment, config)",
|
|
22941
|
+
"type": {
|
|
22942
|
+
"text": "AparteToolLine | undefined"
|
|
22943
|
+
}
|
|
22944
|
+
}
|
|
22945
|
+
],
|
|
22946
|
+
"description": "The target and where it came from: `isWords` when the tool-line provider gave it (a\nsentence for a person — a sub-agent's task), not the app's summary, which is read off the\narguments (a path, a command) and keeps the code face on an agent's row."
|
|
22947
|
+
},
|
|
22948
|
+
{
|
|
22949
|
+
"kind": "function",
|
|
22950
|
+
"name": "toolActivityOf",
|
|
22951
|
+
"return": {
|
|
22952
|
+
"type": {
|
|
22953
|
+
"text": "string"
|
|
22954
|
+
}
|
|
22955
|
+
},
|
|
22956
|
+
"parameters": [
|
|
22957
|
+
{
|
|
22958
|
+
"name": "_segment",
|
|
22959
|
+
"type": {
|
|
22960
|
+
"text": "AparteToolCallSegment"
|
|
22961
|
+
}
|
|
22962
|
+
},
|
|
22963
|
+
{
|
|
22964
|
+
"name": "line",
|
|
22965
|
+
"type": {
|
|
22966
|
+
"text": "AparteToolLine | undefined"
|
|
22967
|
+
}
|
|
22968
|
+
}
|
|
22969
|
+
],
|
|
22970
|
+
"description": "The row's second line, from the tool-line provider, in every state it gives one: what the\ncall is doing now, and once it is over what it did. Core says nothing there on its own."
|
|
22971
|
+
},
|
|
22972
|
+
{
|
|
22973
|
+
"kind": "function",
|
|
22974
|
+
"name": "toolLineNoteOf",
|
|
22975
|
+
"return": {
|
|
22976
|
+
"type": {
|
|
22977
|
+
"text": "string"
|
|
22978
|
+
}
|
|
22979
|
+
},
|
|
22980
|
+
"parameters": [
|
|
22981
|
+
{
|
|
22982
|
+
"name": "line",
|
|
22983
|
+
"type": {
|
|
22984
|
+
"text": "AparteToolLine | undefined"
|
|
22985
|
+
}
|
|
22013
22986
|
}
|
|
22014
22987
|
],
|
|
22015
|
-
"description": "
|
|
22988
|
+
"description": "The provider's trailing note, in every state."
|
|
22016
22989
|
}
|
|
22017
22990
|
],
|
|
22018
22991
|
"exports": [
|
|
22992
|
+
{
|
|
22993
|
+
"kind": "js",
|
|
22994
|
+
"name": "toolLineOf",
|
|
22995
|
+
"declaration": {
|
|
22996
|
+
"name": "toolLineOf",
|
|
22997
|
+
"module": "src/utils/tool-line.ts"
|
|
22998
|
+
}
|
|
22999
|
+
},
|
|
22019
23000
|
{
|
|
22020
23001
|
"kind": "js",
|
|
22021
23002
|
"name": "toolNameOf",
|
|
@@ -22031,6 +23012,30 @@
|
|
|
22031
23012
|
"name": "toolTargetOf",
|
|
22032
23013
|
"module": "src/utils/tool-line.ts"
|
|
22033
23014
|
}
|
|
23015
|
+
},
|
|
23016
|
+
{
|
|
23017
|
+
"kind": "js",
|
|
23018
|
+
"name": "toolTargetPartsOf",
|
|
23019
|
+
"declaration": {
|
|
23020
|
+
"name": "toolTargetPartsOf",
|
|
23021
|
+
"module": "src/utils/tool-line.ts"
|
|
23022
|
+
}
|
|
23023
|
+
},
|
|
23024
|
+
{
|
|
23025
|
+
"kind": "js",
|
|
23026
|
+
"name": "toolActivityOf",
|
|
23027
|
+
"declaration": {
|
|
23028
|
+
"name": "toolActivityOf",
|
|
23029
|
+
"module": "src/utils/tool-line.ts"
|
|
23030
|
+
}
|
|
23031
|
+
},
|
|
23032
|
+
{
|
|
23033
|
+
"kind": "js",
|
|
23034
|
+
"name": "toolLineNoteOf",
|
|
23035
|
+
"declaration": {
|
|
23036
|
+
"name": "toolLineNoteOf",
|
|
23037
|
+
"module": "src/utils/tool-line.ts"
|
|
23038
|
+
}
|
|
22034
23039
|
}
|
|
22035
23040
|
]
|
|
22036
23041
|
},
|
|
@@ -22475,6 +23480,16 @@
|
|
|
22475
23480
|
"privacy": "private",
|
|
22476
23481
|
"default": "null"
|
|
22477
23482
|
},
|
|
23483
|
+
{
|
|
23484
|
+
"kind": "field",
|
|
23485
|
+
"name": "_step",
|
|
23486
|
+
"type": {
|
|
23487
|
+
"text": "string | null"
|
|
23488
|
+
},
|
|
23489
|
+
"privacy": "private",
|
|
23490
|
+
"default": "null",
|
|
23491
|
+
"description": "The step the agent is on while this reply waits: live only, never part of the message."
|
|
23492
|
+
},
|
|
22478
23493
|
{
|
|
22479
23494
|
"kind": "field",
|
|
22480
23495
|
"name": "_finishReason",
|
|
@@ -22738,6 +23753,25 @@
|
|
|
22738
23753
|
],
|
|
22739
23754
|
"description": "The tool renderer in effect for a call: none for a hidden call or another segment."
|
|
22740
23755
|
},
|
|
23756
|
+
{
|
|
23757
|
+
"kind": "method",
|
|
23758
|
+
"name": "_innerRendererFor",
|
|
23759
|
+
"privacy": "private",
|
|
23760
|
+
"return": {
|
|
23761
|
+
"type": {
|
|
23762
|
+
"text": "AparteToolRenderer | AparteActivityRenderer | null"
|
|
23763
|
+
}
|
|
23764
|
+
},
|
|
23765
|
+
"parameters": [
|
|
23766
|
+
{
|
|
23767
|
+
"name": "segment",
|
|
23768
|
+
"type": {
|
|
23769
|
+
"text": "AparteSegment"
|
|
23770
|
+
}
|
|
23771
|
+
}
|
|
23772
|
+
],
|
|
23773
|
+
"description": "The tool or activity renderer in effect for a segment, when core's own renderer for its type is what draws it."
|
|
23774
|
+
},
|
|
22741
23775
|
{
|
|
22742
23776
|
"kind": "method",
|
|
22743
23777
|
"name": "_install",
|
|
@@ -23300,6 +24334,24 @@
|
|
|
23300
24334
|
],
|
|
23301
24335
|
"description": "Set token usage + timing for this message (assistant only).\n\nThis is the *precondition* for the info (\"i\") action, not the trigger: the\nbutton appears only if the app also declared it wants it —\n`aparteGlobalConfig.setBubbleActions({ info: true })` — because the stats popover it\nopens (`aparte-message-info`) is the app's, and core has none. Without usage\nthere is nothing to show, so the button never renders either way."
|
|
23302
24336
|
},
|
|
24337
|
+
{
|
|
24338
|
+
"kind": "method",
|
|
24339
|
+
"name": "setStep",
|
|
24340
|
+
"return": {
|
|
24341
|
+
"type": {
|
|
24342
|
+
"text": "void"
|
|
24343
|
+
}
|
|
24344
|
+
},
|
|
24345
|
+
"parameters": [
|
|
24346
|
+
{
|
|
24347
|
+
"name": "name",
|
|
24348
|
+
"type": {
|
|
24349
|
+
"text": "string | null"
|
|
24350
|
+
}
|
|
24351
|
+
}
|
|
24352
|
+
],
|
|
24353
|
+
"description": "Say the step the agent is on (\"Reading the parser\") while this reply waits, or `null`\nwhen it is on none. The client calls it as the run announces steps.\n\nLive only: the words show beside the waiting dots while the reply has nothing to show\n(or between two calls), and are what a screen reader hears in place of \"Typing\". They\nare never one of the message's segments, never saved and never sent to the model, and\nthey go with the reply's end even when nobody closed the step."
|
|
24354
|
+
},
|
|
23303
24355
|
{
|
|
23304
24356
|
"kind": "method",
|
|
23305
24357
|
"name": "setFinishReason",
|
|
@@ -23616,7 +24668,7 @@
|
|
|
23616
24668
|
}
|
|
23617
24669
|
}
|
|
23618
24670
|
],
|
|
23619
|
-
"description": "What a call goes by on screen
|
|
24671
|
+
"description": "What a call goes by on screen — the name its row shows, through the same function."
|
|
23620
24672
|
},
|
|
23621
24673
|
{
|
|
23622
24674
|
"kind": "method",
|
|
@@ -28496,7 +29548,7 @@
|
|
|
28496
29548
|
"declarations": [
|
|
28497
29549
|
{
|
|
28498
29550
|
"kind": "class",
|
|
28499
|
-
"description": "Conversation-history sidebar — a framework-agnostic web component. The host sets\nthe `conversations` JS property and the `active-id` attribute; this renders the\nrows and fires the user's intent. Acting on it is the host's, unless `manage` hands\nthe row menu's writes to the registered conversation manager.\n\nA row is two real buttons: the title, which selects, and a `⋯` that opens the row's\nmenu — rename, pin or unpin, archive or unarchive, delete. Every item fires an event\nand stops; the one exception is delete, which asks first, inline in the menu,\nbecause it is the one action the host cannot undo. Rename swaps the title for an\ninput: Enter or leaving the field commits, Escape cancels, and an unchanged or\nemptied title fires nothing. The rows are grouped by date — Pinned, Today,\nYesterday, Previous 7 days, Previous 30 days, then one heading per month — as soon\nas any item carries `updatedAt`; set `flat` to render them flat.\n\nChildren are not a composition point: `_render()` assigns `innerHTML` from the\n`conversations` array, so any light-DOM child a host writes inside the element is\ndiscarded the next time the list renders — and switching this element's locale is\nenough to trigger one. Compose around the element, not inside it: it renders rows\nand nothing else, with no header, no new-conversation button and no search field.\n\nWhat it is not: a store. Selecting, renaming, pinning, archiving and deleting all\nleave the array untouched — the events carry an id (and, for rename, the title) and\nstop. Set `manage` and the menu's write gestures are carried out on the conversation\nmanager you registered, so you do not write those six listeners; the\nevent still goes out first and `preventDefault()` takes the gesture back. The array\nis still not this element's: the manager's own change is what re-renders it.\nA row's text comes from the array, so it changes when the host assigns\n`conversations` again; the exception is an empty title, which falls back to the\nlocale's new-chat label and therefore follows a locale switch. An archived item is\nstill rendered (it gains `aparte-conv-item--archived`); filtering archived\nconversations out of the list is the host's decision, not this element's. The\nasymmetry between the two inputs is deliberate: `active-id` is an attribute because\nmoving the selection patches the rendered rows in place, while `conversations` is a\nJS property because it is structured data an attribute cannot carry, and setting it\nre-renders the whole list.",
|
|
29551
|
+
"description": "Conversation-history sidebar — a framework-agnostic web component. The host sets\nthe `conversations` JS property and the `active-id` attribute; this renders the\nrows and fires the user's intent. Acting on it is the host's, unless `manage` hands\nthe row menu's writes to the registered conversation manager.\n\nA row is two real buttons: the title, which selects, and a `⋯` that opens the row's\nmenu — rename, pin or unpin, archive or unarchive, delete. A right click on a row,\nShift+F10 or the Menu key opens the same menu there. Every item fires an event\nand stops; the one exception is delete, which asks first, inline in the menu,\nbecause it is the one action the host cannot undo. Rename swaps the title for an\ninput: Enter or leaving the field commits, Escape cancels, and an unchanged or\nemptied title fires nothing. The rows are grouped by date — Pinned, Today,\nYesterday, Previous 7 days, Previous 30 days, then one heading per month — as soon\nas any item carries `updatedAt`; set `flat` to render them flat.\n\nChildren are not a composition point: `_render()` assigns `innerHTML` from the\n`conversations` array, so any light-DOM child a host writes inside the element is\ndiscarded the next time the list renders — and switching this element's locale is\nenough to trigger one. Compose around the element, not inside it: it renders rows\nand nothing else, with no header, no new-conversation button and no search field.\n\nWhat it is not: a store. Selecting, renaming, pinning, archiving and deleting all\nleave the array untouched — the events carry an id (and, for rename, the title) and\nstop. Set `manage` and the menu's write gestures are carried out on the conversation\nmanager you registered, so you do not write those six listeners; the\nevent still goes out first and `preventDefault()` takes the gesture back. The array\nis still not this element's: the manager's own change is what re-renders it.\nA row's text comes from the array, so it changes when the host assigns\n`conversations` again; the exception is an empty title, which falls back to the\nlocale's new-chat label and therefore follows a locale switch. An archived item is\nstill rendered (it gains `aparte-conv-item--archived`); filtering archived\nconversations out of the list is the host's decision, not this element's. The\nasymmetry between the two inputs is deliberate: `active-id` is an attribute because\nmoving the selection patches the rendered rows in place, while `conversations` is a\nJS property because it is structured data an attribute cannot carry, and setting it\nre-renders the whole list.",
|
|
28500
29552
|
"name": "AparteConversationList",
|
|
28501
29553
|
"cssProperties": [
|
|
28502
29554
|
{
|
|
@@ -28576,12 +29628,23 @@
|
|
|
28576
29628
|
},
|
|
28577
29629
|
{
|
|
28578
29630
|
"kind": "field",
|
|
28579
|
-
"name": "
|
|
29631
|
+
"name": "_menus",
|
|
28580
29632
|
"type": {
|
|
28581
|
-
"text": "
|
|
29633
|
+
"text": "Array<() => void>"
|
|
28582
29634
|
},
|
|
28583
29635
|
"privacy": "private",
|
|
28584
|
-
"default": "
|
|
29636
|
+
"default": "[]",
|
|
29637
|
+
"description": "What stops the menus of the rows on screen: one `enhanceMenu` per `⋯`, and the\ncontext menu over the whole list. A render replaces the rows, so it releases them\nall and wires the new ones."
|
|
29638
|
+
},
|
|
29639
|
+
{
|
|
29640
|
+
"kind": "field",
|
|
29641
|
+
"name": "_contextMenu",
|
|
29642
|
+
"type": {
|
|
29643
|
+
"text": "HTMLElement | null"
|
|
29644
|
+
},
|
|
29645
|
+
"privacy": "private",
|
|
29646
|
+
"default": "null",
|
|
29647
|
+
"description": "The context menu's element: one for the list, filled for the row it was asked about."
|
|
28585
29648
|
},
|
|
28586
29649
|
{
|
|
28587
29650
|
"kind": "field",
|
|
@@ -28932,40 +29995,27 @@
|
|
|
28932
29995
|
},
|
|
28933
29996
|
{
|
|
28934
29997
|
"kind": "method",
|
|
28935
|
-
"name": "
|
|
29998
|
+
"name": "_newMenu",
|
|
28936
29999
|
"privacy": "private",
|
|
28937
30000
|
"return": {
|
|
28938
30001
|
"type": {
|
|
28939
|
-
"text": "
|
|
30002
|
+
"text": "HTMLElement"
|
|
28940
30003
|
}
|
|
28941
30004
|
},
|
|
28942
|
-
"
|
|
28943
|
-
{
|
|
28944
|
-
"name": "row",
|
|
28945
|
-
"type": {
|
|
28946
|
-
"text": "HTMLElement"
|
|
28947
|
-
}
|
|
28948
|
-
},
|
|
28949
|
-
{
|
|
28950
|
-
"name": "button",
|
|
28951
|
-
"type": {
|
|
28952
|
-
"text": "HTMLElement"
|
|
28953
|
-
}
|
|
28954
|
-
}
|
|
28955
|
-
]
|
|
30005
|
+
"description": "A row menu's element, empty: `_fillMenu` gives it its items as it opens."
|
|
28956
30006
|
},
|
|
28957
30007
|
{
|
|
28958
30008
|
"kind": "method",
|
|
28959
|
-
"name": "
|
|
30009
|
+
"name": "_fillMenu",
|
|
28960
30010
|
"privacy": "private",
|
|
28961
30011
|
"return": {
|
|
28962
30012
|
"type": {
|
|
28963
|
-
"text": "
|
|
30013
|
+
"text": "boolean"
|
|
28964
30014
|
}
|
|
28965
30015
|
},
|
|
28966
30016
|
"parameters": [
|
|
28967
30017
|
{
|
|
28968
|
-
"name": "
|
|
30018
|
+
"name": "row",
|
|
28969
30019
|
"type": {
|
|
28970
30020
|
"text": "HTMLElement"
|
|
28971
30021
|
}
|
|
@@ -28977,53 +30027,60 @@
|
|
|
28977
30027
|
}
|
|
28978
30028
|
}
|
|
28979
30029
|
],
|
|
28980
|
-
"description": "
|
|
30030
|
+
"description": "Fills `menu` for the row's conversation and puts it in the row, as it opens; it leaves\nthe row when it closes, so a list with no menu open holds none. `enhanceMenu` places it\nfixed to the window, because a sidebar scrolls and an absolute menu on the last rows\nwould be clipped by the list's own overflow. False — stay closed — when the\nconversation is gone."
|
|
28981
30031
|
},
|
|
28982
30032
|
{
|
|
28983
30033
|
"kind": "method",
|
|
28984
|
-
"name": "
|
|
30034
|
+
"name": "_wireMenus",
|
|
28985
30035
|
"privacy": "private",
|
|
28986
30036
|
"return": {
|
|
28987
30037
|
"type": {
|
|
28988
30038
|
"text": "void"
|
|
28989
30039
|
}
|
|
28990
30040
|
},
|
|
28991
|
-
"
|
|
28992
|
-
{
|
|
28993
|
-
"name": "returnFocus",
|
|
28994
|
-
"default": "false"
|
|
28995
|
-
}
|
|
28996
|
-
]
|
|
30041
|
+
"description": "The keyboard, the closing and the placing are `enhanceMenu`'s, the same code the kit\ngives a host for its own menus: each row's `⋯` drives its own menu, and a right\nclick, Shift+F10 or the Menu key on a row opens one shared menu there\n(`enhanceContextMenu`). Both fill as they open."
|
|
28997
30042
|
},
|
|
28998
30043
|
{
|
|
28999
|
-
"kind": "
|
|
29000
|
-
"name": "
|
|
29001
|
-
"type": {
|
|
29002
|
-
"text": "boolean"
|
|
29003
|
-
},
|
|
30044
|
+
"kind": "method",
|
|
30045
|
+
"name": "_releaseMenus",
|
|
29004
30046
|
"privacy": "private",
|
|
29005
|
-
"
|
|
29006
|
-
|
|
29007
|
-
|
|
29008
|
-
|
|
29009
|
-
|
|
29010
|
-
"
|
|
29011
|
-
"privacy": "private"
|
|
29012
|
-
},
|
|
29013
|
-
{
|
|
29014
|
-
"kind": "field",
|
|
29015
|
-
"name": "_onDocumentPointerDown",
|
|
29016
|
-
"privacy": "private"
|
|
30047
|
+
"return": {
|
|
30048
|
+
"type": {
|
|
30049
|
+
"text": "void"
|
|
30050
|
+
}
|
|
30051
|
+
},
|
|
30052
|
+
"description": "Closes whichever menu is open, without moving the focus, and stops them all."
|
|
29017
30053
|
},
|
|
29018
30054
|
{
|
|
29019
|
-
"kind": "
|
|
29020
|
-
"name": "
|
|
29021
|
-
"privacy": "private"
|
|
30055
|
+
"kind": "method",
|
|
30056
|
+
"name": "_placeQuestion",
|
|
30057
|
+
"privacy": "private",
|
|
30058
|
+
"return": {
|
|
30059
|
+
"type": {
|
|
30060
|
+
"text": "void"
|
|
30061
|
+
}
|
|
30062
|
+
},
|
|
30063
|
+
"parameters": [
|
|
30064
|
+
{
|
|
30065
|
+
"name": "menu",
|
|
30066
|
+
"type": {
|
|
30067
|
+
"text": "HTMLElement"
|
|
30068
|
+
}
|
|
30069
|
+
},
|
|
30070
|
+
{
|
|
30071
|
+
"name": "id",
|
|
30072
|
+
"type": {
|
|
30073
|
+
"text": "string"
|
|
30074
|
+
}
|
|
30075
|
+
}
|
|
30076
|
+
],
|
|
30077
|
+
"description": "Placed again once the question has taken the items' place, since it is not their\nsize: the `⋯` menu against its button, the context menu on the corner it opened at."
|
|
29022
30078
|
},
|
|
29023
30079
|
{
|
|
29024
30080
|
"kind": "field",
|
|
29025
|
-
"name": "
|
|
29026
|
-
"privacy": "private"
|
|
30081
|
+
"name": "_onMenuSelect",
|
|
30082
|
+
"privacy": "private",
|
|
30083
|
+
"description": "An item chosen in a row's menu: `enhanceMenu` asks before it closes. Delete keeps it\nopen, since the question takes the items' place. The event stops here: the menu is\nthis element's own, and what the list tells the page is `aparte-conversation-*`."
|
|
29027
30084
|
},
|
|
29028
30085
|
{
|
|
29029
30086
|
"kind": "method",
|
|
@@ -29065,22 +30122,19 @@
|
|
|
29065
30122
|
"type": {
|
|
29066
30123
|
"text": "string"
|
|
29067
30124
|
}
|
|
30125
|
+
},
|
|
30126
|
+
{
|
|
30127
|
+
"name": "menu",
|
|
30128
|
+
"type": {
|
|
30129
|
+
"text": "HTMLElement"
|
|
30130
|
+
}
|
|
29068
30131
|
}
|
|
29069
|
-
]
|
|
29070
|
-
|
|
29071
|
-
{
|
|
29072
|
-
"kind": "method",
|
|
29073
|
-
"name": "_menuFocusables",
|
|
29074
|
-
"privacy": "private",
|
|
29075
|
-
"return": {
|
|
29076
|
-
"type": {
|
|
29077
|
-
"text": "HTMLElement[]"
|
|
29078
|
-
}
|
|
29079
|
-
}
|
|
30132
|
+
],
|
|
30133
|
+
"description": "What the item does, once the menu has done its part: by now it has closed and put the\nfocus back on the `⋯` (or the row) — except for delete, kept open to ask."
|
|
29080
30134
|
},
|
|
29081
30135
|
{
|
|
29082
30136
|
"kind": "method",
|
|
29083
|
-
"name": "
|
|
30137
|
+
"name": "_onQuestionKeydown",
|
|
29084
30138
|
"privacy": "private",
|
|
29085
30139
|
"return": {
|
|
29086
30140
|
"type": {
|
|
@@ -29093,8 +30147,15 @@
|
|
|
29093
30147
|
"type": {
|
|
29094
30148
|
"text": "KeyboardEvent"
|
|
29095
30149
|
}
|
|
30150
|
+
},
|
|
30151
|
+
{
|
|
30152
|
+
"name": "menu",
|
|
30153
|
+
"type": {
|
|
30154
|
+
"text": "HTMLElement"
|
|
30155
|
+
}
|
|
29096
30156
|
}
|
|
29097
|
-
]
|
|
30157
|
+
],
|
|
30158
|
+
"description": "The delete question's own keys: the arrows, Home and End between its two answers.\nA menu holds no item while it asks, so the menu's own arrows have nothing to move\nto; Escape and Tab are still the menu's, and close it."
|
|
29098
30159
|
},
|
|
29099
30160
|
{
|
|
29100
30161
|
"kind": "method",
|
|
@@ -34494,6 +35555,30 @@
|
|
|
34494
35555
|
],
|
|
34495
35556
|
"description": "Persist token usage on a message and propagate to the live bubble, which is\nwhat allows the info (\"i\") action to render — provided the app declared it\nwith `aparteGlobalConfig.setBubbleActions({ info: true })`; it is off by default,\nsince the popover it opens belongs to the app."
|
|
34496
35557
|
},
|
|
35558
|
+
{
|
|
35559
|
+
"kind": "method",
|
|
35560
|
+
"name": "setStep",
|
|
35561
|
+
"return": {
|
|
35562
|
+
"type": {
|
|
35563
|
+
"text": "void"
|
|
35564
|
+
}
|
|
35565
|
+
},
|
|
35566
|
+
"parameters": [
|
|
35567
|
+
{
|
|
35568
|
+
"name": "messageId",
|
|
35569
|
+
"type": {
|
|
35570
|
+
"text": "string"
|
|
35571
|
+
}
|
|
35572
|
+
},
|
|
35573
|
+
{
|
|
35574
|
+
"name": "name",
|
|
35575
|
+
"type": {
|
|
35576
|
+
"text": "string | null"
|
|
35577
|
+
}
|
|
35578
|
+
}
|
|
35579
|
+
],
|
|
35580
|
+
"description": "Say the step the agent is on (\"Reading the parser\") in the reply's waiting indicator,\nor `null` for none. Live only: handed to the bubble, never written on the message."
|
|
35581
|
+
},
|
|
34497
35582
|
{
|
|
34498
35583
|
"kind": "method",
|
|
34499
35584
|
"name": "completeMessage",
|
|
@@ -35199,6 +36284,27 @@
|
|
|
35199
36284
|
}
|
|
35200
36285
|
}
|
|
35201
36286
|
},
|
|
36287
|
+
{
|
|
36288
|
+
"kind": "method",
|
|
36289
|
+
"name": "_fitsOnceCentred",
|
|
36290
|
+
"privacy": "private",
|
|
36291
|
+
"return": {
|
|
36292
|
+
"type": {
|
|
36293
|
+
"text": "boolean"
|
|
36294
|
+
}
|
|
36295
|
+
},
|
|
36296
|
+
"description": "The transcript will fit once the room the centring spacer under the composer still\nholds (`center-empty`, or a wrapper's auto-centre) is back. That room is 0 once the\nslide is over, and outside those layouts."
|
|
36297
|
+
},
|
|
36298
|
+
{
|
|
36299
|
+
"kind": "method",
|
|
36300
|
+
"name": "_centringRoom",
|
|
36301
|
+
"privacy": "private",
|
|
36302
|
+
"return": {
|
|
36303
|
+
"type": {
|
|
36304
|
+
"text": "number"
|
|
36305
|
+
}
|
|
36306
|
+
}
|
|
36307
|
+
},
|
|
35202
36308
|
{
|
|
35203
36309
|
"kind": "method",
|
|
35204
36310
|
"name": "_gliding",
|
|
@@ -36634,6 +37740,56 @@
|
|
|
36634
37740
|
}
|
|
36635
37741
|
]
|
|
36636
37742
|
},
|
|
37743
|
+
{
|
|
37744
|
+
"kind": "javascript-module",
|
|
37745
|
+
"path": "src/renderers/segments/activity.ts",
|
|
37746
|
+
"declarations": [
|
|
37747
|
+
{
|
|
37748
|
+
"kind": "function",
|
|
37749
|
+
"name": "activityRendererThatDrew",
|
|
37750
|
+
"return": {
|
|
37751
|
+
"type": {
|
|
37752
|
+
"text": "AparteActivityRenderer | null"
|
|
37753
|
+
}
|
|
37754
|
+
},
|
|
37755
|
+
"parameters": [
|
|
37756
|
+
{
|
|
37757
|
+
"name": "element",
|
|
37758
|
+
"type": {
|
|
37759
|
+
"text": "Element"
|
|
37760
|
+
}
|
|
37761
|
+
}
|
|
37762
|
+
],
|
|
37763
|
+
"description": "Which activity renderer is behind `element`, or null. Internal to core."
|
|
37764
|
+
},
|
|
37765
|
+
{
|
|
37766
|
+
"kind": "variable",
|
|
37767
|
+
"name": "activityRenderer",
|
|
37768
|
+
"type": {
|
|
37769
|
+
"text": "AparteSegmentRenderer<AparteActivitySegment>"
|
|
37770
|
+
},
|
|
37771
|
+
"default": "{ type: 'activity', render: (segment) => { const custom = rendererOf(segment); if (!custom) return placeholder(segment); const out = custom.render(segment); if (out instanceof HTMLElement) { drawnBy.set(out, custom); behind.set(out, custom); return out; } return out.trim() ? out : placeholder(segment); }, setup: (element, segment) => { const custom = rendererOf(segment); if (!custom) return; behind.set(element, custom); if (isPlaceholder(element)) return; drawnBy.set(element, custom); custom.setup?.(element, segment); }, /** * The agent sent it again. The renderer that drew it patches it, when it can and is still * the one registered; otherwise it is drawn again here, and the bubble follows the element. */ update: (element, segment) => { const custom = rendererOf(segment); const drawn = drawnBy.get(element) ?? null; if (drawn && drawn === custom && drawn.update) { drawn.update(element, segment); return; } if (!custom && !drawn && isPlaceholder(element)) { element.setAttribute('data-activity-type', segment.activityType); return; } const out = activityRenderer.render(segment); let rebuilt: HTMLElement | null; if (typeof out === 'string') { const tpl = document.createElement('template'); tpl.innerHTML = out.trim(); rebuilt = tpl.content.firstElementChild as HTMLElement | null; } else { rebuilt = out; } if (!rebuilt) return; if (!rebuilt.hasAttribute('data-segment-id')) rebuilt.setAttribute('data-segment-id', segment.id); activityRenderer.cleanup?.(element, segment); element.replaceWith(rebuilt); activityRenderer.setup?.(rebuilt, segment); }, relabel: (element, segment) => { drawnBy.get(element)?.relabel?.(element, segment); }, /** The element leaves for good: the renderer that drew it cleans up. A cleanup that throws is reported, nothing more. */ cleanup: (element, segment) => { behind.delete(element); const custom = drawnBy.get(element); if (!custom) return; drawnBy.delete(element); try { custom.cleanup?.(element, segment); } catch (err) { console.error('[aparte] an activity renderer\\'s cleanup threw', err); } }, }"
|
|
37772
|
+
}
|
|
37773
|
+
],
|
|
37774
|
+
"exports": [
|
|
37775
|
+
{
|
|
37776
|
+
"kind": "js",
|
|
37777
|
+
"name": "activityRendererThatDrew",
|
|
37778
|
+
"declaration": {
|
|
37779
|
+
"name": "activityRendererThatDrew",
|
|
37780
|
+
"module": "src/renderers/segments/activity.ts"
|
|
37781
|
+
}
|
|
37782
|
+
},
|
|
37783
|
+
{
|
|
37784
|
+
"kind": "js",
|
|
37785
|
+
"name": "activityRenderer",
|
|
37786
|
+
"declaration": {
|
|
37787
|
+
"name": "activityRenderer",
|
|
37788
|
+
"module": "src/renderers/segments/activity.ts"
|
|
37789
|
+
}
|
|
37790
|
+
}
|
|
37791
|
+
]
|
|
37792
|
+
},
|
|
36637
37793
|
{
|
|
36638
37794
|
"kind": "javascript-module",
|
|
36639
37795
|
"path": "src/renderers/segments/code.ts",
|
|
@@ -36758,7 +37914,7 @@
|
|
|
36758
37914
|
"type": {
|
|
36759
37915
|
"text": "AparteSegmentRenderer<AparteToolCallSegment>"
|
|
36760
37916
|
},
|
|
36761
|
-
"default": "{ type: 'tool_call', render: (segment) => { const name = segment.toolCall?.name ?? 'tool'; /* * A tool waiting for a person is a STATE of the pill now, not a control. * * The Approve / Reject buttons were here, and they were the only decision * surface in the whole library that lived in the transcript. They are at the * composer now, which is where every other request for the user already went — * so this is the ANCHOR: the thing you scroll to, and the thing the panel is * about. Nothing clickable, no role, no tab stop, no pointer (ratified decision * #8: an undeclared affordance is not half-rendered either). * * It also fixes a defect by construction rather than by guarding: a segment * restored from storage used to repaint live buttons wired to a listener that * had gone with the page. * * And removing the branch un-shadows a seam that was said to be missing. It ran * BEFORE the per-tool renderer lookup below, so `registerToolRenderer` could * never draw anything while a tool awaited approval. The lookup is now first, * and a tool renders its own surface at every status. */ if (contextConfig().isToolHidden(name)) return placeholderMarkup(segment); const customRenderer = contextConfig().getToolRenderer(name); if (customRenderer) { // Its stylesheet, here as well as on the live path: this is what runs when a // stored conversation is re-rendered, and nothing replays `tool-start` for // history. Idempotent, keyed by renderer. injectToolRendererStyles(name, customRenderer); // Drawing nothing hides the call, the same element as a display's `hidden` // — it used to bring back the default row here while the live path dropped // the call, so a reload showed what the live chat had hidden. const out = customRenderer.render(segment); if (out instanceof HTMLElement) { drawnBy.set(out, customRenderer); behind.set(out, customRenderer); } return out || placeholderMarkup(segment); } return drawDefault(segment, behindOf(segment)); }, /** * The pill's glyphs, and the label it wears while a person is deciding. * * The two highest-stakes strings in the library — the approval labels — are no * longer here: they are on the panel, which relabels itself. This still matters * though, because the request the pill describes stays open for as long as * somebody takes to decide, which is exactly long enough for a language switch. * * No child node is added or removed, per the relabel contract. */ relabel: (element, segment) => { if (isPlaceholder(element)) return; const cfg = contextConfig(); // A registered renderer owns its markup, so none of the selectors below exist // in it; its own `relabel` — when it declares one — is the only thing that can // re-read the locale for it. const custom = drawerOf(element, cfg.getToolRenderer(segment.toolCall?.name) ?? null); if (custom) { custom.relabel?.(element, segment); return; } const icon = element.querySelector('.aparte-tool-icon'); if (icon) icon.innerHTML = iconOf(segment); setName(element, segment); setTarget(element, segment); setNote(element, segment); // The part labels are locale text too; the parts themselves stay (relabel adds none). const inputLabel = element.querySelector('[data-part=\"input\"] .aparte-tool-part-label'); if (inputLabel) inputLabel.textContent = cfg.t('toolInput'); element.querySelector('[data-part=\"input\"] .aparte-tool-part-body')?.setAttribute('aria-label', cfg.t('toolInput')); const outcome = outcomeOf(segment); const outputLabel = element.querySelector('[data-part=\"output\"] .aparte-tool-part-label'); if (outputLabel && outcome) outputLabel.textContent = cfg.t(outcome.key); if (outcome) element.querySelector('[data-part=\"output\"] .aparte-tool-part-body')?.setAttribute('aria-label', cfg.t(outcome.key)); for (const button of element.querySelectorAll<HTMLElement>('.aparte-tool-copy')) relabelCopyButton(button); // An app's detail may hold words in the reader's language too: its function is // asked again, and what it draws now is written into the nodes already there. const appDetail = appDetailOf(element); if (appDetail) { const behind = behindOf(segment); if (behind.kind === 'body') relabelBody(appDetail, behind.body); } // Through `stateBadge`, which is the whole point of it existing. // // This used to rebuild the badge by hand as the ICON ALONE, so any config change // — `setLocale`, `setIconProvider`, `registerTool`, `reset()`, anything that // calls `_notify()` — permanently deleted the localized state word that // `stateBadge` renders beside it. \"✓ Done\" became \"✓\", and `pending`'s \"Running\" // became empty. Four of five statuses regressed; only `awaiting-approval` // survived, because a second line below re-wrote it. // // Which is exactly what `stateBadge`'s own docblock says it prevents: \"One // function so `render` and `update` cannot disagree\". `relabel` was never folded // in. It is now, so there is no third spelling of the badge to keep in step — // and the approval-waiting special case goes with it, since `stateBadge` already // returns the localized `approvalWaiting` for that status. const statusEl = element.querySelector('.aparte-tool-state'); if (statusEl) statusEl.innerHTML = stateBadge(segment); setQuiet(element, segment); }, /** * Patch in place. NEVER re-render, and never touch `open`. * * Without an `update` the bubble replaces the element wholesale — and a tool call * changes status several times per turn, so a disclosure the reader opened would * slam shut under them every time. The same rule the reasoning block has, for the * same reason: `collapsed` is honoured only when an update explicitly carries it. * * The one case that cannot be patched is a change of ELEMENT: a call that had * neither arguments nor a result rendered as a plain pill, and gaining a result * makes it a `<details>`. That falls back to a rebuild, which costs nothing because * there was no disclosure to lose. */ update: (element, segment) => { const status = segment.status ?? 'pending'; const hidden = contextConfig().isToolHidden(segment.toolCall?.name ?? 'tool'); // A hidden call stays hidden: its placeholder only follows the status. if (hidden && isPlaceholder(element)) { element.setAttribute('data-status', status); return; } /* * Three cases this cannot patch, and each rebuilds instead. * * A registered tool renderer owns the WHOLE markup, so none of the selectors * below exist in it — patching would fail silently and that segment would * simply stop updating. Before this file had an `update` at all, the bubble * rebuilt on every change, which re-invoked their render; a rebuild keeps that * behaviour exactly. * * And a change of ELEMENT: a call with neither arguments nor a result renders * as a plain pill, and gaining either makes it a `<details>`. Nothing is lost * there — there was no disclosure to keep open. * * And a change of what is BEHIND the line, the app's detail for core's parts or * the other way: patched, the parts would be written around the app's markup. * That happens when a display gains or drops `details` while a turn is still * streaming, before the bubble redraws. */ // The renderer that DREW this row, and the one in effect now. They differ when one // was registered or dropped since; the row is then rebuilt by the current one. const custom = hidden ? null : (contextConfig().getToolRenderer(segment.toolCall?.name) ?? null); const drawn = isPlaceholder(element) ? null : drawerOf(element, custom); // A registered renderer that declares `update` owns the patch — a mounted // preview or an opened disclosure in its markup survives the change. One // that does not is rebuilt, as it always was. // Never on a placeholder: it is not the renderer's markup, and a call it drew as // nothing may draw something now — a rebuild asks it. if (drawn && drawn === custom && drawn.update && !isPlaceholder(element)) { drawn.update(element, segment); return; } const rebuild = (out: HTMLElement | string): void => { // A `<template>`, not the bubble's own converter: this file is a renderer // and must not import from the component that consumes it. const tpl = document.createElement('template'); tpl.innerHTML = typeof out === 'string' ? out.trim() : ''; const rebuilt = (typeof out === 'string' ? tpl.content.firstElementChild : out) as HTMLElement | null; if (rebuilt) { // The bubble stamps a renderer's root on its own render; this path must too, // or the next update misses the row and the whole bubble is drawn again. if (!rebuilt.hasAttribute('data-segment-id')) rebuilt.setAttribute('data-segment-id', segment.id); // This row is replaced HERE, not by the bubble: what drew it cleans up first // (the bubble follows the new element and cleans that one up when it goes). toolCallRenderer.cleanup?.(element, segment); element.replaceWith(rebuilt); toolCallRenderer.setup?.(rebuilt, segment); } }; if (custom || drawn || hidden || isPlaceholder(element)) { rebuild(toolCallRenderer.render(segment)); return; } // Asked here, past the hide and the renderer, so an app's `details` is never asked // for a call it cannot draw — and once: a rebuild draws with this same answer. const behind = behindOf(segment); const input = behind.kind === 'parts' ? describeInput(segment) : ''; const outcome = behind.kind === 'parts' ? outcomeOf(segment) : null; const wantsDetail = behind.kind === 'body' || !!input || !!outcome; const holdsAppDetail = !!appDetailOf(element); if (wantsDetail !== (element.tagName === 'DETAILS') || (wantsDetail && (behind.kind === 'body') !== holdsAppDetail)) { rebuild(drawDefault(segment, behind)); return; } element.setAttribute('data-status', status); const badge = element.querySelector('.aparte-tool-state'); if (badge) badge.innerHTML = stateBadge(segment); setQuiet(element, segment); setName(element, segment); setTarget(element, segment); setNote(element, segment); if (behind.kind === 'body') { setBody(element, behind.body); return; } setPart(element, 'input', input, 'toolInput'); setPart(element, 'output', outcome?.text ?? '', outcome?.key ?? 'toolOutput'); highlightParts(element); }, setup: (element, segment) => { // Set up right after `render`, so the renderer in effect now is the one behind the // row: remembered for its updates, its relabels and its cleanup. const hidden = contextConfig().isToolHidden(segment.toolCall?.name ?? 'tool'); const customRenderer = hidden ? undefined : contextConfig().getToolRenderer(segment.toolCall?.name); if (customRenderer) behind.set(element, customRenderer); if (isPlaceholder(element)) return; // The one control of ours is each part's copy button. The approval buttons that // used to be wired here dispatched `aparte-tool-decision`; the decision is // answered at the composer now, and the transcript holds no decision control. wireParts(element); highlightParts(element); if (customRenderer) drawnBy.set(element, customRenderer); customRenderer?.setup?.(element, segment); }, /** * The row leaves for good: the registered renderer that drew it, if any, cleans up. A * cleanup that throws is reported and goes no further: the row is replaced or removed * all the same, and the stream that caused it is not interrupted. */ cleanup: (element, segment) => { behind.delete(element); const custom = drawnBy.get(element); if (!custom) return; drawnBy.delete(element); try { custom.cleanup?.(element, segment); } catch (err) { console.error('[aparte] a tool renderer\\'s cleanup threw', err); } }, // CSS lives in styles/segment/ — see that folder for why a // built-in's rules belong there. `getStyles` stays for a CONSUMER's renderer, which // has no other way onto the page. getStyles: () => '' }"
|
|
37917
|
+
"default": "{ type: 'tool_call', render: (segment) => { const name = segment.toolCall?.name ?? 'tool'; /* * A tool waiting for a person is a STATE of the pill now, not a control. * * The Approve / Reject buttons were here, and they were the only decision * surface in the whole library that lived in the transcript. They are at the * composer now, which is where every other request for the user already went — * so this is the ANCHOR: the thing you scroll to, and the thing the panel is * about. Nothing clickable, no role, no tab stop, no pointer (ratified decision * #8: an undeclared affordance is not half-rendered either). * * It also fixes a defect by construction rather than by guarding: a segment * restored from storage used to repaint live buttons wired to a listener that * had gone with the page. * * And removing the branch un-shadows a seam that was said to be missing. It ran * BEFORE the per-tool renderer lookup below, so `registerToolRenderer` could * never draw anything while a tool awaited approval. The lookup is now first, * and a tool renders its own surface at every status. */ if (contextConfig().isToolHidden(name)) return placeholderMarkup(segment); const customRenderer = contextConfig().getToolRenderer(name); if (customRenderer) { // Its stylesheet, here as well as on the live path: this is what runs when a // stored conversation is re-rendered, and nothing replays `tool-start` for // history. Idempotent, keyed by renderer. injectToolRendererStyles(name, customRenderer); // Drawing nothing hides the call, the same element as a display's `hidden` // — it used to bring back the default row here while the live path dropped // the call, so a reload showed what the live chat had hidden. const out = customRenderer.render(segment); if (out instanceof HTMLElement) { drawnBy.set(out, customRenderer); behind.set(out, customRenderer); } return out || placeholderMarkup(segment); } const line = toolLineOf(segment, contextConfig()); return drawDefault(segment, behindOf(segment, line), line); }, /** * The pill's glyphs, and the label it wears while a person is deciding. * * The two highest-stakes strings in the library — the approval labels — are no * longer here: they are on the panel, which relabels itself. This still matters * though, because the request the pill describes stays open for as long as * somebody takes to decide, which is exactly long enough for a language switch. * * No child node is added or removed, per the relabel contract. */ relabel: (element, segment) => { if (isPlaceholder(element)) return; const cfg = contextConfig(); // A registered renderer owns its markup, so none of the selectors below exist // in it; its own `relabel` — when it declares one — is the only thing that can // re-read the locale for it. const custom = drawerOf(element, cfg.getToolRenderer(segment.toolCall?.name) ?? null); if (custom) { custom.relabel?.(element, segment); return; } // The provider is asked again: its words are in the reader's language too. const line = toolLineOf(segment, cfg); const icon = element.querySelector('.aparte-tool-icon'); if (icon) icon.innerHTML = iconOf(segment); setName(element, segment, line); setTarget(element, segment, line); setActivity(element, segment, line); setNote(element, segment, line); setOpen(element, line, false); // The part labels are locale text too; the parts themselves stay (relabel adds none). const inputLabel = element.querySelector('[data-part=\"input\"] .aparte-tool-part-label'); if (inputLabel) inputLabel.textContent = cfg.t('toolInput'); element.querySelector('[data-part=\"input\"] .aparte-tool-part-body')?.setAttribute('aria-label', cfg.t('toolInput')); const outcome = outcomeOf(segment); const outputLabel = element.querySelector('[data-part=\"output\"] .aparte-tool-part-label'); if (outputLabel && outcome) outputLabel.textContent = cfg.t(outcome.key); if (outcome) element.querySelector('[data-part=\"output\"] .aparte-tool-part-body')?.setAttribute('aria-label', cfg.t(outcome.key)); for (const button of element.querySelectorAll<HTMLElement>('.aparte-tool-copy')) relabelCopyButton(button); // An app's detail may hold words in the reader's language too: its function is // asked again, and what it draws now is written into the nodes already there. const appDetail = appDetailOf(element); if (appDetail) { const behind = behindOf(segment, line, element); if (behind.kind === 'body') relabelBody(appDetail, behind.body); } // Through `stateBadge`, which is the whole point of it existing. // // This used to rebuild the badge by hand as the ICON ALONE, so any config change // — `setLocale`, `setIconProvider`, `registerTool`, `reset()`, anything that // calls `_notify()` — permanently deleted the localized state word that // `stateBadge` renders beside it. \"✓ Done\" became \"✓\", and `pending`'s \"Running\" // became empty. Four of five statuses regressed; only `awaiting-approval` // survived, because a second line below re-wrote it. // // Which is exactly what `stateBadge`'s own docblock says it prevents: \"One // function so `render` and `update` cannot disagree\". `relabel` was never folded // in. It is now, so there is no third spelling of the badge to keep in step — // and the approval-waiting special case goes with it, since `stateBadge` already // returns the localized `approvalWaiting` for that status. const statusEl = element.querySelector('.aparte-tool-state'); if (statusEl) statusEl.innerHTML = stateBadge(segment); setQuiet(element, segment); }, /** * Patch in place. NEVER re-render, and never touch `open`. * * Without an `update` the bubble replaces the element wholesale — and a tool call * changes status several times per turn, so a disclosure the reader opened would * slam shut under them every time. The same rule the reasoning block has, for the * same reason: `collapsed` is honoured only when an update explicitly carries it. * * The one case that cannot be patched is a change of ELEMENT: a call that had * neither arguments nor a result rendered as a plain pill, and gaining a result * makes it a `<details>`. That falls back to a rebuild, which costs nothing because * there was no disclosure to lose. */ update: (element, segment) => { const status = segment.status ?? 'pending'; const hidden = contextConfig().isToolHidden(segment.toolCall?.name ?? 'tool'); // A hidden call stays hidden: its placeholder only follows the status. if (hidden && isPlaceholder(element)) { element.setAttribute('data-status', status); return; } /* * Three cases this cannot patch, and each rebuilds instead. * * A registered tool renderer owns the WHOLE markup, so none of the selectors * below exist in it — patching would fail silently and that segment would * simply stop updating. Before this file had an `update` at all, the bubble * rebuilt on every change, which re-invoked their render; a rebuild keeps that * behaviour exactly. * * And a change of ELEMENT: a call with neither arguments nor a result renders * as a plain pill, and gaining either makes it a `<details>`. Nothing is lost * there — there was no disclosure to keep open. * * And a change of what is BEHIND the line, the app's detail for core's parts or * the other way: patched, the parts would be written around the app's markup. * That happens when a display gains or drops `details` while a turn is still * streaming, before the bubble redraws. */ // The renderer that DREW this row, and the one in effect now. They differ when one // was registered or dropped since; the row is then rebuilt by the current one. const custom = hidden ? null : (contextConfig().getToolRenderer(segment.toolCall?.name) ?? null); const drawn = isPlaceholder(element) ? null : drawerOf(element, custom); // A registered renderer that declares `update` owns the patch — a mounted // preview or an opened disclosure in its markup survives the change. One // that does not is rebuilt, as it always was. // Never on a placeholder: it is not the renderer's markup, and a call it drew as // nothing may draw something now — a rebuild asks it. if (drawn && drawn === custom && drawn.update && !isPlaceholder(element)) { drawn.update(element, segment); return; } const rebuild = (out: HTMLElement | string): HTMLElement | null => { // A `<template>`, not the bubble's own converter: this file is a renderer // and must not import from the component that consumes it. const tpl = document.createElement('template'); tpl.innerHTML = typeof out === 'string' ? out.trim() : ''; const rebuilt = (typeof out === 'string' ? tpl.content.firstElementChild : out) as HTMLElement | null; if (rebuilt) { // The bubble stamps a renderer's root on its own render; this path must too, // or the next update misses the row and the whole bubble is drawn again. if (!rebuilt.hasAttribute('data-segment-id')) rebuilt.setAttribute('data-segment-id', segment.id); // This row is replaced HERE, not by the bubble: what drew it cleans up first // (the bubble follows the new element and cleans that one up when it goes). toolCallRenderer.cleanup?.(element, segment); element.replaceWith(rebuilt); toolCallRenderer.setup?.(rebuilt, segment); } return rebuilt; }; if (custom || drawn || hidden || isPlaceholder(element)) { rebuild(toolCallRenderer.render(segment)); return; } // Asked here, past the hide and the renderer, so an app's `details` is never asked // for a call it cannot draw — and once: a rebuild draws with this same answer. const line = toolLineOf(segment, contextConfig()); const behind = behindOf(segment, line, element); const input = behind.kind === 'parts' ? describeInput(segment) : ''; const outcome = behind.kind === 'parts' ? outcomeOf(segment) : null; const wantsDetail = behind.kind === 'body' || !!input || !!outcome; const holdsAppDetail = !!appDetailOf(element); const disclosure = disclosureOf(element); // A row with a detail and an Open button wraps its disclosure (see `drawDefault`): the // button coming or going is a change of shape too. What the reader opened is kept. const wrapped = !!disclosure && disclosure !== element; if (wantsDetail !== !!disclosure || (wantsDetail && (behind.kind === 'body') !== holdsAppDetail) || (wantsDetail && wrapped !== !!openOf(line))) { const wasOpen = disclosure?.open; const now = rebuild(drawDefault(segment, behind, line)); const next = now && wasOpen !== undefined ? disclosureOf(now) : null; if (next && wasOpen !== undefined) next.open = wasOpen; return; } element.setAttribute('data-status', status); const badge = element.querySelector('.aparte-tool-state'); if (badge) badge.innerHTML = stateBadge(segment); setQuiet(element, segment); setName(element, segment, line); setTarget(element, segment, line); setActivity(element, segment, line); setNote(element, segment, line); setOpen(element, line, true); if (behind.kind === 'body') { setBody(element, behind.body); return; } setPart(element, 'input', input, 'toolInput'); setPart(element, 'output', outcome?.text ?? '', outcome?.key ?? 'toolOutput'); highlightParts(element); }, setup: (element, segment) => { // Set up right after `render`, so the renderer in effect now is the one behind the // row: remembered for its updates, its relabels and its cleanup. const hidden = contextConfig().isToolHidden(segment.toolCall?.name ?? 'tool'); const customRenderer = hidden ? undefined : contextConfig().getToolRenderer(segment.toolCall?.name); if (customRenderer) behind.set(element, customRenderer); if (isPlaceholder(element)) return; // A line that opens elsewhere: its button, from the provider's answer of this draw. if (!customRenderer) { setOpen(element, toolLineOf(segment, contextConfig()), false); wireOpen(element); } // The other control of ours is each part's copy button. The approval buttons that // used to be wired here dispatched `aparte-tool-decision`; the decision is // answered at the composer now, and the transcript holds no decision control. wireParts(element); highlightParts(element); if (customRenderer) drawnBy.set(element, customRenderer); customRenderer?.setup?.(element, segment); }, /** * The row leaves for good: the registered renderer that drew it, if any, cleans up. A * cleanup that throws is reported and goes no further: the row is replaced or removed * all the same, and the stream that caused it is not interrupted. */ cleanup: (element, segment) => { behind.delete(element); const custom = drawnBy.get(element); if (!custom) return; drawnBy.delete(element); try { custom.cleanup?.(element, segment); } catch (err) { console.error('[aparte] a tool renderer\\'s cleanup threw', err); } }, // CSS lives in styles/segment/ — see that folder for why a // built-in's rules belong there. `getStyles` stays for a CONSUMER's renderer, which // has no other way onto the page. getStyles: () => '' }"
|
|
36762
37918
|
}
|
|
36763
37919
|
],
|
|
36764
37920
|
"exports": [
|