@helpai/elements 0.50.2 → 0.50.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/index.mjs CHANGED
@@ -29,7 +29,7 @@ var BRAND = {
29
29
  };
30
30
 
31
31
  // src/core/version.ts
32
- var ELEMENTS_VERSION = true ? "0.50.2" : "0.0.0-dev";
32
+ var ELEMENTS_VERSION = true ? "0.50.3" : "0.0.0-dev";
33
33
  var ELEMENTS_VERSION_PARAM = "_ev";
34
34
 
35
35
  // src/i18n/strings.ts
@@ -2016,7 +2016,8 @@ function buildSendMessageRequest(params) {
2016
2016
  conversationId: params.conversationId,
2017
2017
  trigger: params.trigger ?? "submit-message"
2018
2018
  };
2019
- if (params.messageId) body.messageId = params.messageId;
2019
+ const anchorId = wire.at(-1)?.id;
2020
+ if (anchorId) body.messageId = anchorId;
2020
2021
  if (params.visitorId) body.visitorId = params.visitorId;
2021
2022
  if (params.userPrefs) body.userPrefs = params.userPrefs;
2022
2023
  const tools = params.tools?.map(normalizeToolRef).filter((t) => t !== null);
@@ -7950,10 +7951,6 @@ function App({ options, hostElement, bus }) {
7950
7951
  const body = buildSendMessageRequest({
7951
7952
  messages: thread.map(fromReactive),
7952
7953
  conversationId: activeConversationId,
7953
- // The assistant message being generated / resumed — prefer the id the
7954
- // backend assigned (adopted from the `start` chunk) so a HITL re-POST
7955
- // resumes the message the backend persisted, not the client-minted id.
7956
- messageId: assistantMsg.serverMessageId ?? assistantMsg.id,
7957
7954
  // textModel + imageModel are backend-only — selected per deployment.
7958
7955
  tools: options.features.tools,
7959
7956
  // Identity + preferences ride on every message — server may need
package/package.json CHANGED
@@ -80,5 +80,5 @@
80
80
  ],
81
81
  "type": "module",
82
82
  "types": "./index.d.ts",
83
- "version": "0.50.2"
83
+ "version": "0.50.3"
84
84
  }
package/web-component.mjs CHANGED
@@ -1794,7 +1794,7 @@ function createAuth(opts) {
1794
1794
  }
1795
1795
 
1796
1796
  // src/core/version.ts
1797
- var ELEMENTS_VERSION = true ? "0.50.2" : "0.0.0-dev";
1797
+ var ELEMENTS_VERSION = true ? "0.50.3" : "0.0.0-dev";
1798
1798
  var ELEMENTS_VERSION_PARAM = "_ev";
1799
1799
 
1800
1800
  // src/stream/types.ts
@@ -1975,7 +1975,8 @@ function buildSendMessageRequest(params) {
1975
1975
  conversationId: params.conversationId,
1976
1976
  trigger: params.trigger ?? "submit-message"
1977
1977
  };
1978
- if (params.messageId) body.messageId = params.messageId;
1978
+ const anchorId = wire.at(-1)?.id;
1979
+ if (anchorId) body.messageId = anchorId;
1979
1980
  if (params.visitorId) body.visitorId = params.visitorId;
1980
1981
  if (params.userPrefs) body.userPrefs = params.userPrefs;
1981
1982
  const tools = params.tools?.map(normalizeToolRef).filter((t) => t !== null);
@@ -7909,10 +7910,6 @@ function App({ options, hostElement, bus }) {
7909
7910
  const body = buildSendMessageRequest({
7910
7911
  messages: thread.map(fromReactive),
7911
7912
  conversationId: activeConversationId,
7912
- // The assistant message being generated / resumed — prefer the id the
7913
- // backend assigned (adopted from the `start` chunk) so a HITL re-POST
7914
- // resumes the message the backend persisted, not the client-minted id.
7915
- messageId: assistantMsg.serverMessageId ?? assistantMsg.id,
7916
7913
  // textModel + imageModel are backend-only — selected per deployment.
7917
7914
  tools: options.features.tools,
7918
7915
  // Identity + preferences ride on every message — server may need