@mgamadeus/ddd-agents 0.1.43 → 0.2.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/chat.js CHANGED
@@ -10,13 +10,14 @@ import { W as WIDGET_FENCE_LANG, G as resolveWidgetName, j as conversationWidget
10
10
  import { F as useConversationWidgetContext, p as payloadHashOfInstanceId, k as buildWidgetAgentSpaceKeyProps, aM as useCanvasViable, a9 as ElementWidthCanvasViability, Z as CanvasViabilityContext } from "./chunks/WebSearchResultsConversationWidget-DTnsU_C-.js";
11
11
  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-C9hzl4a0.js";
12
12
  import { r as readStoredCanvas, c as clearStoredCanvas } from "./chunks/canvasStorage-EZDxQQaK.js";
13
- import { b as ConversationErrorType, a as ConversationMessageInputComposerWidgets, u as useAgentsChatSelector, C as ConversationWidgetProvider, c as createAgentsChatStore } from "./chunks/ConversationMessageInputComposerWidgets-DRq6PdVz.js";
14
- import { A, d, E, I, r, e, f, g, h } from "./chunks/ConversationMessageInputComposerWidgets-DRq6PdVz.js";
13
+ import { b as ConversationErrorType, a as ConversationMessageInputComposerWidgets, u as useAgentsChatSelector, C as ConversationWidgetProvider, c as createAgentsChatStore } from "./chunks/ConversationMessageInputComposerWidgets-B-AFRgTc.js";
14
+ import { A, d, E, I, r, e, f, g, h } from "./chunks/ConversationMessageInputComposerWidgets-B-AFRgTc.js";
15
+ import { l as lastWireMessageIsUnansweredUserMessage, P as PHONE_CALL_LIFECYCLE_SIGNAL_SOURCES, b as buildChangedMessagesRequest, d as deriveAgentActivity } from "./chunks/contract-C18owGKs.js";
16
+ import { S } from "./chunks/contract-C18owGKs.js";
15
17
  import { t as textKey } from "./chunks/text-key-DnoZ4lAk.js";
16
18
  import { c as canvasBodies } from "./chunks/canvasBodies-D_nrp7ci.js";
17
19
  import { c as canvasFeatureFlagOf } from "./chunks/canvas-feature-flags-BmmxC3bz.js";
18
20
  import { flushSync } from "react-dom";
19
- import { b as buildChangedMessagesRequest, d as deriveAgentActivity } from "./chunks/contract-kmmw_19Y.js";
20
21
  const history = "agents_history_BIbikt";
21
22
  const styles$n = {
22
23
  history
@@ -1193,36 +1194,6 @@ const assistantMessageHasRenderableMarkdown = (message2) => {
1193
1194
  const markdown = normalizeServerMessageToMarkdown(message2).trim();
1194
1195
  return markdown !== "" && !isBareUnknownTypeJson(markdown);
1195
1196
  };
1196
- const PHONE_CALL_LIFECYCLE_SIGNAL_SOURCES = ["PHONE_CALL_STARTED", "PHONE_CALL_ENDED"];
1197
- const REPEATED_TEXT_SUPPRESSED_SIGNAL_SOURCE = "REPEATED_TEXT_SUPPRESSED";
1198
- const PLATFORM_WIDGET_EMITTED_SIGNAL_SOURCE = "PLATFORM_WIDGET_EMITTED";
1199
- const FRONTEND_WIDGET_RENDER_REPORT_SIGNAL_SOURCE = "FRONTEND_WIDGET_RENDER_REPORT";
1200
- const SIGNAL_SOURCES_THAT_OWE_NO_WORK = [
1201
- ...PHONE_CALL_LIFECYCLE_SIGNAL_SOURCES,
1202
- REPEATED_TEXT_SUPPRESSED_SIGNAL_SOURCE,
1203
- PLATFORM_WIDGET_EMITTED_SIGNAL_SOURCE,
1204
- FRONTEND_WIDGET_RENDER_REPORT_SIGNAL_SOURCE
1205
- ];
1206
- const lastWireMessageIsUnansweredUserMessage = (messages) => {
1207
- if (!messages?.length) {
1208
- return false;
1209
- }
1210
- const sorted = [...messages].sort((a, b) => (a.indexInConversation ?? 0) - (b.indexInConversation ?? 0));
1211
- for (let position = sorted.length - 1; position >= 0; position--) {
1212
- const message2 = sorted[position];
1213
- if (message2.messageType === "ERROR" || message2.messageType === "CHECKPOINT" || message2.messageType === "TOOL_MESSAGE") {
1214
- continue;
1215
- }
1216
- if (message2.messageType === "SIGNAL") {
1217
- if (SIGNAL_SOURCES_THAT_OWE_NO_WORK.includes(message2.signalSource ?? "")) {
1218
- continue;
1219
- }
1220
- return true;
1221
- }
1222
- return message2.authorType === "USER";
1223
- }
1224
- return false;
1225
- };
1226
1197
  const responseContainer$1 = "agents_responseContainer_LFzKoO";
1227
1198
  const styles$e = {
1228
1199
  responseContainer: responseContainer$1
@@ -4584,7 +4555,7 @@ export {
4584
4555
  I as INITIAL_AGENTS_CHAT_STATE,
4585
4556
  MAX_MESSAGE_LENGTH,
4586
4557
  PHONE_CALL_LIFECYCLE_SIGNAL_SOURCES,
4587
- SIGNAL_SOURCES_THAT_OWE_NO_WORK,
4558
+ S as SIGNAL_SOURCES_THAT_OWE_NO_WORK,
4588
4559
  SUCCESS_BEAT_MS,
4589
4560
  createAgentsChatStore,
4590
4561
  deriveAgentActivity,