@f5xc-salesdemos/xcsh-stats 19.7.0 → 19.9.0
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/package.json +3 -3
- package/src/aggregator.ts +1 -1
- package/src/parser.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5xc-salesdemos/xcsh-stats",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.9.0",
|
|
5
5
|
"description": "Local observability dashboard for pi AI usage statistics",
|
|
6
6
|
"homepage": "https://github.com/f5xc-salesdemos/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"fmt": "biome format --write ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@f5xc-salesdemos/pi-ai": "19.
|
|
41
|
-
"@f5xc-salesdemos/pi-utils": "19.
|
|
40
|
+
"@f5xc-salesdemos/pi-ai": "19.9.0",
|
|
41
|
+
"@f5xc-salesdemos/pi-utils": "19.9.0",
|
|
42
42
|
"@tailwindcss/node": "^4.2",
|
|
43
43
|
"chart.js": "^4.5",
|
|
44
44
|
"date-fns": "~4.1.0",
|
package/src/aggregator.ts
CHANGED
|
@@ -107,7 +107,7 @@ export async function getRequestDetails(id: number): Promise<RequestDetails | nu
|
|
|
107
107
|
if (!msg) return null;
|
|
108
108
|
|
|
109
109
|
const entry = await getSessionEntry(msg.sessionFile, msg.entryId);
|
|
110
|
-
if (
|
|
110
|
+
if (entry?.type !== "message") return null;
|
|
111
111
|
|
|
112
112
|
// TODO: Get parent/context messages?
|
|
113
113
|
// For now we return the single entry which contains the assistant response.
|
package/src/parser.ts
CHANGED
|
@@ -31,7 +31,7 @@ function isAssistantMessage(entry: SessionEntry): entry is SessionMessageEntry {
|
|
|
31
31
|
*/
|
|
32
32
|
function extractStats(sessionFile: string, folder: string, entry: SessionMessageEntry): MessageStats | null {
|
|
33
33
|
const msg = entry.message as AssistantMessage;
|
|
34
|
-
if (
|
|
34
|
+
if (msg?.role !== "assistant") return null;
|
|
35
35
|
|
|
36
36
|
return {
|
|
37
37
|
sessionFile,
|