panopticon-cli 0.6.2 → 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/README.md +1 -1
- package/dist/dashboard/public/assets/{dist-C2sRcZJv.js → dist-CCJbQrSB.js} +1 -1
- package/dist/dashboard/public/assets/{index-BEdq7CFf.css → index-CpSmB2ts.css} +1 -1
- package/dist/dashboard/public/assets/{index-BCLmEMRf.js → index-yarWhi0M.js} +62 -62
- package/dist/dashboard/public/index.html +2 -2
- package/dist/dashboard/server.js +18 -5
- package/dist/dashboard/server.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,9 +18,9 @@
|
|
|
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
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
23
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CpSmB2ts.css">
|
|
24
24
|
</head>
|
|
25
25
|
<body>
|
|
26
26
|
<div id="root"></div>
|
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,
|
|
@@ -21168,10 +21175,8 @@ async function getClaudeAuthStatus() {
|
|
|
21168
21175
|
const oauth = JSON.parse(raw).claudeAiOauth ?? {};
|
|
21169
21176
|
if (oauth.accessToken) {
|
|
21170
21177
|
expiresAt = typeof oauth.expiresAt === "number" ? oauth.expiresAt : null;
|
|
21171
|
-
|
|
21172
|
-
|
|
21173
|
-
loggedIn = false;
|
|
21174
|
-
} else loggedIn = true;
|
|
21178
|
+
expired = !!(expiresAt && expiresAt < Date.now());
|
|
21179
|
+
loggedIn = true;
|
|
21175
21180
|
subscriptionType = typeof oauth.subscriptionType === "string" ? oauth.subscriptionType : null;
|
|
21176
21181
|
rateLimitTier = typeof oauth.rateLimitTier === "string" ? oauth.rateLimitTier : null;
|
|
21177
21182
|
}
|
|
@@ -22473,8 +22478,16 @@ const getTrackerStatusRoute = HttpRouter.add("GET", "/api/tracker-status", Effec
|
|
|
22473
22478
|
rally: "Rally"
|
|
22474
22479
|
};
|
|
22475
22480
|
const configured = [];
|
|
22481
|
+
const cfgs = listProjects().map((p) => p.config);
|
|
22482
|
+
const trackerHasProjects = {
|
|
22483
|
+
linear: cfgs.some((c) => !!c.linear_project),
|
|
22484
|
+
github: cfgs.some((c) => !!c.github_repo),
|
|
22485
|
+
rally: cfgs.some((c) => !!c.rally_project),
|
|
22486
|
+
gitlab: cfgs.some((c) => !!c.gitlab_repo)
|
|
22487
|
+
};
|
|
22476
22488
|
const trackersToCheck = [primary, secondary].filter(Boolean);
|
|
22477
22489
|
for (const trackerType of trackersToCheck) {
|
|
22490
|
+
if (trackerHasProjects[trackerType] === false) continue;
|
|
22478
22491
|
const envVar = trackerEnvVars[trackerType] || `${trackerType.toUpperCase()}_API_KEY`;
|
|
22479
22492
|
const hasEnvKey = !!process.env[envVar];
|
|
22480
22493
|
const hasConfigKey = !!(yamlConfig.trackerKeys || {})[trackerType];
|