@kodaris/krubble-app-components 1.0.166 → 1.0.167
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/chatbot.d.ts +10 -1
- package/dist/chatbot.d.ts.map +1 -1
- package/dist/chatbot.js +29 -0
- package/dist/chatbot.js.map +1 -1
- package/dist/krubble-app.bundled.js +29 -0
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +25 -9
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +29 -0
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +21 -5
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/dist/krubble-shell-chatbot.umd.js +29 -0
- package/dist/krubble-shell-chatbot.umd.js.map +1 -1
- package/dist/krubble-shell-chatbot.umd.min.js +170 -154
- package/dist/krubble-shell-chatbot.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -24371,6 +24371,19 @@
|
|
|
24371
24371
|
}
|
|
24372
24372
|
return '~$' + n.toFixed(4);
|
|
24373
24373
|
}
|
|
24374
|
+
_fmtPrice(n) {
|
|
24375
|
+
if (n == null || isNaN(n)) {
|
|
24376
|
+
return '—';
|
|
24377
|
+
}
|
|
24378
|
+
return '$' + n.toFixed(2);
|
|
24379
|
+
}
|
|
24380
|
+
_getCustomerPriceLabel() {
|
|
24381
|
+
const rate = this._telemetry?.customerPricePerThousandTokens;
|
|
24382
|
+
if (rate == null || isNaN(rate)) {
|
|
24383
|
+
return 'Customer price';
|
|
24384
|
+
}
|
|
24385
|
+
return `Customer price ($${rate}/1K)`;
|
|
24386
|
+
}
|
|
24374
24387
|
/**
|
|
24375
24388
|
* INTERNAL-ONLY debug telemetry panel. Rendered only in the inline variant
|
|
24376
24389
|
* (guarded by the caller) and only when the user has toggled it open. Shows
|
|
@@ -24751,8 +24764,14 @@
|
|
|
24751
24764
|
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.turnCacheReadTokens)}</span>
|
|
24752
24765
|
<span class="debug-metrics__key">Hit rate</span>
|
|
24753
24766
|
<span class="debug-metrics__val">${this._telemetry.turnHitRate ?? '—'}%</span>
|
|
24767
|
+
<span class="debug-metrics__key">Total tokens</span>
|
|
24768
|
+
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.turnTotalTokens)}</span>
|
|
24769
|
+
<span class="debug-metrics__key">Reported total</span>
|
|
24770
|
+
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.turnReportedTotalTokens)}</span>
|
|
24754
24771
|
<span class="debug-metrics__key">Cost</span>
|
|
24755
24772
|
<span class="debug-metrics__val debug-cost">${this._fmtCost(this._telemetry.turnCostUsd)}</span>
|
|
24773
|
+
<span class="debug-metrics__key">${this._getCustomerPriceLabel()}</span>
|
|
24774
|
+
<span class="debug-metrics__val debug-cost">${this._fmtPrice(this._telemetry.turnCustomerUsd)}</span>
|
|
24756
24775
|
</div>
|
|
24757
24776
|
</div>
|
|
24758
24777
|
|
|
@@ -24767,8 +24786,12 @@
|
|
|
24767
24786
|
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.conversationCacheReadTokens)}</span>
|
|
24768
24787
|
<span class="debug-metrics__key">Cache write</span>
|
|
24769
24788
|
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.conversationCacheWriteTokens)}</span>
|
|
24789
|
+
<span class="debug-metrics__key">Total tokens</span>
|
|
24790
|
+
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.conversationTotalTokens)}</span>
|
|
24770
24791
|
<span class="debug-metrics__key">Cost so far</span>
|
|
24771
24792
|
<span class="debug-metrics__val debug-cost">${this._fmtCost(this._telemetry.conversationCostUsd)}</span>
|
|
24793
|
+
<span class="debug-metrics__key">${this._getCustomerPriceLabel()} so far</span>
|
|
24794
|
+
<span class="debug-metrics__val debug-cost">${this._fmtPrice(this._telemetry.conversationCustomerUsd)}</span>
|
|
24772
24795
|
</div>
|
|
24773
24796
|
</div>
|
|
24774
24797
|
` : b `
|
|
@@ -24788,7 +24811,10 @@
|
|
|
24788
24811
|
<th>Cache R</th>
|
|
24789
24812
|
<th>Cache W</th>
|
|
24790
24813
|
<th>Hit</th>
|
|
24814
|
+
<th>Total</th>
|
|
24815
|
+
<th>Reported</th>
|
|
24791
24816
|
<th>Cost</th>
|
|
24817
|
+
<th>Price</th>
|
|
24792
24818
|
<th>Ckpt</th>
|
|
24793
24819
|
</tr>
|
|
24794
24820
|
</thead>
|
|
@@ -24803,7 +24829,10 @@
|
|
|
24803
24829
|
<td>${this._fmtTokens(it.iterationCacheRead)}</td>
|
|
24804
24830
|
<td>${this._fmtTokens(it.iterationCacheWrite)}</td>
|
|
24805
24831
|
<td>${it.iterationHitRate ?? '—'}%</td>
|
|
24832
|
+
<td>${this._fmtTokens(it.iterationTotalTokens)}</td>
|
|
24833
|
+
<td>${this._fmtTokens(it.reportedTotalTokens)}</td>
|
|
24806
24834
|
<td class="debug-cost">${this._fmtCost(it.iterationCostUsd)}</td>
|
|
24835
|
+
<td class="debug-cost">${this._fmtPrice(it.iterationCustomerUsd)}</td>
|
|
24807
24836
|
<td>${ckpt ? ckpt.mode : '—'}</td>
|
|
24808
24837
|
</tr>
|
|
24809
24838
|
`;
|