graphlit-client 1.0.20250613006 → 1.0.20250613007

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.
@@ -451,6 +451,13 @@ export class UIEventAdapter {
451
451
  const avgDelay = this.tokenDelays.reduce((a, b) => a + b, 0) / this.tokenDelays.length;
452
452
  metrics.avgTokenDelay = Math.round(avgDelay);
453
453
  }
454
+ // Calculate streaming throughput (excludes TTFT)
455
+ if (this.firstTokenTime > 0 && this.streamStartTime > 0) {
456
+ const streamingTime = now - this.firstTokenTime;
457
+ if (streamingTime > 0) {
458
+ metrics.streamingThroughput = Math.round((this.currentMessage.length / streamingTime) * 1000);
459
+ }
460
+ }
454
461
  this.emitUIEvent({
455
462
  type: "message_update",
456
463
  message,
@@ -23,6 +23,7 @@ export type AgentStreamEvent = {
23
23
  conversationDuration: number;
24
24
  tokenCount?: number;
25
25
  avgTokenDelay?: number;
26
+ streamingThroughput?: number;
26
27
  };
27
28
  } | {
28
29
  type: "tool_update";
@@ -40,6 +41,7 @@ export type AgentStreamEvent = {
40
41
  tokenCount?: number;
41
42
  llmTokens?: number;
42
43
  avgTokenDelay?: number;
44
+ streamingThroughput?: number;
43
45
  };
44
46
  } | {
45
47
  type: "error";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20250613006",
3
+ "version": "1.0.20250613007",
4
4
  "description": "Graphlit API Client for TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/client.js",