@sentry/junior-dashboard 0.231.0 → 0.233.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.
@@ -242,6 +242,8 @@ export function transcriptMessagesFromEvents(
242
242
  }
243
243
 
244
244
  if (data.type === "assistant_message") {
245
+ // Calls with no reasoning still carry usage in the event log, not a chat bubble.
246
+ if (data.parts.length === 0) continue;
245
247
  messages.push(
246
248
  eventMessage(
247
249
  event,
@@ -73,7 +73,7 @@ export function transcriptJuniorMessageVersion(
73
73
  data.redacted ? "redacted" : (data.text?.length ?? 0),
74
74
  ].join(":");
75
75
  }
76
- if (data.type === "assistant_message") {
76
+ if (data.type === "assistant_message" && data.parts.length > 0) {
77
77
  const lastPart = data.parts.at(-1);
78
78
  return [
79
79
  event.seq,
@@ -117,7 +117,7 @@ function changesVisibleTranscript(event: ConversationReportEvent): boolean {
117
117
  if (data.type === "turn_lifecycle") return data.state === "failed";
118
118
  return (
119
119
  data.type === "message" ||
120
- data.type === "assistant_message" ||
120
+ (data.type === "assistant_message" && data.parts.length > 0) ||
121
121
  data.type === "tool_calls" ||
122
122
  data.type === "subagent" ||
123
123
  data.type === "structured_event" ||
@@ -162,8 +162,9 @@ function reportEvent(
162
162
  seq: number,
163
163
  createdAt: string,
164
164
  data: ConversationReportEventData,
165
+ metadata?: Pick<ConversationReportEvent, "model" | "modelCall">,
165
166
  ): ConversationReportEvent {
166
- return { seq, createdAt, data };
167
+ return { seq, createdAt, data, ...metadata };
167
168
  }
168
169
 
169
170
  type DetailOptions = Omit<
@@ -453,38 +454,81 @@ function activeConversation(nowMs: number): ConversationDetailReport {
453
454
  reasoningLevel: "high",
454
455
  confidence: 0.93,
455
456
  source: "router",
457
+ costUsd: 0.0012,
456
458
  }),
457
- reportEvent(4, iso(Date.parse(startedAt), 10_000), {
458
- type: "tool_calls",
459
- calls: [
460
- {
461
- toolCallId: "active-search",
462
- name: "webSearch",
463
- status: "running",
459
+ reportEvent(
460
+ 4,
461
+ iso(Date.parse(startedAt), 10_000),
462
+ {
463
+ type: "tool_calls",
464
+ calls: [
465
+ {
466
+ toolCallId: "active-search",
467
+ name: "webSearch",
468
+ status: "running",
469
+ },
470
+ ],
471
+ },
472
+ {
473
+ model: {
474
+ modelId: "openai/gpt-5.6-sol",
475
+ modelProfile: "handoff",
476
+ reasoningLevel: "high",
464
477
  },
465
- ],
466
- }),
467
- reportEvent(5, iso(Date.parse(startedAt), 14_000), {
468
- type: "tool_calls",
469
- calls: [
470
- {
471
- toolCallId: "active-search",
472
- name: "webSearch",
473
- status: "completed",
474
- startedSeq: 4,
475
- startedAt: iso(Date.parse(startedAt), 10_000),
476
- input: { query: "checkout latency last deployment" },
477
- output: {
478
- results: [
479
- {
480
- title: "payments-v42 deploy notes",
481
- url: "https://docs.sentry.io",
482
- },
483
- ],
478
+ modelCall: {
479
+ provider: "vercel-ai-gateway",
480
+ api: "openai-responses",
481
+ stopReason: "toolUse",
482
+ usage: {
483
+ inputTokens: 12500,
484
+ outputTokens: 800,
485
+ cachedInputTokens: 32000,
486
+ cacheCreationTokens: 2000,
487
+ reasoningTokens: 600,
488
+ totalTokens: 47300,
489
+ cost: {
490
+ input: 0.025,
491
+ output: 0.008,
492
+ cacheRead: 0.0064,
493
+ cacheWrite: 0.005,
494
+ total: 0.0444,
495
+ },
484
496
  },
485
497
  },
486
- ],
487
- }),
498
+ },
499
+ ),
500
+ reportEvent(
501
+ 5,
502
+ iso(Date.parse(startedAt), 14_000),
503
+ {
504
+ type: "tool_calls",
505
+ calls: [
506
+ {
507
+ toolCallId: "active-search",
508
+ name: "webSearch",
509
+ status: "completed",
510
+ startedSeq: 4,
511
+ startedAt: iso(Date.parse(startedAt), 10_000),
512
+ input: { query: "checkout latency last deployment" },
513
+ output: {
514
+ results: [
515
+ {
516
+ title: "payments-v42 deploy notes",
517
+ url: "https://docs.sentry.io",
518
+ },
519
+ ],
520
+ },
521
+ },
522
+ ],
523
+ },
524
+ {
525
+ model: {
526
+ modelId: "openai/gpt-5.6-sol",
527
+ modelProfile: "handoff",
528
+ reasoningLevel: "high",
529
+ },
530
+ },
531
+ ),
488
532
  // Mixed markdown keeps font/legibility QA honest for long assistant replies.
489
533
  reportEvent(6, iso(Date.parse(startedAt), 22_000), {
490
534
  type: "message",