@mgamadeus/ddd-agents 0.1.1 → 0.1.3
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/README.md +129 -0
- package/dist/chat.js +407 -265
- package/dist/chat.js.map +1 -1
- package/dist/chunks/{ConversationMessageInputComposerWidgets-BO3jS0eZ.js → ConversationMessageInputComposerWidgets-r_RwCqr7.js} +11 -8
- package/dist/chunks/ConversationMessageInputComposerWidgets-r_RwCqr7.js.map +1 -0
- package/dist/chunks/{WebSearchResultsConversationWidget-H6cbTapV.js → WebSearchResultsConversationWidget-BXt98hGu.js} +161 -102
- package/dist/chunks/WebSearchResultsConversationWidget-BXt98hGu.js.map +1 -0
- package/dist/chunks/{canvas-behaviours-AvzKSYyv.js → canvas-behaviours-BpN_1xdZ.js} +2 -2
- package/dist/chunks/{canvas-behaviours-AvzKSYyv.js.map → canvas-behaviours-BpN_1xdZ.js.map} +1 -1
- package/dist/chunks/{canvas-reducers-Cdxt8yDF.js → canvas-reducers-CuX6L1zg.js} +3 -3
- package/dist/chunks/{canvas-reducers-Cdxt8yDF.js.map → canvas-reducers-CuX6L1zg.js.map} +1 -1
- package/dist/chunks/{canvasBodies-CsLrZ-M-.js → canvasBodies-Ds-cTn47.js} +9 -6
- package/dist/chunks/{canvasBodies-CsLrZ-M-.js.map → canvasBodies-Ds-cTn47.js.map} +1 -1
- package/dist/chunks/{canvasStorage-EvQsGdto.js → canvasStorage-DHNluopA.js} +2 -2
- package/dist/chunks/{canvasStorage-EvQsGdto.js.map → canvasStorage-DHNluopA.js.map} +1 -1
- package/dist/chunks/compose-attachment-message-text-FvVJbrge.js +8 -0
- package/dist/chunks/compose-attachment-message-text-FvVJbrge.js.map +1 -0
- package/dist/chunks/{contract-BxmMxYPF.js → contract-kmmw_19Y.js} +5 -4
- package/dist/chunks/contract-kmmw_19Y.js.map +1 -0
- package/dist/chunks/{conversation-BEF0aesf.js → conversation-CbWEHPbL.js} +12 -3
- package/dist/chunks/conversation-CbWEHPbL.js.map +1 -0
- package/dist/chunks/host-color-scheme-Jhb7JZR7.js +30 -0
- package/dist/chunks/host-color-scheme-Jhb7JZR7.js.map +1 -0
- package/dist/chunks/{index-7Qc_3GbG.js → link-navigation-DyTApNeA.js} +156 -73
- package/dist/chunks/link-navigation-DyTApNeA.js.map +1 -0
- package/dist/chunks/text-key-DnoZ4lAk.js +6 -0
- package/dist/chunks/text-key-DnoZ4lAk.js.map +1 -0
- package/dist/chunks/{widget-click-signal-sources-1gIs1yiN.js → widget-click-signal-sources-Ch-y8gxw.js} +9 -5
- package/dist/chunks/{widget-click-signal-sources-1gIs1yiN.js.map → widget-click-signal-sources-Ch-y8gxw.js.map} +1 -1
- package/dist/chunks/{widget-image-readiness-signal-D3ci53xr.js → widget-image-readiness-signal-C5yaKpJJ.js} +2 -2
- package/dist/chunks/{widget-image-readiness-signal-D3ci53xr.js.map → widget-image-readiness-signal-C5yaKpJJ.js.map} +1 -1
- package/dist/chunks/{widget-name-resolver-D_ZzXy-Q.js → widget-name-resolver-DboFMAq2.js} +25 -25
- package/dist/chunks/widget-name-resolver-DboFMAq2.js.map +1 -0
- package/dist/chunks/{withPollingChangeSubscription-B16htQGd.js → withPollingChangeSubscription-CWavoKjJ.js} +7 -3
- package/dist/chunks/withPollingChangeSubscription-CWavoKjJ.js.map +1 -0
- package/dist/client-testing.js +7 -8
- package/dist/client-testing.js.map +1 -1
- package/dist/client.js +470 -2
- package/dist/client.js.map +1 -1
- package/dist/contract.js +6 -5
- package/dist/files/chat/Conversation.module.scss +1 -1
- package/dist/files/chat/ConversationViewBody/ConversationViewBody.module.scss +1 -1
- package/dist/files/i18n-keys.json +1636 -0
- package/dist/files/image-render/WidgetImageRender.module.scss +9 -3
- package/dist/files/styles/_surfaces.scss +6 -6
- package/dist/image-render.js +7 -7
- package/dist/index.js +64 -55
- package/dist/index.js.map +1 -1
- package/dist/kit.js +2 -2
- package/dist/preview.js +8 -8
- package/dist/provider.js +61 -52
- package/dist/provider.js.map +1 -1
- package/dist/renderer.js +16 -15
- package/dist/styles.css +318 -122
- package/dist/types/chat/AgentChat/AgentChat.d.ts +6 -0
- package/dist/types/chat/AgentChatActivityDots/AgentChatActivityDots.d.ts +11 -0
- package/dist/types/chat/AgentChatActivityIndicator/AgentChatActivityIndicator.d.ts +7 -2
- package/dist/types/chat/AgentChatActivityStack/AgentChatActivityStack.d.ts +15 -0
- package/dist/types/chat/controller/AgentChatController.d.ts +38 -1
- package/dist/types/chat/controller/activity-ticker.d.ts +5 -2
- package/dist/types/chat/controller/chat-activity-timing.d.ts +30 -0
- package/dist/types/chat/controller/use-activity-ticker.d.ts +6 -0
- package/dist/types/chat/controller/use-conversation-activity.d.ts +6 -2
- package/dist/types/client/AgentsConversationClient.d.ts +7 -1
- package/dist/types/client/compose-attachment-message-text.d.ts +7 -0
- package/dist/types/client/http/agents-http-mappers.d.ts +30 -0
- package/dist/types/client/http/agents-http-wire.d.ts +201 -0
- package/dist/types/client/http/createAgentsHttpConversationClient.d.ts +64 -0
- package/dist/types/client/polling/createPollingConversationChangeSubscription.d.ts +7 -4
- package/dist/types/client/polling/withPollingChangeSubscription.d.ts +3 -2
- package/dist/types/contract/conversation.d.ts +35 -0
- package/dist/types/entries/chat.d.ts +6 -2
- package/dist/types/entries/client.d.ts +4 -0
- package/dist/types/entries/renderer.d.ts +1 -0
- package/dist/types/entries/widgets.d.ts +1 -1
- package/dist/types/provider/components/types.d.ts +5 -2
- package/dist/types/provider/environment.d.ts +20 -0
- package/dist/types/provider/host-color-scheme.d.ts +24 -0
- package/dist/types/provider/index.d.ts +4 -0
- package/dist/types/provider/link-navigation.d.ts +28 -0
- package/dist/types/provider/text-key.d.ts +6 -0
- package/dist/types/renderer/MarkdownLink.d.ts +8 -6
- package/dist/types/widgets/CanvasLauncherWidget/use-canvas-viable.d.ts +43 -9
- package/dist/types/widgets/EntityMentionConversationWidget/shared/entity-mention-presentation.d.ts +1 -1
- package/dist/types/widgets/_shared/modern/WidgetKpiValue.d.ts +2 -1
- package/dist/widgets.js +43 -40
- package/package.json +4 -2
- package/public-api.json +101 -18
- package/dist/chunks/ConversationMessageInputComposerWidgets-BO3jS0eZ.js.map +0 -1
- package/dist/chunks/WebSearchResultsConversationWidget-H6cbTapV.js.map +0 -1
- package/dist/chunks/contract-BxmMxYPF.js.map +0 -1
- package/dist/chunks/conversation-BEF0aesf.js.map +0 -1
- package/dist/chunks/index-7Qc_3GbG.js.map +0 -1
- package/dist/chunks/widget-name-resolver-D_ZzXy-Q.js.map +0 -1
- package/dist/chunks/withPollingChangeSubscription-B16htQGd.js.map +0 -1
package/public-api.json
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
".": {
|
|
3
3
|
"values": [
|
|
4
4
|
"AGENTS_ICON_NAMES",
|
|
5
|
+
"AGENTS_THEME_ATTRIBUTE_NAME",
|
|
6
|
+
"AgentsLink",
|
|
5
7
|
"AgentsProvider",
|
|
6
8
|
"Button",
|
|
7
9
|
"Checkbox",
|
|
8
10
|
"ConversationSearchResultsList",
|
|
11
|
+
"DEFAULT_AGENTS_COMPONENTS",
|
|
9
12
|
"DEFAULT_AGENTS_TEXTS",
|
|
10
13
|
"DEFAULT_WIDGET_IMAGE_CAPTURE_READ_PATH_PREFIX",
|
|
11
14
|
"DEFAULT_WIDGET_SELF_HYDRATION_KEY_FIELD_NAME",
|
|
@@ -43,6 +46,7 @@
|
|
|
43
46
|
"buildWidgetOfAnotherAgentSpaceExplanation",
|
|
44
47
|
"classNames",
|
|
45
48
|
"escapePlainTextForText",
|
|
49
|
+
"followHostColorScheme",
|
|
46
50
|
"getAgentDisplayName",
|
|
47
51
|
"getAgentsEnvironment",
|
|
48
52
|
"getEntityDetailBody",
|
|
@@ -70,12 +74,15 @@
|
|
|
70
74
|
"useAgentsActiveAgentSpaceKey",
|
|
71
75
|
"useAgentsBudgetLimit",
|
|
72
76
|
"useAgentsComponents",
|
|
77
|
+
"useAgentsConversationClient",
|
|
73
78
|
"useAgentsEnvironment",
|
|
79
|
+
"useAgentsLinkNavigation",
|
|
74
80
|
"useAgentsMapsLoader",
|
|
75
81
|
"useAgentsOwnerSettings",
|
|
76
82
|
"useAgentsStateDispatch",
|
|
77
83
|
"useAgentsStateSelector",
|
|
78
|
-
"useAgentsTexts"
|
|
84
|
+
"useAgentsTexts",
|
|
85
|
+
"useOptionalAgentsConversationClient"
|
|
79
86
|
],
|
|
80
87
|
"types": [
|
|
81
88
|
"AgentsAssistantBackgroundProps",
|
|
@@ -100,6 +107,8 @@
|
|
|
100
107
|
"AgentsIconProps",
|
|
101
108
|
"AgentsIconSize",
|
|
102
109
|
"AgentsInteractiveSurfaceProps",
|
|
110
|
+
"AgentsLinkNavigation",
|
|
111
|
+
"AgentsLinkProps",
|
|
103
112
|
"AgentsLoadingSpinnerProps",
|
|
104
113
|
"AgentsMapMarkerProps",
|
|
105
114
|
"AgentsMapPosition",
|
|
@@ -146,7 +155,8 @@
|
|
|
146
155
|
"ComposedViewDataSourceFetcher",
|
|
147
156
|
"ConceptExplainerTypeDefinition",
|
|
148
157
|
"ConversationWidgetEntry",
|
|
149
|
-
"EntityDetailBodyDefinition"
|
|
158
|
+
"EntityDetailBodyDefinition",
|
|
159
|
+
"HostColorSchemeSource"
|
|
150
160
|
]
|
|
151
161
|
},
|
|
152
162
|
"./renderer": {
|
|
@@ -167,6 +177,8 @@
|
|
|
167
177
|
"ConversationWidgetHost",
|
|
168
178
|
"ConversationWidgetRenderContext",
|
|
169
179
|
"DEFAULT_CANVAS_WIDTH_PERCENT",
|
|
180
|
+
"LEGACY_CARD_CLICK_ORIGIN",
|
|
181
|
+
"MarkdownLink",
|
|
170
182
|
"ReadOnlyConversationWidgetProvider",
|
|
171
183
|
"StandaloneConversationWidgetProvider",
|
|
172
184
|
"WIDGET_RENDER_REPORT_SIGNAL_SOURCE",
|
|
@@ -244,8 +256,7 @@
|
|
|
244
256
|
"useWidgetHydration",
|
|
245
257
|
"useWidgetMemory",
|
|
246
258
|
"useWidgetRenderReporter",
|
|
247
|
-
"withConversationWidgetVariant"
|
|
248
|
-
"LEGACY_CARD_CLICK_ORIGIN"
|
|
259
|
+
"withConversationWidgetVariant"
|
|
249
260
|
],
|
|
250
261
|
"types": [
|
|
251
262
|
"AgentsWidgetHydrationState",
|
|
@@ -279,6 +290,7 @@
|
|
|
279
290
|
"ConversationWidgetVariant",
|
|
280
291
|
"InjectSignalOptions",
|
|
281
292
|
"LastClosedCanvas",
|
|
293
|
+
"MarkdownLinkProps",
|
|
282
294
|
"OpenEngagementEditConversationWidgetPayload",
|
|
283
295
|
"OpenEntityActionTarget",
|
|
284
296
|
"PackageCanvasId",
|
|
@@ -337,14 +349,17 @@
|
|
|
337
349
|
"CANVAS_VIABLE_MIN_WIDTH",
|
|
338
350
|
"CUSTOM_VISUALIZATION_SANDBOX_CONFIG",
|
|
339
351
|
"CanvasLauncherWidget",
|
|
352
|
+
"CanvasViabilityContext",
|
|
353
|
+
"CanvasWidgetCard",
|
|
340
354
|
"CanvasWidgetSwitch",
|
|
341
|
-
"
|
|
355
|
+
"CardFooter",
|
|
342
356
|
"ClockConversationWidget",
|
|
343
357
|
"ConceptExplainerConversationWidget",
|
|
344
358
|
"ConversationSearchResultsConversationWidget",
|
|
345
359
|
"CurrencyConverterConversationWidget",
|
|
346
360
|
"CustomVisualizationConversationWidget",
|
|
347
361
|
"DonePill",
|
|
362
|
+
"ElementWidthCanvasViability",
|
|
348
363
|
"EntityMentionConversationWidget",
|
|
349
364
|
"HeroValue",
|
|
350
365
|
"MultiChoiceConversationWidget",
|
|
@@ -356,6 +371,7 @@
|
|
|
356
371
|
"SuggestedActions",
|
|
357
372
|
"ToolTraceConversationWidget",
|
|
358
373
|
"WebSearchResultsConversationWidget",
|
|
374
|
+
"WidgetFooter",
|
|
359
375
|
"WidgetKpiValue",
|
|
360
376
|
"WidgetLabel",
|
|
361
377
|
"WidgetListRow",
|
|
@@ -374,17 +390,19 @@
|
|
|
374
390
|
"pickSafeAlias",
|
|
375
391
|
"pickSafeAliases",
|
|
376
392
|
"pickText",
|
|
393
|
+
"readCanvasViable",
|
|
377
394
|
"readConceptExplainerNumber",
|
|
378
395
|
"readConceptExplainerValue",
|
|
379
396
|
"resolveCustomVisualizationFrameUrl",
|
|
380
397
|
"useCanvasViable",
|
|
381
|
-
"useElementVisible"
|
|
382
|
-
"CanvasWidgetCard",
|
|
383
|
-
"CardFooter"
|
|
398
|
+
"useElementVisible"
|
|
384
399
|
],
|
|
385
400
|
"types": [
|
|
386
401
|
"CanvasLauncherWidgetCanvas",
|
|
387
402
|
"CanvasLauncherWidgetProps",
|
|
403
|
+
"CanvasViabilitySource",
|
|
404
|
+
"CanvasWidgetCardCanvas",
|
|
405
|
+
"CanvasWidgetCardProps",
|
|
388
406
|
"ConceptExplainerStep",
|
|
389
407
|
"ConceptExplainerStepsInput",
|
|
390
408
|
"ConceptExplainerText",
|
|
@@ -399,13 +417,12 @@
|
|
|
399
417
|
"WidgetStatusTone",
|
|
400
418
|
"WidgetSurfaceLevel",
|
|
401
419
|
"WidgetSurfaceProps",
|
|
402
|
-
"WidgetSurfaceSkeletonProps"
|
|
403
|
-
"CanvasWidgetCardProps",
|
|
404
|
-
"CanvasWidgetCardCanvas"
|
|
420
|
+
"WidgetSurfaceSkeletonProps"
|
|
405
421
|
]
|
|
406
422
|
},
|
|
407
423
|
"./contract": {
|
|
408
424
|
"values": [
|
|
425
|
+
"AGENTS_CLIENT_CONTEXT_LIMITS",
|
|
409
426
|
"AGENTS_CLIENT_ERROR_CODE_REQUEST_ABORTED",
|
|
410
427
|
"AgentsClientError",
|
|
411
428
|
"CONVERSATION_RUN_STATES_THAT_END_THE_CONVERSATION",
|
|
@@ -414,6 +431,7 @@
|
|
|
414
431
|
"readConversationRunStatusOfRunState"
|
|
415
432
|
],
|
|
416
433
|
"types": [
|
|
434
|
+
"AgentsClientContext",
|
|
417
435
|
"AgentsClientErrorKind",
|
|
418
436
|
"AgentsConversation",
|
|
419
437
|
"AgentsConversationMessage",
|
|
@@ -435,6 +453,7 @@
|
|
|
435
453
|
"ConversationMessagesPage",
|
|
436
454
|
"ConversationProgressStep",
|
|
437
455
|
"ConversationRunState",
|
|
456
|
+
"ConversationRunStateRead",
|
|
438
457
|
"ConversationRunStatus",
|
|
439
458
|
"ConversationSearchGroup",
|
|
440
459
|
"ConversationSearchOptions",
|
|
@@ -450,29 +469,70 @@
|
|
|
450
469
|
},
|
|
451
470
|
"./client": {
|
|
452
471
|
"values": [
|
|
472
|
+
"AGENTS_HTTP_DEFAULT_CHANGED_MESSAGES_PAGE_SIZE",
|
|
453
473
|
"AgentsConversationClientProvider",
|
|
454
474
|
"POLLING_IDLE_INTERVAL_MS",
|
|
455
475
|
"POLLING_LOCAL_ACTIVITY_WINDOW_MS",
|
|
456
476
|
"POLLING_MAX_BACKOFF_MS",
|
|
457
477
|
"POLLING_RUNNING_INTERVAL_MS",
|
|
478
|
+
"composeAttachmentMessageText",
|
|
479
|
+
"createAgentsHttpConversationClient",
|
|
458
480
|
"createPollingConversationChangeSubscription",
|
|
481
|
+
"mapClientContextToWire",
|
|
482
|
+
"mapHttpFailureToAgentsClientError",
|
|
483
|
+
"mapWireConversation",
|
|
484
|
+
"mapWireConversationActivity",
|
|
485
|
+
"mapWireConversationMessage",
|
|
486
|
+
"mapWireConversationRunState",
|
|
487
|
+
"mapWireSearchGroup",
|
|
488
|
+
"mapWireSearchHit",
|
|
489
|
+
"mapWireSelectableModel",
|
|
459
490
|
"readPolledRunStatus",
|
|
491
|
+
"readWireSetElements",
|
|
460
492
|
"useAgentsConversationClient",
|
|
461
493
|
"useOptionalAgentsConversationClient",
|
|
462
494
|
"withPollingChangeSubscription"
|
|
463
495
|
],
|
|
464
496
|
"types": [
|
|
497
|
+
"AgentsClientContextOperation",
|
|
465
498
|
"AgentsConversationClient",
|
|
466
499
|
"AgentsConversationClientBindingOptions",
|
|
467
500
|
"AgentsConversationClientProviderProps",
|
|
468
501
|
"AgentsConversationClientWithChangeSubscription",
|
|
469
502
|
"AgentsConversationOperation",
|
|
470
503
|
"AgentsExtraRequestParameters",
|
|
504
|
+
"AgentsHttpConversationClientOptions",
|
|
505
|
+
"AgentsHttpFetchOptions",
|
|
471
506
|
"ConversationMetadataReader",
|
|
472
507
|
"PollingConversationChangeSubscription",
|
|
473
508
|
"PollingConversationChangeSubscriptionOptions",
|
|
474
509
|
"PollingDocumentVisibility",
|
|
475
|
-
"PollingTimers"
|
|
510
|
+
"PollingTimers",
|
|
511
|
+
"WireActivityLine",
|
|
512
|
+
"WireChangeHistory",
|
|
513
|
+
"WireClientContext",
|
|
514
|
+
"WireClientContextRouteParameter",
|
|
515
|
+
"WireConversation",
|
|
516
|
+
"WireConversationActivityResponse",
|
|
517
|
+
"WireConversationMessage",
|
|
518
|
+
"WireConversationMessageSearchResponse",
|
|
519
|
+
"WireConversationMessagesResponse",
|
|
520
|
+
"WireConversationResponse",
|
|
521
|
+
"WireConversationRunStateResponse",
|
|
522
|
+
"WireConversationSearchGroup",
|
|
523
|
+
"WireConversationSearchResponse",
|
|
524
|
+
"WireConversationStartResponse",
|
|
525
|
+
"WireConversationSummary",
|
|
526
|
+
"WireConversationsResponse",
|
|
527
|
+
"WireCustomerProgressStep",
|
|
528
|
+
"WireDelegationSubAgentRecord",
|
|
529
|
+
"WireDelegationSubAgentRun",
|
|
530
|
+
"WireErrorBody",
|
|
531
|
+
"WireSelectableModel",
|
|
532
|
+
"WireSelectableModelsResponse",
|
|
533
|
+
"WireSemanticSearchHit",
|
|
534
|
+
"WireSet",
|
|
535
|
+
"WireToolCall"
|
|
476
536
|
]
|
|
477
537
|
},
|
|
478
538
|
"./client/testing": {
|
|
@@ -499,9 +559,12 @@
|
|
|
499
559
|
},
|
|
500
560
|
"./chat": {
|
|
501
561
|
"values": [
|
|
562
|
+
"ACTIVITY_STACK_VISIBLE_LINES",
|
|
502
563
|
"AgentChat",
|
|
564
|
+
"AgentChatActivityDots",
|
|
503
565
|
"AgentChatActivityHistory",
|
|
504
566
|
"AgentChatActivityIndicator",
|
|
567
|
+
"AgentChatActivityStack",
|
|
505
568
|
"AgentChatController",
|
|
506
569
|
"AgentsChatStateContainer",
|
|
507
570
|
"AgentsChatStoreProvider",
|
|
@@ -509,8 +572,9 @@
|
|
|
509
572
|
"CanvasRestoreOnMount",
|
|
510
573
|
"ConversationClosedBar",
|
|
511
574
|
"ConversationDeepLinkedWidget",
|
|
512
|
-
"
|
|
575
|
+
"ConversationErrorCard",
|
|
513
576
|
"ConversationErrorType",
|
|
577
|
+
"ConversationErrorWidget",
|
|
514
578
|
"ConversationMessageInput",
|
|
515
579
|
"ConversationMessageInputAttachmentsErrorBox",
|
|
516
580
|
"ConversationMessageInputAttachmentsPreviewStrip",
|
|
@@ -520,6 +584,7 @@
|
|
|
520
584
|
"ConversationMessageWidgets",
|
|
521
585
|
"ConversationView",
|
|
522
586
|
"ConversationWidgetProvider",
|
|
587
|
+
"DEFAULT_AGENT_CHAT_ACTIVITY_TIMING",
|
|
523
588
|
"EMPTY_AGENTS_CHAT_OPENING_REQUEST",
|
|
524
589
|
"INITIAL_AGENTS_CHAT_STATE",
|
|
525
590
|
"MAX_MESSAGE_LENGTH",
|
|
@@ -533,23 +598,30 @@
|
|
|
533
598
|
"normalizeServerMessageToMarkdown",
|
|
534
599
|
"readConversationErrorTypeOfRefusedSend",
|
|
535
600
|
"reduceAgentsChatState",
|
|
601
|
+
"resolveAgentChatActivityTiming",
|
|
536
602
|
"useActivityTicker",
|
|
537
603
|
"useAgentsChatSelector",
|
|
538
604
|
"useAgentsChatState",
|
|
539
605
|
"useAgentsChatStore",
|
|
606
|
+
"useAgentsConversationClient",
|
|
540
607
|
"useAgentsConversationRunStatus",
|
|
541
608
|
"useConversationMessageSearch",
|
|
542
609
|
"useConversationsSearch",
|
|
543
610
|
"useOptionalAgentsChatStore",
|
|
544
|
-
"
|
|
611
|
+
"useOptionalAgentsConversationClient"
|
|
545
612
|
],
|
|
546
613
|
"types": [
|
|
547
614
|
"ActivityTicker",
|
|
548
615
|
"ActivityTickerLine",
|
|
549
616
|
"ActivityTickerTurn",
|
|
550
617
|
"AgentActivity",
|
|
618
|
+
"AgentChatActivityDotsProps",
|
|
619
|
+
"AgentChatActivityDotsVariant",
|
|
551
620
|
"AgentChatActivityHistoryProps",
|
|
621
|
+
"AgentChatActivityIndicatorProps",
|
|
552
622
|
"AgentChatActivityProps",
|
|
623
|
+
"AgentChatActivityTiming",
|
|
624
|
+
"AgentChatComposerHandle",
|
|
553
625
|
"AgentChatControllerProps",
|
|
554
626
|
"AgentChatProps",
|
|
555
627
|
"AgentChatSendModelSource",
|
|
@@ -566,6 +638,7 @@
|
|
|
566
638
|
"ChatScrollTarget",
|
|
567
639
|
"ConversationClosedBarProps",
|
|
568
640
|
"ConversationDeepLinkedWidgetProps",
|
|
641
|
+
"ConversationErrorCardProps",
|
|
569
642
|
"ConversationErrorWidgetProps",
|
|
570
643
|
"ConversationMessageInputAttachmentPreview",
|
|
571
644
|
"ConversationMessageInputAttachmentUploadStatus",
|
|
@@ -579,9 +652,9 @@
|
|
|
579
652
|
"ConversationViewProps",
|
|
580
653
|
"ConversationWidgetProviderProps",
|
|
581
654
|
"ConversationsSearchState",
|
|
655
|
+
"ResolvedAgentChatActivityTiming",
|
|
582
656
|
"SendMessageHandler",
|
|
583
|
-
"SendMessageOptions"
|
|
584
|
-
"ConversationErrorCardProps"
|
|
657
|
+
"SendMessageOptions"
|
|
585
658
|
]
|
|
586
659
|
},
|
|
587
660
|
"./preview": {
|
|
@@ -652,10 +725,13 @@
|
|
|
652
725
|
"./provider": {
|
|
653
726
|
"values": [
|
|
654
727
|
"AGENTS_ICON_NAMES",
|
|
728
|
+
"AGENTS_THEME_ATTRIBUTE_NAME",
|
|
729
|
+
"AgentsLink",
|
|
655
730
|
"AgentsProvider",
|
|
656
731
|
"Button",
|
|
657
732
|
"Checkbox",
|
|
658
733
|
"ConversationSearchResultsList",
|
|
734
|
+
"DEFAULT_AGENTS_COMPONENTS",
|
|
659
735
|
"DEFAULT_AGENTS_TEXTS",
|
|
660
736
|
"DEFAULT_WIDGET_IMAGE_CAPTURE_READ_PATH_PREFIX",
|
|
661
737
|
"DEFAULT_WIDGET_SELF_HYDRATION_KEY_FIELD_NAME",
|
|
@@ -693,6 +769,7 @@
|
|
|
693
769
|
"buildWidgetOfAnotherAgentSpaceExplanation",
|
|
694
770
|
"classNames",
|
|
695
771
|
"escapePlainTextForText",
|
|
772
|
+
"followHostColorScheme",
|
|
696
773
|
"getAgentDisplayName",
|
|
697
774
|
"getAgentsEnvironment",
|
|
698
775
|
"getFurtherCanvasBehaviours",
|
|
@@ -710,12 +787,15 @@
|
|
|
710
787
|
"useAgentsActiveAgentSpaceKey",
|
|
711
788
|
"useAgentsBudgetLimit",
|
|
712
789
|
"useAgentsComponents",
|
|
790
|
+
"useAgentsConversationClient",
|
|
713
791
|
"useAgentsEnvironment",
|
|
792
|
+
"useAgentsLinkNavigation",
|
|
714
793
|
"useAgentsMapsLoader",
|
|
715
794
|
"useAgentsOwnerSettings",
|
|
716
795
|
"useAgentsStateDispatch",
|
|
717
796
|
"useAgentsStateSelector",
|
|
718
|
-
"useAgentsTexts"
|
|
797
|
+
"useAgentsTexts",
|
|
798
|
+
"useOptionalAgentsConversationClient"
|
|
719
799
|
],
|
|
720
800
|
"types": [
|
|
721
801
|
"AgentsAssistantBackgroundProps",
|
|
@@ -740,6 +820,8 @@
|
|
|
740
820
|
"AgentsIconProps",
|
|
741
821
|
"AgentsIconSize",
|
|
742
822
|
"AgentsInteractiveSurfaceProps",
|
|
823
|
+
"AgentsLinkNavigation",
|
|
824
|
+
"AgentsLinkProps",
|
|
743
825
|
"AgentsLoadingSpinnerProps",
|
|
744
826
|
"AgentsMapMarkerProps",
|
|
745
827
|
"AgentsMapPosition",
|
|
@@ -782,7 +864,8 @@
|
|
|
782
864
|
"AgentsWidgetFeatureGateProps",
|
|
783
865
|
"AgentsWidgetTextProps",
|
|
784
866
|
"AgentsWidgetTextTone",
|
|
785
|
-
"AgentsWidgetTextVariant"
|
|
867
|
+
"AgentsWidgetTextVariant",
|
|
868
|
+
"HostColorSchemeSource"
|
|
786
869
|
]
|
|
787
870
|
}
|
|
788
871
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationMessageInputComposerWidgets-BO3jS0eZ.js","sources":["../../src/chat/store/agents-chat-state.ts","../../src/chat/store/conversation-error-type.ts","../../src/chat/store/merge-chat-messages.ts","../../src/chat/store/reduce-agents-chat-state.ts","../../src/chat/store/create-agents-chat-store.ts","../../src/chat/store/use-agents-chat-store.tsx","../../src/renderer/ConversationWidgetContext.tsx","../../src/chat/ConversationMessageInput/ConversationMessageInputComposerWidgets/ConversationMessageInputComposerWidgets.tsx"],"sourcesContent":["import type {\n AgentsClientError,\n AgentsConversation,\n AgentsConversationMessage,\n PostedMessage,\n StartedConversation,\n} from \"../../contract/conversation\";\nimport type { ChatMessage } from \"../chat-message\";\nimport type { CanvasCreatedEntity, CanvasSliceState } from \"../../renderer/canvas/canvas-reducers\";\nimport type { CanvasOpenRequest } from \"../../renderer/canvas/canvas-state\";\nimport type { ConversationErrorType } from \"./conversation-error-type\";\n\n/**\n * How an entry point outside the chat hands a job over to the chat that opens next (one generic opening\n * request): the first visible message, or an invisible start signal so the agent speaks first, the entry point the\n * start comes from, and a widget to mount without a message (a page handing over a tool). Set before the chat mounts,\n * so a reset keeps it; the chat clears each part once it consumed it.\n */\nexport interface AgentsChatOpeningRequest {\n /** The first visible owner message of the next started conversation. */\n userMessage: string | null;\n /** The invisible start signal of the next started conversation (an empty visible message carries it). */\n startSignalText: string | null;\n /** The entry point the start comes from; the server reopens that entry point's recent conversation instead. */\n entryPointKey: string | null;\n /** The canonical wire name of a deep-linkable widget the chat mounts once, without a message. */\n deepLinkedWidgetName: string | null;\n}\n\n/** The state of one chat instance. */\nexport interface AgentsChatState extends CanvasSliceState {\n /** The conversation shown; null for a cold chat until a start or the metadata read brings it. */\n conversation: AgentsConversation | null;\n /** Null until the first page or a send; ordered by `indexInConversation`, the optimistic message last. */\n messages: ChatMessage[] | null;\n /** A send is on its way. */\n conversationLoading: boolean;\n /** The last read or send for this conversation came back. */\n conversationLoaded: boolean;\n /** An older page exists: the scroll-up load stays armed. */\n hasMoreOlder: boolean;\n /** The agent works on a turn (the controller mirrors the derived activity here; read by the launcher). */\n aiThinking: boolean;\n error: ConversationErrorType | null;\n /** Seconds until the quota frees up again; set only while `error` is RATE_LIMIT. */\n rateLimitRetryAfterSeconds: number | null;\n /**\n * The conversation the newest metadata or page read asked for; null after a reset. A late answer for another\n * conversation — or one that lands after a reset — is dropped.\n */\n requestedConversationId: number | null;\n /** A start is on its way; no second start is sent meanwhile. */\n startingNewConversation: boolean;\n /** The token of the start on its way; its answer applies only while it is still the pending one. */\n pendingStartToken: number | null;\n /**\n * How many starts this chat instance sent — the source of `pendingStartToken`. Survives a reset (like\n * `canvasMountCount`): the store outlives a remount of the chat, so a token is never reused for another start.\n */\n startTokenCount: number;\n openingRequest: AgentsChatOpeningRequest;\n}\n\nexport const EMPTY_AGENTS_CHAT_OPENING_REQUEST: AgentsChatOpeningRequest = {\n userMessage: null,\n startSignalText: null,\n entryPointKey: null,\n deepLinkedWidgetName: null,\n};\n\nexport const INITIAL_AGENTS_CHAT_STATE: AgentsChatState = {\n conversation: null,\n messages: null,\n conversationLoading: false,\n conversationLoaded: false,\n hasMoreOlder: false,\n aiThinking: false,\n error: null,\n rateLimitRetryAfterSeconds: null,\n requestedConversationId: null,\n startingNewConversation: false,\n pendingStartToken: null,\n startTokenCount: 0,\n openingRequest: EMPTY_AGENTS_CHAT_OPENING_REQUEST,\n canvas: null,\n lastClosedCanvas: null,\n canvasMountCount: 0,\n};\n\n/**\n * What happens to a chat instance. The read and send events carry the port's answers (`AgentsConversationClient`);\n * the controller dispatches the `…Requested` event before it calls the port and the `…Received` / `…Failed` event\n * with the answer.\n */\nexport type AgentsChatEvent =\n /** A conversation switch, an empty chat, the chat's unmount: everything goes except the opening request and the two counters. */\n | { type: \"reset\" }\n | { type: \"conversationMetadataRequested\"; conversationId: number }\n | { type: \"conversationMetadataReceived\"; conversationId: number; conversation: AgentsConversation }\n | { type: \"conversationMetadataFailed\"; conversationId: number }\n | { type: \"messagesPageRequested\"; conversationId: number }\n /** `hasMoreOlder` null: a changed-messages read, which says nothing about older pages. */\n | {\n type: \"messagesPageReceived\";\n conversationId: number;\n messages: AgentsConversationMessage[];\n hasMoreOlder: boolean | null;\n }\n | { type: \"messagePostRequested\"; message: ChatMessage }\n | { type: \"messagePostReceived\"; conversationId: number; posted: PostedMessage }\n | { type: \"messagePostFailed\"; error: AgentsClientError }\n /** Takes the next start token (`pendingStartToken`); the controller reads it after the dispatch. */\n | { type: \"startRequested\"; message: ChatMessage }\n | { type: \"startReceived\"; startToken: number; started: StartedConversation }\n | { type: \"startFailed\"; error: AgentsClientError }\n | { type: \"errorSet\"; error: ConversationErrorType | null }\n | { type: \"aiThinkingSet\"; aiThinking: boolean }\n /** Sets the named parts of the opening request; the others stay. */\n | { type: \"openingRequestSet\"; openingRequest: Partial<AgentsChatOpeningRequest> }\n | { type: \"canvasOpened\"; request: CanvasOpenRequest }\n | { type: \"canvasClosed\"; byCustomer: boolean }\n | { type: \"canvasResetForNewTurn\" }\n | { type: \"canvasCleared\" }\n | { type: \"canvasCreatedEntityIdSet\"; created: CanvasCreatedEntity };\n","import type { AgentsClientError } from \"../../contract/conversation\";\n\n/**\n * The error card the chat shows. A plain object with string values (not a TypeScript `enum`), so the chat store, the\n * view and an app's older chat state share one vocabulary without a nominal type in between.\n */\nexport const ConversationErrorType = {\n AI_BUDGET: \"AI_BUDGET\",\n /**\n * HTTP 429 from an AI endpoint — a per-minute/hour/day usage quota was hit. Distinct from AI_BUDGET (monthly budget):\n * this one clears on its own after the Retry-After window.\n */\n RATE_LIMIT: \"RATE_LIMIT\",\n NETWORK_ERROR: \"NETWORK_ERROR\",\n CONVERSATION_NOT_FOUND: \"CONVERSATION_NOT_FOUND\",\n /**\n * The backend run FAILED (e.g. the model provider returned an error). The raw provider error is admin-only (never\n * shown here); the owner gets a generic \"something went wrong\" card.\n */\n AGENT_ERROR: \"AGENT_ERROR\",\n /**\n * The conversation is COMPLETED/CANCELLED and refuses further owner input. Set from the server's stable error code\n * `CONVERSATION_CLOSED` or by the chat's own pre-send guard; the error card owns the copy.\n */\n CONVERSATION_CLOSED: \"CONVERSATION_CLOSED\",\n} as const;\n\nexport type ConversationErrorType = (typeof ConversationErrorType)[keyof typeof ConversationErrorType];\n\n/**\n * The error card of a refused send (post or start), read from the port's error. Only the stable outcomes select a\n * dedicated card; every other refusal is a generic network error — the same classification the older chat applies to\n * the server's error codes (`AI_BUDGET_REACHED`, `RATE_LIMIT_EXCEEDED`, `CONVERSATION_CLOSED`).\n */\nexport const readConversationErrorTypeOfRefusedSend = (error: AgentsClientError): ConversationErrorType => {\n if (error.kind === \"budget\") return ConversationErrorType.AI_BUDGET;\n if (error.kind === \"rateLimit\") return ConversationErrorType.RATE_LIMIT;\n if (error.kind === \"closed\") return ConversationErrorType.CONVERSATION_CLOSED;\n return ConversationErrorType.NETWORK_ERROR;\n};\n","import type { ChatMessage } from \"../chat-message\";\n\n/**\n * Merges two message lists by `indexInConversation`, preferring `incoming` on a collision, sorted ascending by index.\n * Messages without an index (the optimistic owner message) cannot be matched, so they follow the indexed ones in order.\n * A start or post answer carries the whole list and a live read brings it again: concatenating would show every\n * message twice.\n */\nexport const mergeChatMessagesByIndex = (existing: ChatMessage[], incoming: ChatMessage[]): ChatMessage[] => {\n const messagesByIndex = new Map<number, ChatMessage>();\n const messagesWithoutIndex: ChatMessage[] = [];\n const collectMessage = (message: ChatMessage) => {\n if (message.indexInConversation != null) {\n messagesByIndex.set(message.indexInConversation, message);\n } else {\n messagesWithoutIndex.push(message);\n }\n };\n existing.forEach(collectMessage);\n incoming.forEach(collectMessage);\n const indexedMessages = Array.from(messagesByIndex.values()).sort(\n (first, second) => (first.indexInConversation ?? 0) - (second.indexInConversation ?? 0),\n );\n return [...indexedMessages, ...messagesWithoutIndex];\n};\n\n/**\n * Tags the messages of a send's answer: `fresh` when the id was not in the list before — the server just delivered it,\n * so its one-shot widgets may fire; a replayed message never fires them again.\n */\nexport const tagFreshChatMessages = (incoming: ChatMessage[], previousMessages: ChatMessage[]): ChatMessage[] => {\n const previousIds = new Set(previousMessages.map((message) => message.id).filter((id): id is number => id != null));\n return incoming.map((message) => ({ ...message, fresh: message.id != null && !previousIds.has(message.id) }));\n};\n\n/**\n * Merges a page of a keyset read (the newest page, an older page, the changed tail) into the loaded messages by index.\n * A message is `fresh` only when it is a live arrival: never shown before and newer than everything loaded — so the\n * streamed reply opens its canvas while a scroll-up page and the first page on open stay history. A message already\n * shown keeps its tag. A page of another conversation than the one shown replaces the list.\n */\nexport const mergeMessagesPage = (\n loadedMessages: ChatMessage[] | null,\n page: ChatMessage[],\n requestedConversationId: number,\n): ChatMessage[] => {\n const shownConversationId = loadedMessages?.find((message) => message.conversationId != null)?.conversationId;\n const replacesShownConversation = shownConversationId != null && shownConversationId !== requestedConversationId;\n const existingMessages = replacesShownConversation ? [] : (loadedMessages ?? []);\n const messagesByIndex = new Map<number, ChatMessage>();\n for (const existingMessage of existingMessages) {\n if (existingMessage.indexInConversation != null) {\n messagesByIndex.set(existingMessage.indexInConversation, existingMessage);\n }\n }\n const hadMessagesBeforeMerge = existingMessages.length > 0;\n const highestShownIndex = Math.max(-1, ...existingMessages.map((message) => message.indexInConversation ?? -1));\n for (const incomingMessage of page) {\n if (incomingMessage.indexInConversation == null) continue;\n const previousMessage = messagesByIndex.get(incomingMessage.indexInConversation);\n const isLiveArrival =\n hadMessagesBeforeMerge && previousMessage == null && incomingMessage.indexInConversation > highestShownIndex;\n messagesByIndex.set(incomingMessage.indexInConversation, {\n ...incomingMessage,\n fresh: previousMessage?.fresh ?? isLiveArrival,\n });\n }\n return Array.from(messagesByIndex.values()).sort(\n (first, second) => (first.indexInConversation ?? 0) - (second.indexInConversation ?? 0),\n );\n};\n","import {\n applyClearCanvas,\n applyCloseCanvas,\n applyOpenCanvas,\n applyResetCanvasForNewTurn,\n applySetCanvasCreatedEntityId,\n} from \"../../renderer/canvas/canvas-reducers\";\nimport type { AgentsClientError } from \"../../contract/conversation\";\nimport type { ChatMessage } from \"../chat-message\";\nimport { type AgentsChatEvent, type AgentsChatState, INITIAL_AGENTS_CHAT_STATE } from \"./agents-chat-state\";\nimport { ConversationErrorType, readConversationErrorTypeOfRefusedSend } from \"./conversation-error-type\";\nimport { mergeChatMessagesByIndex, mergeMessagesPage, tagFreshChatMessages } from \"./merge-chat-messages\";\n\n/** The error card and the quota wait of a refused send. */\nconst withRefusedSendError = (state: AgentsChatState, error: AgentsClientError): AgentsChatState => {\n const conversationErrorType = readConversationErrorTypeOfRefusedSend(error);\n return {\n ...state,\n error: conversationErrorType,\n rateLimitRetryAfterSeconds:\n conversationErrorType === ConversationErrorType.RATE_LIMIT ? (error.retryAfterSeconds ?? null) : null,\n };\n};\n\n/** The messages a send's answer brings, merged over the loaded ones without the optimistic message (the last one). */\nconst mergeSendAnswer = (loadedMessages: ChatMessage[] | null, answerMessages: ChatMessage[]): ChatMessage[] => {\n const messagesWithoutOptimisticMessage = loadedMessages ? loadedMessages.slice(0, loadedMessages.length - 1) : [];\n return mergeChatMessagesByIndex(\n messagesWithoutOptimisticMessage,\n tagFreshChatMessages(answerMessages, messagesWithoutOptimisticMessage),\n );\n};\n\n/** The canvas transitions mutate the fields of the object they get (`canvas-reducers.ts`); this keeps the state immutable. */\nconst withCanvasTransition = (\n state: AgentsChatState,\n applyCanvasTransition: (nextState: AgentsChatState) => void,\n): AgentsChatState => {\n const nextState = { ...state };\n applyCanvasTransition(nextState);\n const changed =\n nextState.canvas !== state.canvas ||\n nextState.lastClosedCanvas !== state.lastClosedCanvas ||\n nextState.canvasMountCount !== state.canvasMountCount;\n return changed ? nextState : state;\n};\n\n/**\n * The chat store's reducer: plain functions over the contract types. Each case is the one of the older\n * chat state (a Redux slice and its cases) it replaces, reading the port's answers instead of the\n * generated client's actions; the replay spec feeds both the same recorded sequence.\n */\nexport const reduceAgentsChatState = (state: AgentsChatState, event: AgentsChatEvent): AgentsChatState => {\n switch (event.type) {\n case \"reset\":\n // The opening request is set from outside before the chat mounts (a cold chat resets as it comes up); the canvas\n // mount count and the start token count are monotonic sources of identities: all three survive.\n return {\n ...INITIAL_AGENTS_CHAT_STATE,\n openingRequest: state.openingRequest,\n canvasMountCount: state.canvasMountCount,\n startTokenCount: state.startTokenCount,\n };\n\n case \"conversationMetadataRequested\":\n case \"messagesPageRequested\":\n return state.requestedConversationId === event.conversationId\n ? state\n : { ...state, requestedConversationId: event.conversationId };\n\n case \"conversationMetadataReceived\":\n // Dropped after a reset or when another conversation was asked for since: a late answer would put the old\n // conversation back, and the next send would post into it instead of starting a new one.\n if (state.requestedConversationId === null || state.requestedConversationId !== event.conversationId) {\n return state;\n }\n return { ...state, conversation: event.conversation, conversationLoaded: true };\n\n case \"conversationMetadataFailed\":\n // A metadata read is best-effort: the chat stays as it is.\n return { ...state, conversationLoaded: true };\n\n case \"messagesPageReceived\": {\n if (state.requestedConversationId === null || state.requestedConversationId !== event.conversationId) {\n return state;\n }\n if (state.conversation !== null && state.conversation.id !== event.conversationId) {\n return state;\n }\n return {\n ...state,\n messages: mergeMessagesPage(state.messages, event.messages, event.conversationId),\n hasMoreOlder: event.hasMoreOlder ?? state.hasMoreOlder,\n conversationLoaded: true,\n };\n }\n\n case \"messagePostRequested\":\n return {\n ...state,\n conversationLoading: true,\n conversationLoaded: false,\n aiThinking: true,\n error: null,\n rateLimitRetryAfterSeconds: null,\n messages: [...(state.messages ?? []), event.message],\n };\n\n case \"messagePostReceived\":\n if (event.conversationId !== state.conversation?.id) {\n return state;\n }\n // The reply arrives through live updates, not in this answer: `aiThinking` stays as it is.\n return {\n ...state,\n messages: mergeSendAnswer(state.messages, event.posted.messages),\n conversationLoading: false,\n conversationLoaded: true,\n error: null,\n };\n\n case \"messagePostFailed\":\n return withRefusedSendError(\n { ...state, conversationLoading: false, conversationLoaded: true, aiThinking: false },\n event.error,\n );\n\n case \"startRequested\":\n return {\n ...state,\n conversation: null,\n conversationLoading: true,\n conversationLoaded: false,\n aiThinking: true,\n error: null,\n rateLimitRetryAfterSeconds: null,\n startingNewConversation: true,\n startTokenCount: state.startTokenCount + 1,\n pendingStartToken: state.startTokenCount + 1,\n // A signal-only start (an empty visible message carries the start signal) seeds no empty bubble.\n messages: event.message.message ? [event.message] : [],\n };\n\n case \"startReceived\": {\n if (event.startToken !== state.pendingStartToken) {\n return state;\n }\n const { started } = event;\n if (started.reopenedExisting) {\n // The recent conversation of the start's entry point: nothing was appended, no turn started. Its messages are\n // not in the answer — the controller reads its newest page — so the optimistic bubble goes.\n return {\n ...state,\n conversation: started.conversation,\n messages: [],\n conversationLoading: false,\n conversationLoaded: true,\n aiThinking: false,\n startingNewConversation: false,\n pendingStartToken: null,\n };\n }\n // The reply arrives through live updates: `aiThinking` stays on.\n return {\n ...state,\n conversation: started.conversation,\n messages: mergeSendAnswer(state.messages, started.messages),\n conversationLoading: false,\n conversationLoaded: true,\n startingNewConversation: false,\n pendingStartToken: null,\n };\n }\n\n case \"startFailed\":\n return withRefusedSendError(\n {\n ...state,\n conversation: null,\n conversationLoading: false,\n conversationLoaded: true,\n aiThinking: false,\n startingNewConversation: false,\n pendingStartToken: null,\n },\n event.error,\n );\n\n case \"errorSet\":\n return state.error === event.error ? state : { ...state, error: event.error };\n\n case \"aiThinkingSet\":\n return state.aiThinking === event.aiThinking ? state : { ...state, aiThinking: event.aiThinking };\n\n case \"openingRequestSet\":\n return { ...state, openingRequest: { ...state.openingRequest, ...event.openingRequest } };\n\n case \"canvasOpened\":\n return withCanvasTransition(state, (nextState) => {\n applyOpenCanvas(nextState, event.request);\n });\n\n case \"canvasClosed\":\n return withCanvasTransition(state, (nextState) => applyCloseCanvas(nextState, event.byCustomer));\n\n case \"canvasResetForNewTurn\":\n return withCanvasTransition(state, applyResetCanvasForNewTurn);\n\n case \"canvasCleared\":\n return withCanvasTransition(state, applyClearCanvas);\n\n case \"canvasCreatedEntityIdSet\":\n return withCanvasTransition(state, (nextState) => {\n applySetCanvasCreatedEntityId(nextState, event.created);\n });\n }\n};\n","import { type AgentsChatEvent, type AgentsChatState, INITIAL_AGENTS_CHAT_STATE } from \"./agents-chat-state\";\nimport { reduceAgentsChatState } from \"./reduce-agents-chat-state\";\n\n/**\n * The state handle of one chat instance. The app creates one per chat (host application: one per agent\n * window, created before the window's chat mounts) and releases it with the chat; the chat and the app's code outside\n * the chat read and dispatch through the same handle. React reads it through `useAgentsChatSelector`.\n */\nexport interface AgentsChatStore {\n getState: () => AgentsChatState;\n /** Calls the listener after every state change; returns the unsubscribe. */\n subscribe: (listener: () => void) => () => void;\n dispatch: (event: AgentsChatEvent) => void;\n}\n\n/** The plain implementation of `AgentsChatStore`: one state object, replaced by the reducer on every event. */\nexport class AgentsChatStateContainer implements AgentsChatStore {\n protected state: AgentsChatState;\n protected readonly listeners = new Set<() => void>();\n\n constructor(initialState: AgentsChatState = INITIAL_AGENTS_CHAT_STATE) {\n this.state = initialState;\n }\n\n getState = (): AgentsChatState => this.state;\n\n subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n };\n\n dispatch = (event: AgentsChatEvent): void => {\n const nextState = reduceAgentsChatState(this.state, event);\n if (nextState === this.state) return;\n this.state = nextState;\n for (const notifyListener of [...this.listeners]) notifyListener();\n };\n}\n\n/** Creates the state handle of one chat instance. */\nexport const createAgentsChatStore = (initialState?: AgentsChatState): AgentsChatStore =>\n new AgentsChatStateContainer(initialState);\n","import { createContext, type ReactNode, useCallback, useContext, useSyncExternalStore } from \"react\";\nimport type { AgentsChatState } from \"./agents-chat-state\";\nimport type { AgentsChatStore } from \"./create-agents-chat-store\";\n\nconst AgentsChatStoreContext = createContext<AgentsChatStore | null>(null);\n\nexport interface AgentsChatStoreProviderProps {\n /** The state handle of the chat below (the app creates and releases it). */\n chatStore: AgentsChatStore;\n children?: ReactNode;\n}\n\n/** Puts one chat instance's state handle in reach of the chat and of the app's components inside it. */\nexport const AgentsChatStoreProvider = (props: AgentsChatStoreProviderProps) => {\n const { chatStore, children } = props;\n return <AgentsChatStoreContext.Provider value={chatStore}>{children}</AgentsChatStoreContext.Provider>;\n};\n\n/** The state handle of the chat this component renders in; throws outside `AgentsChatStoreProvider`. */\nexport const useAgentsChatStore = (): AgentsChatStore => {\n const chatStore = useContext(AgentsChatStoreContext);\n if (chatStore === null) {\n throw new Error(\"A chat component rendered outside AgentsChatStoreProvider: the app has to mount its chat store.\");\n }\n return chatStore;\n};\n\n/** The state handle of the chat this component renders in, or null outside a chat. */\nexport const useOptionalAgentsChatStore = (): AgentsChatStore | null => useContext(AgentsChatStoreContext);\n\nconst subscribeToNothing = () => () => undefined;\n\n/**\n * Reads one value of a chat instance's state and re-renders when it changes. The selector must return a value that\n * keeps its identity while the state does not change (a state field, not a new object). Without a store it returns\n * `valueWithoutStore`.\n */\nexport const useAgentsChatSelector = <Selected,>(\n chatStore: AgentsChatStore | null | undefined,\n selector: (state: AgentsChatState) => Selected,\n valueWithoutStore?: Selected,\n): Selected => {\n const subscribe = chatStore ? chatStore.subscribe : subscribeToNothing;\n const readSelectedValue = useCallback(\n () => (chatStore ? selector(chatStore.getState()) : (valueWithoutStore as Selected)),\n [chatStore, selector, valueWithoutStore],\n );\n return useSyncExternalStore(subscribe, readSelectedValue, readSelectedValue);\n};\n\n/** Reads one value of the state of the chat this component renders in. */\nexport const useAgentsChatState = <Selected,>(selector: (state: AgentsChatState) => Selected): Selected =>\n useAgentsChatSelector(useAgentsChatStore(), selector);\n","import React, { ReactNode, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useAgentsEnvironment, useAgentsStateDispatch, useAgentsStateSelector } from \"../provider/AgentsProvider\";\nimport type { ConversationWidgetStatePartition } from \"./conversation-widget-state-partition\";\nimport { createAgentsChatStore } from \"../chat/store/create-agents-chat-store\";\nimport type { AgentsChatEvent } from \"../chat/store/agents-chat-state\";\nimport type { AgentsChatStore } from \"../chat/store/create-agents-chat-store\";\nimport { useAgentsChatSelector } from \"../chat/store/use-agents-chat-store\";\nimport type { CanvasState, LastClosedCanvas } from \"./canvas/canvas-state\";\nimport { CANVAS_VIABLE_MIN_WIDTH } from \"../widgets/CanvasLauncherWidget/use-canvas-viable\";\nimport { ConversationComposerWidget } from \"./conversation-composer-widget\";\nimport type { CanvasCreatedEntity } from \"./canvas/canvas-reducers\";\nimport { clearStoredCanvas, storeOpenCanvas } from \"./canvas/canvasStorage\";\nimport {\n type CanvasOpenRequestFromOpener,\n type ConversationWidgetCallbacks,\n ConversationWidgetContext,\n defaultConversationWidgetCallbacks,\n type InjectSignalOptions,\n} from \"./ConversationWidgetCallbacksContext\";\n\n// The callbacks, their context and the chat-free hosts live in `ConversationWidgetCallbacksContext.tsx`; this module\n// adds the provider that reads the chat's state (the package chat store or an app's partition) and re-exports the rest.\nexport * from \"./ConversationWidgetCallbacksContext\";\n\n// Number of mounted agentic chat surfaces (widget, full-page chat, dashboard). Drives the app's \"a chat surface is\n// open\" action (`buildChatSurfaceOpenChangedAction`, e.g. a flag of the app's own flows): true while ≥1 is open.\n// Module-level so multiple providers share one count.\nlet agenticChatMountCount = 0;\n\nexport interface ConversationWidgetProviderProps {\n children: ReactNode;\n callbacks: Partial<ConversationWidgetCallbacks>;\n /**\n * The chat slice partition this provider's canvas lives in. The shell is shared by the two chat doors, so the door\n * says which partition: `AgentChat` passes `AgentChatInstance`; the AI-Extensions chat, every story and every spec\n * keep the default. A prop, not a callback — `callbacks` is `Partial`, and the partition is not optional.\n */\n sliceInstance?: ConversationWidgetStatePartition;\n /**\n * The package chat store of the chat: the agent chat passes its window's store and the provider reads\n * and writes the canvas there. Without it the provider reads a partition of the app's own chat state\n * (`sliceInstance`, else the environment's `defaultChatStatePartition`).\n */\n chatStore?: AgentsChatStore;\n /**\n * False for a host that renders the chat without the split (`ConversationView.disableSplitView`): there is nowhere\n * to open a canvas, so every open request is ignored with reason `noSurface`. Default true.\n */\n hostHasCanvasSurface?: boolean;\n}\n\n/** The canvas transitions the provider dispatches — the canvas events of the package chat store. */\ntype ConversationWidgetCanvasEvent = Extract<\n AgentsChatEvent,\n { type: \"canvasOpened\" | \"canvasClosed\" | \"canvasResetForNewTurn\" | \"canvasCleared\" | \"canvasCreatedEntityIdSet\" }\n>;\n\n/** What the provider reads from the chat's state and how it writes a canvas transition back. */\ninterface ConversationWidgetChatState {\n canvas: CanvasState | null;\n lastClosedCanvas: LastClosedCanvas | null;\n isConversationRunning: boolean;\n runState: string | null | undefined;\n messages: ConversationWidgetCallbacks[\"messages\"];\n dispatchCanvasEvent: (event: ConversationWidgetCanvasEvent) => void;\n}\n\ntype ConversationWidgetProviderBodyProps = Omit<ConversationWidgetProviderProps, \"sliceInstance\" | \"chatStore\"> & {\n chatState: ConversationWidgetChatState;\n};\n\nconst selectCanvas = (state: { canvas: CanvasState | null }) => state.canvas;\nconst selectLastClosedCanvas = (state: { lastClosedCanvas: LastClosedCanvas | null }) => state.lastClosedCanvas;\nconst selectAiThinking = (state: { aiThinking: boolean }) => state.aiThinking;\nconst selectRunState = (state: { conversation: { runState?: string | null } | null }) => state.conversation?.runState;\nconst selectMessages = (state: { messages: ConversationWidgetCallbacks[\"messages\"] }) => state.messages;\n\n/** The provider over the package chat store of the chat. */\nconst ChatStoreConversationWidgetProvider = (\n props: Omit<ConversationWidgetProviderProps, \"sliceInstance\" | \"chatStore\"> & { chatStore: AgentsChatStore },\n) => {\n const { chatStore, ...bodyProps } = props;\n const canvas = useAgentsChatSelector(chatStore, selectCanvas);\n const lastClosedCanvas = useAgentsChatSelector(chatStore, selectLastClosedCanvas);\n const isConversationRunning = useAgentsChatSelector(chatStore, selectAiThinking);\n const runState = useAgentsChatSelector(chatStore, selectRunState);\n const messages = useAgentsChatSelector(chatStore, selectMessages);\n const chatState = useMemo<ConversationWidgetChatState>(\n () => ({\n canvas,\n lastClosedCanvas,\n isConversationRunning,\n runState,\n messages,\n dispatchCanvasEvent: chatStore.dispatch,\n }),\n [canvas, lastClosedCanvas, isConversationRunning, runState, messages, chatStore],\n );\n return <ConversationWidgetProviderBody {...bodyProps} chatState={chatState} />;\n};\n\n/** The provider over a partition of the older chat state (the AI-Extensions chat, stories, specs). */\nconst SliceConversationWidgetProvider = (\n props: Omit<ConversationWidgetProviderProps, \"sliceInstance\" | \"chatStore\"> & {\n sliceInstance: ConversationWidgetStatePartition;\n },\n) => {\n const { sliceInstance, ...bodyProps } = props;\n const dispatch = useAgentsStateDispatch();\n // One selector per field, not one returning an object, so an unrelated store change does not re-render every widget\n // through a fresh object identity.\n const canvas = useAgentsStateSelector((state) => sliceInstance.selectState(state).canvas);\n const lastClosedCanvas = useAgentsStateSelector((state) => sliceInstance.selectState(state).lastClosedCanvas);\n const isConversationRunning = useAgentsStateSelector((state) => sliceInstance.selectState(state).aiThinking);\n const runState = useAgentsStateSelector((state) => sliceInstance.selectState(state).conversation?.runState);\n const messages = useAgentsStateSelector((state) => sliceInstance.selectState(state).messages);\n const dispatchCanvasEvent = useCallback(\n (event: ConversationWidgetCanvasEvent) => {\n const { actions } = sliceInstance;\n if (event.type === \"canvasOpened\") dispatch(actions.openCanvas(event.request));\n else if (event.type === \"canvasClosed\") dispatch(actions.closeCanvas({ byCustomer: event.byCustomer }));\n else if (event.type === \"canvasResetForNewTurn\") dispatch(actions.resetCanvasForNewTurn());\n else if (event.type === \"canvasCleared\") dispatch(actions.clearCanvas());\n else dispatch(actions.setCanvasCreatedEntityId(event.created));\n },\n [dispatch, sliceInstance],\n );\n const chatState = useMemo<ConversationWidgetChatState>(\n () => ({ canvas, lastClosedCanvas, isConversationRunning, runState, messages, dispatchCanvasEvent }),\n [canvas, lastClosedCanvas, isConversationRunning, runState, messages, dispatchCanvasEvent],\n );\n return <ConversationWidgetProviderBody {...bodyProps} chatState={chatState} />;\n};\n\n/** The provider over a chat store of its own — a host that brings neither a chat store nor a partition (a story). */\nconst OwnChatStoreConversationWidgetProvider = (\n props: Omit<ConversationWidgetProviderProps, \"sliceInstance\" | \"chatStore\">,\n) => {\n const [ownChatStore] = useState(createAgentsChatStore);\n return <ChatStoreConversationWidgetProvider {...props} chatStore={ownChatStore} />;\n};\n\n/**\n * The widget callbacks of one chat, the canvas model included. Reads the chat's state from the package chat store when\n * the host passes one (`chatStore`), else from a partition of the app's own chat state (`sliceInstance`, or the\n * environment's `defaultChatStatePartition` — host application: the AI-Extensions chat), else from a store of its own.\n */\nexport const ConversationWidgetProvider = (props: ConversationWidgetProviderProps) => {\n const { sliceInstance, chatStore, ...bodyProps } = props;\n const { defaultChatStatePartition } = useAgentsEnvironment();\n const statePartition = sliceInstance ?? defaultChatStatePartition;\n if (chatStore) return <ChatStoreConversationWidgetProvider {...bodyProps} chatStore={chatStore} />;\n if (statePartition) return <SliceConversationWidgetProvider {...bodyProps} sliceInstance={statePartition} />;\n return <OwnChatStoreConversationWidgetProvider {...bodyProps} />;\n};\n\nconst ConversationWidgetProviderBody = ({\n children,\n callbacks,\n hostHasCanvasSurface = true,\n chatState,\n}: ConversationWidgetProviderBodyProps) => {\n const dispatch = useAgentsStateDispatch();\n const { buildChatSurfaceOpenChangedAction } = useAgentsEnvironment();\n const { canvas, lastClosedCanvas, isConversationRunning, runState, messages } = chatState;\n const isConversationClosed = runState === \"COMPLETED\" || runState === \"CANCELLED\";\n const dispatchCanvasEventRef = useRef(chatState.dispatchCanvasEvent);\n dispatchCanvasEventRef.current = chatState.dispatchCanvasEvent;\n const hostHasCanvasSurfaceRef = useRef(hostHasCanvasSurface);\n hostHasCanvasSurfaceRef.current = hostHasCanvasSurface;\n\n // An agentic chat surface is open: the app hears it through its action (e.g. a flag every connect/create/verify flow\n // launched from inside the chat reads to stay in-widget instead of navigating away).\n // Set here (not at the connect button) so it also covers the verify path, where there is no connect click.\n // Ref-counted so concurrently-mounted chat surfaces don't clear each other's flag.\n const buildChatSurfaceOpenChangedActionRef = useRef(buildChatSurfaceOpenChangedAction);\n buildChatSurfaceOpenChangedActionRef.current = buildChatSurfaceOpenChangedAction;\n useEffect(() => {\n agenticChatMountCount += 1;\n if (agenticChatMountCount === 1 && buildChatSurfaceOpenChangedActionRef.current) {\n dispatch(buildChatSurfaceOpenChangedActionRef.current(true));\n }\n return () => {\n agenticChatMountCount -= 1;\n if (agenticChatMountCount === 0 && buildChatSurfaceOpenChangedActionRef.current) {\n dispatch(buildChatSurfaceOpenChangedActionRef.current(false));\n }\n };\n }, [dispatch]);\n\n // Mirror the latest callbacks in a ref so the exposed functions stay stable across\n // renders even if the parent passes a fresh `callbacks` object every render.\n const callbacksRef = useRef(callbacks);\n callbacksRef.current = callbacks;\n\n // Composer-widget ownership — controlled when the host supplies `composerWidgets` (the builder page, click-bridge\n // F), otherwise uncontrolled: the provider owns the state so a descendant (e.g. an app's editor drawer) can\n // mutate it directly. See ConversationWidgetCallbacks.\n const isComposerWidgetsControlled = callbacks.composerWidgets !== undefined;\n const [internalComposerWidgets, setInternalComposerWidgets] = useState<ConversationComposerWidget[]>([]);\n const composerWidgets = isComposerWidgetsControlled\n ? (callbacks.composerWidgets as ConversationComposerWidget[])\n : internalComposerWidgets;\n\n // Mirrors the latest resolved composerWidgets + controlled flag so the mutator callbacks below can compute the\n // next array off REAL current state while keeping stable identities across renders ([] deps) — same trick as\n // `callbacksRef` above.\n const composerWidgetsStateRef = useRef({ composerWidgets, isComposerWidgetsControlled });\n composerWidgetsStateRef.current = { composerWidgets, isComposerWidgetsControlled };\n\n const publishComposerWidgets = useCallback((next: ConversationComposerWidget[]) => {\n if (composerWidgetsStateRef.current.isComposerWidgetsControlled) {\n callbacksRef.current.onComposerWidgetsChange?.(next);\n } else {\n setInternalComposerWidgets(next);\n }\n }, []);\n\n const addComposerWidget = useCallback(\n (widgetName: string, fields: Record<string, unknown>): string => {\n const composerWidgetId = crypto.randomUUID();\n publishComposerWidgets([\n ...composerWidgetsStateRef.current.composerWidgets,\n { composerWidgetId, widgetName, fields },\n ]);\n return composerWidgetId;\n },\n [publishComposerWidgets],\n );\n\n const replaceComposerWidgetFields = useCallback(\n (composerWidgetId: string, fields: Record<string, unknown>) => {\n publishComposerWidgets(\n composerWidgetsStateRef.current.composerWidgets.map((widget) =>\n widget.composerWidgetId === composerWidgetId ? { ...widget, fields } : widget,\n ),\n );\n },\n [publishComposerWidgets],\n );\n\n const removeComposerWidget = useCallback(\n (composerWidgetId: string) => {\n publishComposerWidgets(\n composerWidgetsStateRef.current.composerWidgets.filter(\n (widget) => widget.composerWidgetId !== composerWidgetId,\n ),\n );\n },\n [publishComposerWidgets],\n );\n\n const clearComposerWidgets = useCallback(() => {\n publishComposerWidgets([]);\n }, [publishComposerWidgets]);\n\n // The one way to open a canvas (all four origins). The provider supplies what only it knows — the split's viability\n // (measured on the window, like `useCanvasViable`) and whether this host has a canvas surface — and the reducer\n // applies the opening rule. Ignored requests change nothing.\n const openCanvas = useCallback(\n (request: CanvasOpenRequestFromOpener) => {\n dispatchCanvasEventRef.current({\n type: \"canvasOpened\",\n request: {\n ...request,\n viewportViable: window.innerWidth >= CANVAS_VIABLE_MIN_WIDTH,\n hostHasCanvasSurface: hostHasCanvasSurfaceRef.current,\n },\n });\n },\n [],\n );\n\n // Close the open canvas; it stays re-openable as `lastClosedCanvas`. `byCustomer` = the canvas's own close control,\n // which vetoes a live re-delivery of the same identity until the next send / click / page hand-over.\n const closeCanvas = useCallback(\n (byCustomer: boolean) => {\n dispatchCanvasEventRef.current({ type: \"canvasClosed\", byCustomer });\n },\n [],\n );\n\n const lastClosedCanvasRef = useRef(lastClosedCanvas);\n lastClosedCanvasRef.current = lastClosedCanvas;\n const reopenLastClosedCanvas = useCallback(() => {\n const last = lastClosedCanvasRef.current;\n if (last === null) return;\n dispatchCanvasEventRef.current({\n type: \"canvasOpened\",\n request: {\n canvasId: last.canvasId,\n instanceId: last.instanceId,\n anchor: last.anchor,\n origin: \"widgetClick\",\n justDelivered: false,\n viewportViable: window.innerWidth >= CANVAS_VIABLE_MIN_WIDTH,\n hostHasCanvasSurface: hostHasCanvasSurfaceRef.current,\n ...(last.createdEntityId !== undefined ? { createdEntityId: last.createdEntityId } : {}),\n },\n });\n }, []);\n\n const setCanvasCreatedEntityId = useCallback(\n (created: CanvasCreatedEntity) => {\n dispatchCanvasEventRef.current({ type: \"canvasCreatedEntityIdSet\", created });\n },\n [],\n );\n\n // The pointer of the OPEN canvas is remembered per conversation for a reload (`canvasStorage.ts`), for any\n // lifetime. Cleared when the canvas closes INSIDE the same conversation; a conversation switch clears the slice too,\n // but the LEFT conversation keeps its entry so coming back restores it.\n const storedCanvasConversationIdRef = useRef<number | undefined>(undefined);\n const conversationIdForStorage = callbacks.conversationId;\n useEffect(() => {\n if (canvas !== null) {\n storeOpenCanvas(conversationIdForStorage, canvas);\n storedCanvasConversationIdRef.current = conversationIdForStorage;\n return;\n }\n if (\n storedCanvasConversationIdRef.current !== undefined &&\n storedCanvasConversationIdRef.current === conversationIdForStorage\n ) {\n clearStoredCanvas(conversationIdForStorage);\n }\n storedCanvasConversationIdRef.current = undefined;\n }, [canvas, conversationIdForStorage]);\n\n // A conversation switch forgets the canvas and the last closed one (the LEFT conversation keeps its stored pointer).\n const resetCanvas = useCallback(() => {\n dispatchCanvasEventRef.current({ type: \"canvasCleared\" });\n }, []);\n\n // The SEND boundary: a turn canvas is over for good, a pinned one stays (`canvas-reducers.ts`).\n const resetCanvasForNewTurn = useCallback(() => {\n dispatchCanvasEventRef.current({ type: \"canvasResetForNewTurn\" });\n }, []);\n\n const sendMessageToChat = useCallback((message: string) => {\n return callbacksRef.current.sendMessageToChat?.(message);\n }, []);\n\n const prefillComposer = useCallback((text: string) => {\n callbacksRef.current.prefillComposer?.(text);\n }, []);\n\n const injectSignal = useCallback((signalText: string, options?: InjectSignalOptions) => {\n return callbacksRef.current.injectSignal?.(signalText, options);\n }, []);\n\n const minimizeChatHost = useCallback(() => {\n callbacksRef.current.minimizeChatHost?.();\n }, []);\n\n const contextValue = useMemo<ConversationWidgetCallbacks>(\n () => ({\n canvas,\n hostHasCanvasSurface,\n lastClosedCanvas,\n openCanvas,\n closeCanvas,\n reopenLastClosedCanvas,\n setCanvasCreatedEntityId,\n resetCanvas,\n resetCanvasForNewTurn,\n sendMessageToChat,\n prefillComposer,\n injectSignal,\n minimizeChatHost,\n chatAgentSpaceKey: callbacks.chatAgentSpaceKey,\n isConversationRunning,\n isConversationClosed,\n conversationId: callbacks.conversationId,\n composerWidgets,\n addComposerWidget,\n replaceComposerWidgetFields,\n removeComposerWidget,\n clearComposerWidgets,\n onOpenConversation: callbacks.onOpenConversation,\n onSwitchConversation: callbacks.onSwitchConversation,\n isOnboardingSetupConversation: callbacks.isOnboardingSetupConversation ?? false,\n messages,\n }),\n [\n canvas,\n hostHasCanvasSurface,\n lastClosedCanvas,\n openCanvas,\n closeCanvas,\n reopenLastClosedCanvas,\n setCanvasCreatedEntityId,\n resetCanvas,\n resetCanvasForNewTurn,\n sendMessageToChat,\n prefillComposer,\n injectSignal,\n minimizeChatHost,\n callbacks.chatAgentSpaceKey,\n isConversationRunning,\n isConversationClosed,\n callbacks.conversationId,\n composerWidgets,\n addComposerWidget,\n replaceComposerWidgetFields,\n removeComposerWidget,\n clearComposerWidgets,\n callbacks.onOpenConversation,\n callbacks.onSwitchConversation,\n callbacks.isOnboardingSetupConversation,\n messages,\n ],\n );\n\n return <ConversationWidgetContext.Provider value={contextValue}>{children}</ConversationWidgetContext.Provider>;\n};\n\n","import React from \"react\";\nimport { classNames } from \"../../../provider/class-names\";\nimport styles from \"./ConversationMessageInputComposerWidgets.module.scss\";\nimport { useConversationWidgetContext } from \"../../../renderer/ConversationWidgetContext\";\nimport { conversationWidgetRegistry } from \"../../../renderer/conversationWidgetRegistry\";\n\nexport interface ConversationMessageInputComposerWidgetsProps {\n testId?: string;\n}\n\n/**\n * Generic strip of composer widgets above the chat input's text area — the composer-side twin of\n * `ConversationMessageInputAttachmentsPreviewStrip`, same grid-rows 0fr→1fr reveal. Reads `composerWidgets` from the\n * widget context itself (so every ConversationView host gets it for free, mirroring the deleted selection chip),\n * and for each widget resolves the registry entry by `widgetName` and renders its `composerComponent` with\n * `{ composerWidgetId, fields, replaceFields, remove }`. An unknown name, or an entry without a `composerComponent`,\n * renders nothing for that widget — the same kill switch the fence plugin applies.\n */\nexport const ConversationMessageInputComposerWidgets = (props: ConversationMessageInputComposerWidgetsProps) => {\n const { testId = \"chat-input\" } = props;\n const { composerWidgets, replaceComposerWidgetFields, removeComposerWidget } = useConversationWidgetContext();\n\n const renderableWidgets = composerWidgets.flatMap((widget) => {\n const entry = conversationWidgetRegistry.widgets.find((candidate) => candidate.name === widget.widgetName);\n return entry?.composerComponent ? [{ widget, Component: entry.composerComponent }] : [];\n });\n\n return (\n <div\n className={classNames(styles.stripReveal, { [styles.stripRevealOpen]: renderableWidgets.length > 0 })}\n data-testid={`${testId}-composer-widgets-strip`}\n >\n <div className={styles.stripRevealInner}>\n <div className={styles.strip}>\n {renderableWidgets.map(({ widget, Component }) => (\n <Component\n key={widget.composerWidgetId}\n composerWidgetId={widget.composerWidgetId}\n fields={widget.fields}\n replaceFields={(nextFields) => replaceComposerWidgetFields(widget.composerWidgetId, nextFields)}\n remove={() => removeComposerWidget(widget.composerWidgetId)}\n testId={`${testId}-composer-widget-${widget.composerWidgetId}`}\n />\n ))}\n </div>\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA+DO,MAAM,oCAA8D;AAAA,EACzE,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,sBAAsB;AACxB;AAEO,MAAM,4BAA6C;AAAA,EACxD,cAAc;AAAA,EACd,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,4BAA4B;AAAA,EAC5B,yBAAyB;AAAA,EACzB,yBAAyB;AAAA,EACzB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA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