@aparte/core 0.16.6 → 0.16.7

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.
@@ -3489,6 +3489,7 @@ class AparteConversationController {
3489
3489
  ...attachments ? { attachments } : {}
3490
3490
  };
3491
3491
  this._binding.appendMessage(userMsg);
3492
+ evt.detail.echoed = true;
3492
3493
  void this._ensureConversationAndPersist(userMsg);
3493
3494
  };
3494
3495
  host.addEventListener("aparte-send", this._onSendCapture, { capture: true });
@@ -5585,6 +5586,17 @@ class AparteClient {
5585
5586
  console.warn("[AparteClient] ⚠️ No target element found with appendMessage support. Provide a targetResolver in AparteClientOptions or ensure the composer has a `target` attribute.");
5586
5587
  return;
5587
5588
  }
5589
+ if (this.options.echoUserMessage !== false && event.detail?.echoed !== true) {
5590
+ const echoFiles = Array.isArray(event.detail?.files) ? event.detail.files : [];
5591
+ targetElement.appendMessage?.({
5592
+ id: uuid(),
5593
+ role: "user",
5594
+ content,
5595
+ timestamp: Date.now(),
5596
+ ...echoFiles.length > 0 ? { attachments: filesToAttachments(echoFiles) } : {}
5597
+ });
5598
+ if (event.detail && typeof event.detail === "object") event.detail.echoed = true;
5599
+ }
5588
5600
  const messageId = uuid();
5589
5601
  const config = this._config.getModelConfig();
5590
5602
  const providerId = explicitProviderId || config.defaultProvider;
@@ -6390,4 +6402,4 @@ export {
6390
6402
  collectRendererStyles as y,
6391
6403
  contentToText as z
6392
6404
  };
6393
- //# sourceMappingURL=dialog-triggers-CVCxqKg3.js.map
6405
+ //# sourceMappingURL=dialog-triggers-Dw_DIlQ7.js.map