panopticon-cli 0.6.3 → 0.6.4
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/dashboard/public/assets/{dist-CSW7MwkK.js → dist-CCJbQrSB.js} +1 -1
- package/dist/dashboard/public/assets/{index-DuamiNtC.js → index-yarWhi0M.js} +41 -41
- package/dist/dashboard/public/index.html +1 -1
- package/dist/dashboard/server.js +8 -1
- package/dist/dashboard/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
})();
|
|
20
20
|
</script>
|
|
21
|
-
<script type="module" crossorigin src="/assets/index-
|
|
21
|
+
<script type="module" crossorigin src="/assets/index-yarWhi0M.js"></script>
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/chunk-BEqpzyXh.js">
|
|
23
23
|
<link rel="stylesheet" crossorigin href="/assets/index-CpSmB2ts.css">
|
|
24
24
|
</head>
|
package/dist/dashboard/server.js
CHANGED
|
@@ -6751,6 +6751,13 @@ function canReplaceTitle(conv) {
|
|
|
6751
6751
|
* All file I/O uses fs/promises (no sync calls).
|
|
6752
6752
|
*/
|
|
6753
6753
|
init_cost();
|
|
6754
|
+
/** Detect AI provider from model name */
|
|
6755
|
+
function providerFromModel(model) {
|
|
6756
|
+
if (model.includes("gpt")) return "openai";
|
|
6757
|
+
if (model.includes("gemini")) return "google";
|
|
6758
|
+
if (model.includes("kimi") || model.toLowerCase().startsWith("minimax")) return "custom";
|
|
6759
|
+
return "anthropic";
|
|
6760
|
+
}
|
|
6754
6761
|
/**
|
|
6755
6762
|
* Parse JSONL session file from a byte offset.
|
|
6756
6763
|
*
|
|
@@ -6822,7 +6829,7 @@ async function parseConversationMessages(sessionFile, fromByteOffset = 0) {
|
|
|
6822
6829
|
const msg = entry.message;
|
|
6823
6830
|
const content = Array.isArray(msg.content) ? msg.content : [];
|
|
6824
6831
|
if (msg.usage && msg.model) {
|
|
6825
|
-
const pricing = getPricing(
|
|
6832
|
+
const pricing = getPricing(providerFromModel(msg.model), msg.model);
|
|
6826
6833
|
if (pricing) totalCost += calculateCost({
|
|
6827
6834
|
inputTokens: msg.usage.input_tokens ?? 0,
|
|
6828
6835
|
outputTokens: msg.usage.output_tokens ?? 0,
|