@kodaris/krubble-app-components 1.0.98 → 1.0.100

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.
@@ -5580,6 +5580,7 @@
5580
5580
  * @fires message-submit - When the user sends a message. Cancelable. Detail: `{ message: string }`
5581
5581
  * @fires stream-event - Dispatched for every SSE message received. Detail contains the parsed event data.
5582
5582
  * @fires conversation-created - When a turn with no target creates a new conversation and the chatbot pins it. Detail: `{ conversation }` (the full conversation object).
5583
+ * @fires conversation-title - When the server sends the generated title for a new conversation (end of its first turn). The header label is already updated; this is for consumers with their own chrome to sync (breadcrumbs, tab titles). Detail: `{ title }`.
5583
5584
  */
5584
5585
  exports.Chatbot = class KRChatbot extends i$3 {
5585
5586
  constructor() {
@@ -7076,6 +7077,23 @@
7076
7077
  // Text only, never sent to the model — render verbatim as a banner.
7077
7078
  this._contextWarning = String(data.message || '');
7078
7079
  }
7080
+ else if (data.type === 'CONVERSATION_TITLE') {
7081
+ // The server generated a real title for a brand-new conversation
7082
+ // (it was created with a truncated first-message placeholder that we
7083
+ // deliberately never show). Adopt it as the header label and pass it
7084
+ // up so consumers can update their own chrome, e.g. a breadcrumb.
7085
+ if (data.data) {
7086
+ const title = String(data.data.title || '');
7087
+ if (title) {
7088
+ this.label = title;
7089
+ this.dispatchEvent(new CustomEvent('conversation-title', {
7090
+ detail: { title },
7091
+ bubbles: true,
7092
+ composed: true,
7093
+ }));
7094
+ }
7095
+ }
7096
+ }
7079
7097
  else if (data.type === 'CONVERSATION_LIMIT_REACHED') {
7080
7098
  // User-facing hard stop. Carries finished:true (handled below).
7081
7099
  // Clear any soft warning so we don't double-message the user.