@kodaris/krubble-app-components 1.0.114 → 1.0.116

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.
@@ -5679,10 +5679,10 @@
5679
5679
  this._dragStartTop = 0;
5680
5680
  this._resizeStartW = 0;
5681
5681
  this._resizeStartH = 0;
5682
- /** Cursor X at debug-drawer resize start. */
5683
- this._debugResizeStartX = 0;
5684
- /** Debug-drawer width at resize start. */
5685
- this._debugResizeStartW = 0;
5682
+ /** Cursor X at drawer resize start. */
5683
+ this._drawerResizeStartX = 0;
5684
+ /** Drawer width at resize start. */
5685
+ this._drawerResizeStartW = 0;
5686
5686
  /** Counter for depth-aware dragenter/dragleave tracking. */
5687
5687
  this._dragDepth = 0;
5688
5688
  /** Monotonic id source for pending attachments. */
@@ -5860,9 +5860,9 @@
5860
5860
  */
5861
5861
  this._drawerView = 'settings';
5862
5862
  /** Current width of the drawer in px (user-resizable, persisted). */
5863
- this._debugDrawerWidth = 430;
5863
+ this._drawerWidth = 430;
5864
5864
  /** True while the user is dragging the drawer's resize handle. */
5865
- this._isDebugResizing = false;
5865
+ this._isDrawerResizing = false;
5866
5866
  /** Files staged in the composer, before the message is sent. */
5867
5867
  this._pendingConversationFiles = [];
5868
5868
  /** True while a file is being dragged over the panel (shows the drop overlay). */
@@ -6059,23 +6059,23 @@
6059
6059
  }
6060
6060
  }
6061
6061
  };
6062
- this._handleDebugResizeMouseMove = (e) => {
6063
- if (!this._isDebugResizing) {
6062
+ this._handleDrawerResizeMouseMove = (e) => {
6063
+ if (!this._isDrawerResizing) {
6064
6064
  return;
6065
6065
  }
6066
6066
  // Handle is on the drawer's left edge; dragging left (negative dx) widens it.
6067
- const dx = e.clientX - this._debugResizeStartX;
6067
+ const dx = e.clientX - this._drawerResizeStartX;
6068
6068
  const minW = 300;
6069
6069
  // Never let the chat column shrink below 300px — cap the drawer at the
6070
6070
  // container width minus that reserved chat width.
6071
6071
  const minChatWidth = 300;
6072
6072
  const maxW = Math.max(minW, this.offsetWidth - minChatWidth);
6073
- this._debugDrawerWidth = Math.max(minW, Math.min(this._debugResizeStartW - dx, maxW));
6073
+ this._drawerWidth = Math.max(minW, Math.min(this._drawerResizeStartW - dx, maxW));
6074
6074
  };
6075
- this._handleDebugResizeMouseUp = () => {
6076
- this._isDebugResizing = false;
6077
- document.removeEventListener('mousemove', this._handleDebugResizeMouseMove);
6078
- document.removeEventListener('mouseup', this._handleDebugResizeMouseUp);
6075
+ this._handleDrawerResizeMouseUp = () => {
6076
+ this._isDrawerResizing = false;
6077
+ document.removeEventListener('mousemove', this._handleDrawerResizeMouseMove);
6078
+ document.removeEventListener('mouseup', this._handleDrawerResizeMouseUp);
6079
6079
  this._saveState();
6080
6080
  };
6081
6081
  }
@@ -6386,7 +6386,7 @@
6386
6386
  showConfirmationInput: String(this._showConfirmationInput),
6387
6387
  drawerOpen: String(this._drawerOpen),
6388
6388
  drawerView: this._drawerView,
6389
- debugDrawerWidth: String(this._debugDrawerWidth),
6389
+ drawerWidth: String(this._drawerWidth),
6390
6390
  };
6391
6391
  if (this._panelEl) {
6392
6392
  const s = this._panelEl.style;
@@ -6436,9 +6436,9 @@
6436
6436
  if (state.drawerView === 'settings' || state.drawerView === 'debug') {
6437
6437
  this._drawerView = state.drawerView;
6438
6438
  }
6439
- const w = Number(state.debugDrawerWidth);
6439
+ const w = Number(state.drawerWidth);
6440
6440
  if (w >= 300) {
6441
- this._debugDrawerWidth = w;
6441
+ this._drawerWidth = w;
6442
6442
  }
6443
6443
  // The floating widget's open/layout state doesn't apply to inline mode.
6444
6444
  if (this.variant !== 'inline' && state.opened === 'true') {
@@ -7433,7 +7433,6 @@
7433
7433
  }
7434
7434
  });
7435
7435
  }
7436
- /** Clear the in-flight confirmation flags (error paths, or once resolved). */
7437
7436
  /**
7438
7437
  * Capture ambient "where is the user / what are they looking at" context at
7439
7438
  * send time, so the AI is grounded without the host passing anything in.
@@ -7529,14 +7528,14 @@
7529
7528
  this._drawerOpen = false;
7530
7529
  this._saveState();
7531
7530
  }
7532
- _handleDebugResizeMouseDown(e) {
7533
- this._isDebugResizing = true;
7534
- this._debugResizeStartX = e.clientX;
7535
- this._debugResizeStartW = this._debugDrawerWidth;
7531
+ _handleDrawerResizeMouseDown(e) {
7532
+ this._isDrawerResizing = true;
7533
+ this._drawerResizeStartX = e.clientX;
7534
+ this._drawerResizeStartW = this._drawerWidth;
7536
7535
  e.preventDefault();
7537
7536
  e.stopPropagation();
7538
- document.addEventListener('mousemove', this._handleDebugResizeMouseMove);
7539
- document.addEventListener('mouseup', this._handleDebugResizeMouseUp);
7537
+ document.addEventListener('mousemove', this._handleDrawerResizeMouseMove);
7538
+ document.addEventListener('mouseup', this._handleDrawerResizeMouseUp);
7540
7539
  }
7541
7540
  _readStreamChunk() {
7542
7541
  if (!this._reader) {
@@ -7641,10 +7640,9 @@
7641
7640
  // deliberately never show). Adopt it as the header label and pass it
7642
7641
  // up so consumers can update their own chrome, e.g. a breadcrumb.
7643
7642
  if (data.data?.title) {
7644
- const title = String(data.data.title);
7645
- this.label = title;
7643
+ this.label = data.data.title;
7646
7644
  this.dispatchEvent(new CustomEvent('conversation-title', {
7647
- detail: { title },
7645
+ detail: { title: data.data.title },
7648
7646
  bubbles: true,
7649
7647
  composed: true,
7650
7648
  }));
@@ -8141,13 +8139,13 @@
8141
8139
  class=${e({
8142
8140
  'drawer': true,
8143
8141
  'drawer--open': this._drawerOpen,
8144
- 'drawer--resizing': this._isDebugResizing,
8142
+ 'drawer--resizing': this._isDrawerResizing,
8145
8143
  })}
8146
- style=${o({ width: `${this._debugDrawerWidth}px` })}
8144
+ style=${o({ width: `${this._drawerWidth}px` })}
8147
8145
  >
8148
8146
  <div
8149
8147
  class="drawer__resize"
8150
- @mousedown=${this._handleDebugResizeMouseDown}
8148
+ @mousedown=${this._handleDrawerResizeMouseDown}
8151
8149
  ></div>
8152
8150
  <div class="drawer__header">
8153
8151
  <span class="drawer__title">${isDebug ? 'Debug' : 'Settings'}</span>
@@ -8311,7 +8309,7 @@
8311
8309
  // both views. Only pushes while the drawer is open.
8312
8310
  const contentPadding = {};
8313
8311
  if (this._drawerOpen) {
8314
- contentPadding.paddingRight = `${this._debugDrawerWidth}px`;
8312
+ contentPadding.paddingRight = `${this._drawerWidth}px`;
8315
8313
  }
8316
8314
  // Group the transcript into runs so an agent turn (its reasoning/tool/text/
8317
8315
  // decision messages, which stream in as separate entries) renders inside ONE
@@ -8357,7 +8355,7 @@
8357
8355
  class=${e({
8358
8356
  'panel': true,
8359
8357
  'panel--opened': this.opened,
8360
- 'panel--resizing-debug': this._isDebugResizing,
8358
+ 'panel--resizing-drawer': this._isDrawerResizing,
8361
8359
  })}
8362
8360
  style=${o(contentPadding)}
8363
8361
  @dragenter=${this._handleDragEnter}
@@ -8550,9 +8548,9 @@
8550
8548
  let resultPreview = '';
8551
8549
  let resultRemainder = 0;
8552
8550
  if (msg.type === 'tool_use') {
8553
- const next = this.messages[index + 1];
8554
- if (next && next.type === 'tool_result' && next.data?.toolUseId === msg.data?.toolUseId) {
8555
- result = next.data;
8551
+ if (this.messages[index + 1]?.type === 'tool_result'
8552
+ && this.messages[index + 1].data?.toolUseId === msg.data?.toolUseId) {
8553
+ result = this.messages[index + 1].data;
8556
8554
  }
8557
8555
  if (this._showToolInputs && msg.data?.toolInput) {
8558
8556
  inputSummary = String(msg.data.toolInput).replace(/\s+/g, ' ').trim();
@@ -9126,7 +9124,7 @@
9126
9124
  }
9127
9125
 
9128
9126
  /* Track the cursor 1:1 while dragging the drawer's resize handle. */
9129
- :host([variant='inline']) .panel--resizing-debug {
9127
+ :host([variant='inline']) .panel--resizing-drawer {
9130
9128
  transition: none;
9131
9129
  }
9132
9130
 
@@ -9811,7 +9809,7 @@
9811
9809
  * drawer does not overlay. It stays mounted and slides in/out via a transform,
9812
9810
  * so opening and closing animate; switching views just swaps the content
9813
9811
  * inside (no re-slide, no width change). One consistent resizable width across
9814
- * both views; the width is set inline from _debugDrawerWidth.
9812
+ * both views; the width is set inline from _drawerWidth.
9815
9813
  */
9816
9814
  .drawer {
9817
9815
  position: absolute;
@@ -10842,10 +10840,10 @@
10842
10840
  ], exports.Chatbot.prototype, "_drawerView", void 0);
10843
10841
  __decorate([
10844
10842
  r()
10845
- ], exports.Chatbot.prototype, "_debugDrawerWidth", void 0);
10843
+ ], exports.Chatbot.prototype, "_drawerWidth", void 0);
10846
10844
  __decorate([
10847
10845
  r()
10848
- ], exports.Chatbot.prototype, "_isDebugResizing", void 0);
10846
+ ], exports.Chatbot.prototype, "_isDrawerResizing", void 0);
10849
10847
  __decorate([
10850
10848
  r()
10851
10849
  ], exports.Chatbot.prototype, "_pendingConversationFiles", void 0);