@mgamadeus/ddd-agents 0.1.0-alpha.51 → 0.1.0-alpha.53

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.
Files changed (47) hide show
  1. package/dist/chat.js +30 -29
  2. package/dist/chat.js.map +1 -1
  3. package/dist/chunks/{ConversationMessageInputComposerWidgets-CzQnpW0h.js → ConversationMessageInputComposerWidgets-CFU9Bxjr.js} +5 -5
  4. package/dist/chunks/ConversationMessageInputComposerWidgets-CFU9Bxjr.js.map +1 -0
  5. package/dist/chunks/{WebSearchResultsConversationWidget-tDhawe9f.js → WebSearchResultsConversationWidget-H6cbTapV.js} +85 -83
  6. package/dist/chunks/WebSearchResultsConversationWidget-H6cbTapV.js.map +1 -0
  7. package/dist/chunks/{canvas-reducers-BdIPZW_6.js → canvas-reducers-Cdxt8yDF.js} +2 -2
  8. package/dist/chunks/canvas-reducers-Cdxt8yDF.js.map +1 -0
  9. package/dist/chunks/{canvasBodies-BiUt8MUG.js → canvasBodies-BY1uT2og.js} +4 -4
  10. package/dist/chunks/{canvasBodies-BiUt8MUG.js.map → canvasBodies-BY1uT2og.js.map} +1 -1
  11. package/dist/chunks/{widget-click-signal-sources-BR82QygL.js → widget-click-signal-sources-DOpjIWdO.js} +3 -3
  12. package/dist/chunks/{widget-click-signal-sources-BR82QygL.js.map → widget-click-signal-sources-DOpjIWdO.js.map} +1 -1
  13. package/dist/chunks/{widget-name-resolver-BaxKaRa3.js → widget-name-resolver-BFHZuaYL.js} +4 -4
  14. package/dist/chunks/{widget-name-resolver-BaxKaRa3.js.map → widget-name-resolver-BFHZuaYL.js.map} +1 -1
  15. package/dist/client-testing.js +3 -3
  16. package/dist/image-render.js +7 -7
  17. package/dist/index.js +3 -3
  18. package/dist/kit.js +2 -2
  19. package/dist/preview.js +5 -5
  20. package/dist/preview.js.map +1 -1
  21. package/dist/renderer.js +8 -7
  22. package/dist/styles.css +50 -50
  23. package/dist/types/chat/{ConversationErrorCard/ConversationErrorCard.d.ts → ConversationErrorWidget/ConversationErrorWidget.d.ts} +2 -2
  24. package/dist/types/chat/{ConversationIntroCard/ConversationIntroCard.d.ts → ConversationIntroWidget/ConversationIntroWidget.d.ts} +2 -2
  25. package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/{ConversationMessageInputAttachmentPreviewCard.d.ts → ConversationMessageInputAttachmentPreviewWidget.d.ts} +2 -2
  26. package/dist/types/chat/ConversationMessageInput/ConversationMessageInputAttachments/ConversationMessageInputAttachmentsPreviewStrip.d.ts +1 -1
  27. package/dist/types/chat/ConversationSuggestionWidget/ConversationSuggestionWidget.d.ts +7 -0
  28. package/dist/types/entries/chat.d.ts +4 -2
  29. package/dist/types/entries/widgets.d.ts +10 -6
  30. package/dist/types/preview/widget-preview-hydration.d.ts +1 -1
  31. package/dist/types/renderer/ConversationWidgetCallbacksContext.d.ts +1 -1
  32. package/dist/types/renderer/canvas/canvas-state.d.ts +4 -2
  33. package/dist/types/renderer/canvas/decide-canvas-open.d.ts +1 -1
  34. package/dist/types/widgets/{CanvasWidgetCard/CanvasWidgetCard.d.ts → CanvasLauncherWidget/CanvasLauncherWidget.d.ts} +4 -4
  35. package/dist/types/widgets/{CanvasWidgetCard → CanvasLauncherWidget}/CanvasWidgetSwitch.d.ts +8 -8
  36. package/dist/types/widgets/{CanvasWidgetCard → CanvasLauncherWidget}/canvas-for-message-widget.d.ts +2 -2
  37. package/dist/types/widgets/EntityMentionConversationWidget/{EntityMentionCard/EntityMentionCard.d.ts → EntityMentionWidgetBody/EntityMentionWidgetBody.d.ts} +2 -2
  38. package/dist/types/widgets/_shared/{CardFooter.d.ts → WidgetFooter.d.ts} +1 -1
  39. package/dist/widgets.js +40 -38
  40. package/dist/widgets.js.map +1 -1
  41. package/package.json +1 -1
  42. package/public-api.json +18 -11
  43. package/dist/chunks/ConversationMessageInputComposerWidgets-CzQnpW0h.js.map +0 -1
  44. package/dist/chunks/WebSearchResultsConversationWidget-tDhawe9f.js.map +0 -1
  45. package/dist/chunks/canvas-reducers-BdIPZW_6.js.map +0 -1
  46. package/dist/types/chat/ConversationSuggestionCard/ConversationSuggestionCard.d.ts +0 -7
  47. /package/dist/types/widgets/{CanvasWidgetCard → CanvasLauncherWidget}/use-canvas-viable.d.ts +0 -0
package/dist/chat.js CHANGED
@@ -5,14 +5,14 @@ import { u as useAgentsConversationClient, a as useOptionalAgentsConversationCli
5
5
  import { w as withPollingChangeSubscription } from "./chunks/withPollingChangeSubscription-B16htQGd.js";
6
6
  import { q as Text, I as Icon, $ as translateText, G as GlowFrame, t as Tooltip, B as Button, z as classNames, l as Skeleton, a3 as useAgentsEnvironment, h as Markdown, F as getAgentDisplayName, a1 as useAgentsBudgetLimit, f as InteractiveSurface, L as LoadingSpinner, n as SplitView, Y as reportRunningTurn, a0 as useAgentsActiveAgentSpaceKey, P as ProgressBar } from "./chunks/index-7Qc_3GbG.js";
7
7
  import { i as isAgentsClientError, A as AgentsClientError } from "./chunks/conversation-BEF0aesf.js";
8
- import { W as WIDGET_FENCE_LANG, G as resolveWidgetName, j as conversationWidgetRegistry, n as findWidgetFencesInMarkdown, o as ConversationWidgetErrorBoundary, p as ConversationWidgetFeatureGate, T as parseWidgetJsonObject, F as resolveCanonicalWidgetName, y as getConversationWidgetRegistryRevision, U as BARE_WIDGET_LINE_GLOBAL, t as closestWidgetNames } from "./chunks/widget-name-resolver-BaxKaRa3.js";
9
- import { E as useConversationWidgetContext, p as payloadHashOfInstanceId, j as buildWidgetAgentSpaceKeyProps, ar as useCanvasViable } from "./chunks/WebSearchResultsConversationWidget-tDhawe9f.js";
8
+ import { W as WIDGET_FENCE_LANG, G as resolveWidgetName, j as conversationWidgetRegistry, n as findWidgetFencesInMarkdown, o as ConversationWidgetErrorBoundary, p as ConversationWidgetFeatureGate, T as parseWidgetJsonObject, F as resolveCanonicalWidgetName, y as getConversationWidgetRegistryRevision, U as BARE_WIDGET_LINE_GLOBAL, t as closestWidgetNames } from "./chunks/widget-name-resolver-BFHZuaYL.js";
9
+ import { E as useConversationWidgetContext, p as payloadHashOfInstanceId, j as buildWidgetAgentSpaceKeyProps, as as useCanvasViable } from "./chunks/WebSearchResultsConversationWidget-H6cbTapV.js";
10
10
  import { c as canvasBehaviourOf, d as CHAT_COLUMN_MIN_WIDTH_PX, b as CANVAS_MIN_WIDTH_PX, D as DEFAULT_CANVAS_WIDTH_PERCENT, e as canvasWidthPercentOf, C as CANVAS_BOXED_INSET_PX } from "./chunks/canvas-behaviours-AvzKSYyv.js";
11
11
  import { r as readStoredCanvas, c as clearStoredCanvas } from "./chunks/canvasStorage-EvQsGdto.js";
12
- import { r as resolveDeepLinkableWidget, c as WidgetWindowRootContext, C as ConversationMarkdown, i as isWidgetClickSignalSource, b as buildWidgetRenderReportSignal, W as WIDGET_RENDER_REPORT_SIGNAL_SOURCE, e as createWidgetRenderReportCollector, f as WidgetRenderReportCollectorContext } from "./chunks/widget-click-signal-sources-BR82QygL.js";
13
- import { b as ConversationErrorType, a as ConversationMessageInputComposerWidgets, u as useAgentsChatSelector, C as ConversationWidgetProvider, c as createAgentsChatStore } from "./chunks/ConversationMessageInputComposerWidgets-CzQnpW0h.js";
14
- import { A, d, E, I, r, e, f, g, h } from "./chunks/ConversationMessageInputComposerWidgets-CzQnpW0h.js";
15
- import { c as canvasBodies } from "./chunks/canvasBodies-BiUt8MUG.js";
12
+ import { r as resolveDeepLinkableWidget, c as WidgetWindowRootContext, C as ConversationMarkdown, i as isWidgetClickSignalSource, b as buildWidgetRenderReportSignal, W as WIDGET_RENDER_REPORT_SIGNAL_SOURCE, e as createWidgetRenderReportCollector, f as WidgetRenderReportCollectorContext } from "./chunks/widget-click-signal-sources-DOpjIWdO.js";
13
+ import { b as ConversationErrorType, a as ConversationMessageInputComposerWidgets, u as useAgentsChatSelector, C as ConversationWidgetProvider, c as createAgentsChatStore } from "./chunks/ConversationMessageInputComposerWidgets-CFU9Bxjr.js";
14
+ import { A, d, E, I, r, e, f, g, h } from "./chunks/ConversationMessageInputComposerWidgets-CFU9Bxjr.js";
15
+ import { c as canvasBodies } from "./chunks/canvasBodies-BY1uT2og.js";
16
16
  import { c as canvasFeatureFlagOf } from "./chunks/canvas-feature-flags-BmmxC3bz.js";
17
17
  import { flushSync } from "react-dom";
18
18
  import { b as buildChangedMessagesRequest, d as deriveAgentActivity } from "./chunks/contract-BxmMxYPF.js";
@@ -1414,8 +1414,8 @@ const ConversationMessageThinking = memo((props) => {
1414
1414
  ] })
1415
1415
  ] });
1416
1416
  });
1417
- const errorMessageContainer = "agents_errorMessageContainer_uzjMdt";
1418
- const errorMessageTitle = "agents_errorMessageTitle_ftGnjl";
1417
+ const errorMessageContainer = "agents_errorMessageContainer_SW0BKU";
1418
+ const errorMessageTitle = "agents_errorMessageTitle_c--G2K";
1419
1419
  const styles$7 = {
1420
1420
  errorMessageContainer,
1421
1421
  errorMessageTitle
@@ -1426,7 +1426,7 @@ const formatFirstDayOfNextMonth = (now) => {
1426
1426
  const month = String(firstDayOfNextMonth.getMonth() + 1).padStart(2, "0");
1427
1427
  return `${day}.${month}.${firstDayOfNextMonth.getFullYear()}`;
1428
1428
  };
1429
- const ConversationErrorCard = (props) => {
1429
+ const ConversationErrorWidget = (props) => {
1430
1430
  const { errorType, rateLimitRetryAfterSeconds, onRetry } = props;
1431
1431
  const [retrying, setRetrying] = useState(false);
1432
1432
  const budgetLimit = useAgentsBudgetLimit();
@@ -1631,7 +1631,7 @@ const ConversationMessageList = ({
1631
1631
  }
1632
1632
  ) : null),
1633
1633
  error !== null ? /* @__PURE__ */ jsx(
1634
- ConversationErrorCard,
1634
+ ConversationErrorWidget,
1635
1635
  {
1636
1636
  errorType: error,
1637
1637
  rateLimitRetryAfterSeconds,
@@ -1641,15 +1641,15 @@ const ConversationMessageList = ({
1641
1641
  /* @__PURE__ */ jsx("div", { className: classes$1.messagesBottom, ref: messagesBottomRef })
1642
1642
  ] });
1643
1643
  };
1644
- const suggestionCard = "agents_suggestionCard_y2VMpF";
1645
- const suggestionCardButton = "agents_suggestionCardButton_Pt4757";
1646
- const arrowIcon = "agents_arrowIcon_WW31X0";
1644
+ const suggestionCard = "agents_suggestionCard_mrCOnL";
1645
+ const suggestionCardButton = "agents_suggestionCardButton_Vs0fh3";
1646
+ const arrowIcon = "agents_arrowIcon_KmN-nZ";
1647
1647
  const styles$6 = {
1648
1648
  suggestionCard,
1649
1649
  suggestionCardButton,
1650
1650
  arrowIcon
1651
1651
  };
1652
- const ConversationSuggestionCard = (props) => {
1652
+ const ConversationSuggestionWidget = (props) => {
1653
1653
  const { suggestion, onClick, testId } = props;
1654
1654
  const { AssistantIconBadge } = useAgentsEnvironment();
1655
1655
  return /* @__PURE__ */ jsx(InteractiveSurface, { hoverable: true, className: classNames(styles$6.suggestionCard), testId, children: /* @__PURE__ */ jsxs("button", { type: "button", className: styles$6.suggestionCardButton, onClick, children: [
@@ -1668,7 +1668,7 @@ const ConversationSuggestionCard = (props) => {
1668
1668
  /* @__PURE__ */ jsx(Icon, { color: "white", className: styles$6.arrowIcon, name: "arrowRight" })
1669
1669
  ] }) });
1670
1670
  };
1671
- const ConversationIntroCard = ({
1671
+ const ConversationIntroWidget = ({
1672
1672
  aiPromptExtension,
1673
1673
  aiPromptExtensionIcon,
1674
1674
  suggestions: suggestions2,
@@ -1706,7 +1706,7 @@ const ConversationIntroCard = ({
1706
1706
  }
1707
1707
  ),
1708
1708
  /* @__PURE__ */ jsx("div", { className: classes$1.suggestions, children: suggestions2?.map((suggestion, index) => /* @__PURE__ */ jsx(
1709
- ConversationSuggestionCard,
1709
+ ConversationSuggestionWidget,
1710
1710
  {
1711
1711
  suggestion,
1712
1712
  onClick: () => onSuggestionClick(suggestion.openingText)
@@ -2103,7 +2103,7 @@ const ConversationViewBody = (props) => {
2103
2103
  !conversationId && !categoriesLoaded && !aiPromptExtension ? /* @__PURE__ */ jsx(NoConversationLoading, {}) : null,
2104
2104
  !!conversationId && !messages ? /* @__PURE__ */ jsx(ConversationLoading, {}) : null,
2105
2105
  isConversationIntroVisible ? /* @__PURE__ */ jsx(
2106
- ConversationIntroCard,
2106
+ ConversationIntroWidget,
2107
2107
  {
2108
2108
  aiPromptExtension,
2109
2109
  aiPromptExtensionIcon: aiPromptExtension.iconClass,
@@ -4296,15 +4296,15 @@ const styles$1 = {
4296
4296
  stripRevealInner,
4297
4297
  strip
4298
4298
  };
4299
- const card = "agents_card_p3-j6e";
4300
- const cardFailed = "agents_cardFailed_Yk3H4I";
4301
- const cardGenericFile = "agents_cardGenericFile_2hOJ--";
4302
- const thumbnail = "agents_thumbnail_faItfA";
4303
- const fileFacts = "agents_fileFacts_EurBXS";
4304
- const uploadProgress = "agents_uploadProgress_3-EnvR";
4305
- const uploadStatusCaption = "agents_uploadStatusCaption_04a2S3";
4306
- const failedCaption = "agents_failedCaption_OgtR4u";
4307
- const removeButtonHolder = "agents_removeButtonHolder_ZNOOQE";
4299
+ const card = "agents_card_8HbjAG";
4300
+ const cardFailed = "agents_cardFailed_zXTTsv";
4301
+ const cardGenericFile = "agents_cardGenericFile_YOIBnL";
4302
+ const thumbnail = "agents_thumbnail_Qrdw5j";
4303
+ const fileFacts = "agents_fileFacts_QpffpE";
4304
+ const uploadProgress = "agents_uploadProgress_QuqyPG";
4305
+ const uploadStatusCaption = "agents_uploadStatusCaption_ztIZur";
4306
+ const failedCaption = "agents_failedCaption_kuj3Gv";
4307
+ const removeButtonHolder = "agents_removeButtonHolder_Ik959X";
4308
4308
  const styles = {
4309
4309
  card,
4310
4310
  cardFailed,
@@ -4324,7 +4324,7 @@ const convertBytesToSizeString = (bytes) => {
4324
4324
  const sizeIndex = Math.floor(Math.log(bytes) / Math.log(1024));
4325
4325
  return parseFloat((bytes / Math.pow(1024, sizeIndex)).toFixed(2)) + " " + sizes[sizeIndex];
4326
4326
  };
4327
- const ConversationMessageInputAttachmentPreviewCard = (props) => {
4327
+ const ConversationMessageInputAttachmentPreviewWidget = (props) => {
4328
4328
  const { attachment, onRemove, testId = "chat-input-attachment" } = props;
4329
4329
  const isUploading = attachment.uploadStatus === "uploading";
4330
4330
  const hasFailed = attachment.uploadStatus === "failed";
@@ -4399,7 +4399,7 @@ const ConversationMessageInputAttachmentsPreviewStrip = (props) => {
4399
4399
  className: classNames(styles$1.stripReveal, { [styles$1.stripRevealOpen]: attachments.length > 0 }),
4400
4400
  "data-testid": `${testId}-strip`,
4401
4401
  children: /* @__PURE__ */ jsx("div", { className: styles$1.stripRevealInner, children: /* @__PURE__ */ jsx("div", { className: styles$1.strip, children: attachments.map((attachment) => /* @__PURE__ */ jsx(
4402
- ConversationMessageInputAttachmentPreviewCard,
4402
+ ConversationMessageInputAttachmentPreviewWidget,
4403
4403
  {
4404
4404
  attachment,
4405
4405
  onRemove: () => onRemoveAttachment(attachment.attachmentId),
@@ -4421,8 +4421,9 @@ export {
4421
4421
  CanvasRestoreOnMount,
4422
4422
  ConversationClosedBar,
4423
4423
  ConversationDeepLinkedWidget,
4424
- ConversationErrorCard,
4424
+ ConversationErrorWidget as ConversationErrorCard,
4425
4425
  ConversationErrorType,
4426
+ ConversationErrorWidget,
4426
4427
  ConversationMessageInput,
4427
4428
  ConversationMessageInputAttachmentsErrorBox,
4428
4429
  ConversationMessageInputAttachmentsPreviewStrip,