@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
package/dist/krubble-app.umd.js
CHANGED
|
@@ -6389,6 +6389,19 @@
|
|
|
6389
6389
|
}
|
|
6390
6390
|
return '~$' + n.toFixed(4);
|
|
6391
6391
|
}
|
|
6392
|
+
_fmtPrice(n) {
|
|
6393
|
+
if (n == null || isNaN(n)) {
|
|
6394
|
+
return '—';
|
|
6395
|
+
}
|
|
6396
|
+
return '$' + n.toFixed(2);
|
|
6397
|
+
}
|
|
6398
|
+
_getCustomerPriceLabel() {
|
|
6399
|
+
const rate = this._telemetry?.customerPricePerThousandTokens;
|
|
6400
|
+
if (rate == null || isNaN(rate)) {
|
|
6401
|
+
return 'Customer price';
|
|
6402
|
+
}
|
|
6403
|
+
return `Customer price ($${rate}/1K)`;
|
|
6404
|
+
}
|
|
6392
6405
|
/**
|
|
6393
6406
|
* INTERNAL-ONLY debug telemetry panel. Rendered only in the inline variant
|
|
6394
6407
|
* (guarded by the caller) and only when the user has toggled it open. Shows
|
|
@@ -6769,8 +6782,14 @@
|
|
|
6769
6782
|
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.turnCacheReadTokens)}</span>
|
|
6770
6783
|
<span class="debug-metrics__key">Hit rate</span>
|
|
6771
6784
|
<span class="debug-metrics__val">${this._telemetry.turnHitRate ?? '—'}%</span>
|
|
6785
|
+
<span class="debug-metrics__key">Total tokens</span>
|
|
6786
|
+
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.turnTotalTokens)}</span>
|
|
6787
|
+
<span class="debug-metrics__key">Reported total</span>
|
|
6788
|
+
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.turnReportedTotalTokens)}</span>
|
|
6772
6789
|
<span class="debug-metrics__key">Cost</span>
|
|
6773
6790
|
<span class="debug-metrics__val debug-cost">${this._fmtCost(this._telemetry.turnCostUsd)}</span>
|
|
6791
|
+
<span class="debug-metrics__key">${this._getCustomerPriceLabel()}</span>
|
|
6792
|
+
<span class="debug-metrics__val debug-cost">${this._fmtPrice(this._telemetry.turnCustomerUsd)}</span>
|
|
6774
6793
|
</div>
|
|
6775
6794
|
</div>
|
|
6776
6795
|
|
|
@@ -6785,8 +6804,12 @@
|
|
|
6785
6804
|
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.conversationCacheReadTokens)}</span>
|
|
6786
6805
|
<span class="debug-metrics__key">Cache write</span>
|
|
6787
6806
|
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.conversationCacheWriteTokens)}</span>
|
|
6807
|
+
<span class="debug-metrics__key">Total tokens</span>
|
|
6808
|
+
<span class="debug-metrics__val">${this._fmtTokens(this._telemetry.conversationTotalTokens)}</span>
|
|
6788
6809
|
<span class="debug-metrics__key">Cost so far</span>
|
|
6789
6810
|
<span class="debug-metrics__val debug-cost">${this._fmtCost(this._telemetry.conversationCostUsd)}</span>
|
|
6811
|
+
<span class="debug-metrics__key">${this._getCustomerPriceLabel()} so far</span>
|
|
6812
|
+
<span class="debug-metrics__val debug-cost">${this._fmtPrice(this._telemetry.conversationCustomerUsd)}</span>
|
|
6790
6813
|
</div>
|
|
6791
6814
|
</div>
|
|
6792
6815
|
` : b `
|
|
@@ -6806,7 +6829,10 @@
|
|
|
6806
6829
|
<th>Cache R</th>
|
|
6807
6830
|
<th>Cache W</th>
|
|
6808
6831
|
<th>Hit</th>
|
|
6832
|
+
<th>Total</th>
|
|
6833
|
+
<th>Reported</th>
|
|
6809
6834
|
<th>Cost</th>
|
|
6835
|
+
<th>Price</th>
|
|
6810
6836
|
<th>Ckpt</th>
|
|
6811
6837
|
</tr>
|
|
6812
6838
|
</thead>
|
|
@@ -6821,7 +6847,10 @@
|
|
|
6821
6847
|
<td>${this._fmtTokens(it.iterationCacheRead)}</td>
|
|
6822
6848
|
<td>${this._fmtTokens(it.iterationCacheWrite)}</td>
|
|
6823
6849
|
<td>${it.iterationHitRate ?? '—'}%</td>
|
|
6850
|
+
<td>${this._fmtTokens(it.iterationTotalTokens)}</td>
|
|
6851
|
+
<td>${this._fmtTokens(it.reportedTotalTokens)}</td>
|
|
6824
6852
|
<td class="debug-cost">${this._fmtCost(it.iterationCostUsd)}</td>
|
|
6853
|
+
<td class="debug-cost">${this._fmtPrice(it.iterationCustomerUsd)}</td>
|
|
6825
6854
|
<td>${ckpt ? ckpt.mode : '—'}</td>
|
|
6826
6855
|
</tr>
|
|
6827
6856
|
`;
|