@koinzhang/paseo-plugin-activity 0.6.0 → 0.8.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/README.md +18 -11
  3. package/client/activity-heatmap.tsx +115 -74
  4. package/client/agent-creations.tsx +100 -90
  5. package/client/attention-pill.tsx +17 -6
  6. package/client/attention-popover.tsx +19 -23
  7. package/client/design-tokens.test.ts +39 -0
  8. package/client/design-tokens.ts +180 -0
  9. package/client/formatted-time.tsx +4 -4
  10. package/client/global-surface.tsx +243 -268
  11. package/client/header-button.ts +136 -0
  12. package/client/hourly-activity-timeline.tsx +153 -103
  13. package/client/panel-visibility.test.ts +25 -0
  14. package/client/panel-visibility.ts +45 -0
  15. package/client/panel.tsx +94 -111
  16. package/client/pill.tsx +1 -1
  17. package/client/provider-dropdown.tsx +134 -0
  18. package/client/provider-filter.test.ts +17 -13
  19. package/client/provider-filter.ts +5 -7
  20. package/client/rank-color.ts +3 -3
  21. package/client/ranking-bars.tsx +294 -0
  22. package/client/sidebar-item.tsx +15 -0
  23. package/client/ui.tsx +351 -0
  24. package/client/usage-popover.tsx +72 -137
  25. package/client/usage-stats.tsx +29 -11
  26. package/client/use-agent-turn-end.ts +2 -1
  27. package/client/use-app-language.ts +17 -0
  28. package/client/web.ts +73 -18
  29. package/client/workspace/agent-row.tsx +28 -28
  30. package/client/workspace/agents-section.tsx +42 -57
  31. package/client/workspace/constants.ts +8 -6
  32. package/client/workspace/display-menu.tsx +6 -5
  33. package/client/workspace/filters.test.ts +1 -1
  34. package/client/workspace/filters.ts +4 -2
  35. package/client/workspace/panel.tsx +96 -104
  36. package/client/workspace/rank-section.tsx +40 -65
  37. package/client/workspace/running-indicator.tsx +1 -1
  38. package/client/workspace/terminals-section.tsx +24 -12
  39. package/index.client.tsx +53 -31
  40. package/index.server.ts +55 -73
  41. package/package.json +3 -3
  42. package/paseo-plugin.json +2 -1
  43. package/server/agents.ts +20 -2
  44. package/server/background-sync.ts +34 -4
  45. package/server/handlers-query.test.ts +27 -1
  46. package/server/handlers.ts +75 -31
  47. package/server/host-types.ts +6 -6
  48. package/server/ingest.test.ts +8 -0
  49. package/server/messages.test.ts +96 -1
  50. package/server/prompt-dedupe.ts +52 -0
  51. package/server/rpc-cache.test.ts +74 -0
  52. package/server/rpc-cache.ts +48 -0
  53. package/server/store.test.ts +122 -0
  54. package/server/store.ts +313 -19
  55. package/server/ttl-cache.ts +3 -0
  56. package/server/turn-ingest.test.ts +180 -0
  57. package/server/turn-ingest.ts +71 -0
  58. package/shared/activity.test.ts +36 -0
  59. package/shared/activity.ts +37 -0
  60. package/shared/classify.test.ts +1 -10
  61. package/shared/classify.ts +3 -10
  62. package/shared/format.ts +10 -7
  63. package/shared/i18n.test.ts +34 -0
  64. package/shared/i18n.ts +363 -0
  65. package/shared/insights.test.ts +120 -81
  66. package/shared/insights.ts +125 -64
  67. package/shared/usage.test.ts +121 -0
  68. package/shared/usage.ts +191 -2
@@ -1,4 +1,4 @@
1
- import { Icon } from "@getpaseo/plugin/client/react-native";
1
+ import { Icon } from "@getpaseo/plugin/client/ui";
2
2
  import { useState, type ReactNode } from "react";
3
3
  import {
4
4
  ActivityIndicator,
@@ -11,6 +11,8 @@ import {
11
11
  } from "react-native";
12
12
  import type { AgentAttentionKind, WorkspaceTheme } from "./constants.ts";
13
13
  import { RunningIndicator } from "./running-indicator.tsx";
14
+ import { CONTROL, ICON_SIZE, PRESS } from "../design-tokens.ts";
15
+ import { useMessages } from "../use-app-language.ts";
14
16
 
15
17
  export type AgentRowStyles = {
16
18
  agentListRow: ViewStyle;
@@ -60,6 +62,7 @@ export function AgentRow({
60
62
  /** Omit to hide the archive control (attention popover). */
61
63
  onArchiveToggle?: () => void;
62
64
  }): ReactNode {
65
+ const m = useMessages();
63
66
  const [hovered, setHovered] = useState(false);
64
67
  // Web: hover-reveal. Native has no hover — keep the action visible.
65
68
  // mouseenter/leave (not nested Pressable hover) so title/action don't flicker.
@@ -81,17 +84,11 @@ export function AgentRow({
81
84
  ? theme.colors.statusSuccess
82
85
  : theme.colors.foregroundMuted;
83
86
  const stateLabels: string[] = [];
84
- if (!archived && running) stateLabels.push("running");
85
- if (subAgentCount > 0) {
86
- stateLabels.push(subAgentCount === 1 ? "1 subagent" : `${subAgentCount} subagents`);
87
- }
88
- if (permissionCount > 0) {
89
- stateLabels.push(
90
- permissionCount === 1 ? "1 pending permission" : `${permissionCount} pending permissions`,
91
- );
92
- }
93
- if (!archived && attentionKind === "error") stateLabels.push("failed");
94
- if (!archived && attentionKind === "finished") stateLabels.push("turn finished, unread");
87
+ if (!archived && running) stateLabels.push(m.workspace.state.running);
88
+ if (subAgentCount > 0) stateLabels.push(m.workspace.state.subagents(subAgentCount));
89
+ if (permissionCount > 0) stateLabels.push(m.workspace.state.permissions(permissionCount));
90
+ if (!archived && attentionKind === "error") stateLabels.push(m.workspace.state.failed);
91
+ if (!archived && attentionKind === "finished") stateLabels.push(m.workspace.state.finished);
95
92
  const stateSuffix = stateLabels.length > 0 ? `, ${stateLabels.join(", ")}` : "";
96
93
  const showRunning = running && !archived;
97
94
  const showSubAgentCount = !showRunning && subAgentCount > 0;
@@ -102,7 +99,7 @@ export function AgentRow({
102
99
  <View style={styles.agentIconWrap}>
103
100
  <Icon
104
101
  name={archived ? "BotOff" : "Bot"}
105
- size={18}
102
+ size={ICON_SIZE.leading}
106
103
  color={botColor}
107
104
  />
108
105
  {showRunning ? (
@@ -111,9 +108,7 @@ export function AgentRow({
111
108
  </View>
112
109
  ) : showSubAgentCount ? (
113
110
  <View
114
- accessibilityLabel={
115
- subAgentCount === 1 ? "1 subagent" : `${subAgentCount} subagents`
116
- }
111
+ accessibilityLabel={m.workspace.state.subagents(subAgentCount)}
117
112
  style={styles.subAgentBadge}
118
113
  >
119
114
  <Text style={styles.subAgentBadgeText}>{subAgentLabel}</Text>
@@ -132,12 +127,10 @@ export function AgentRow({
132
127
  </View>
133
128
  {permissionCount > 0 ? (
134
129
  <View
135
- accessibilityLabel={
136
- permissionCount === 1 ? "1 pending permission" : `${permissionCount} pending permissions`
137
- }
130
+ accessibilityLabel={m.workspace.state.permissions(permissionCount)}
138
131
  style={styles.permissionBadge}
139
132
  >
140
- <Icon name="ShieldAlert" size={12} color={theme.colors.statusWarning} />
133
+ <Icon name="ShieldAlert" size={ICON_SIZE.badge} color={theme.colors.statusWarning} />
141
134
  {permissionCount > 1 ? (
142
135
  <Text style={styles.permissionBadgeText}>{permissionCount}</Text>
143
136
  ) : null}
@@ -146,24 +139,28 @@ export function AgentRow({
146
139
  {onArchiveToggle ? (
147
140
  <Pressable
148
141
  accessibilityRole="button"
149
- accessibilityLabel={archived ? `Unarchive ${label}` : `Archive ${label}`}
142
+ accessibilityLabel={archived ? m.workspace.unarchive(label) : m.workspace.archive(label)}
150
143
  accessibilityState={{ disabled: actionDisabled }}
151
144
  disabled={actionDisabled || !showAction}
152
- hitSlop={8}
145
+ hitSlop={CONTROL.hitSlop}
153
146
  onPress={onArchiveToggle}
154
147
  pointerEvents={showAction ? "auto" : "none"}
155
- style={[styles.titleAction, { opacity: showAction ? 1 : 0 }]}
148
+ style={({ pressed }) => [
149
+ styles.titleAction,
150
+ { opacity: showAction ? 1 : 0 },
151
+ pressed ? { opacity: PRESS.opacity, transform: [{ scale: PRESS.scale }] } : null,
152
+ ]}
156
153
  >
157
154
  {busy ? (
158
155
  <ActivityIndicator
159
- size={14}
156
+ size={ICON_SIZE.inline}
160
157
  color={theme.colors.foregroundMuted}
161
- style={{ width: 14, height: 14 }}
158
+ style={{ width: ICON_SIZE.inline, height: ICON_SIZE.inline }}
162
159
  />
163
160
  ) : (
164
161
  <Icon
165
162
  name={archived ? "ArchiveRestore" : "Archive"}
166
- size={14}
163
+ size={ICON_SIZE.inline}
167
164
  color={theme.colors.foregroundMuted}
168
165
  />
169
166
  )}
@@ -176,9 +173,12 @@ export function AgentRow({
176
173
  return (
177
174
  <Pressable
178
175
  accessibilityRole="link"
179
- accessibilityLabel={`Open conversation ${label}${stateSuffix}`}
176
+ accessibilityLabel={`${m.common.openConversation(label)}${stateSuffix}`}
180
177
  onPress={onOpen}
181
- style={styles.agentListRow}
178
+ style={({ pressed }) => [
179
+ styles.agentListRow,
180
+ pressed ? { backgroundColor: theme.colors.surface2 } : null,
181
+ ]}
182
182
  {...hoverProps}
183
183
  >
184
184
  {body}
@@ -1,9 +1,8 @@
1
- import { Icon, TextInput } from "@getpaseo/plugin/client/react-native";
1
+ import { Icon, TextInput } from "@getpaseo/plugin/client/ui";
2
2
  import { useEffect, useMemo, useRef, useState, type ReactNode, type RefObject } from "react";
3
3
  import {
4
4
  Animated,
5
5
  Easing,
6
- Pressable,
7
6
  Text,
8
7
  View,
9
8
  type TextStyle,
@@ -18,6 +17,7 @@ import {
18
17
  countSubAgentsByParent,
19
18
  isAgentRunning,
20
19
  SEARCH_ANIM_MS,
20
+ SEARCH_CLOSE_ANIM_MS,
21
21
  SEARCH_TITLE_GAP,
22
22
  type AgentGroup,
23
23
  type AgentShowField,
@@ -26,6 +26,9 @@ import {
26
26
  } from "./constants.ts";
27
27
  import { formatAgentMeta } from "./filters.ts";
28
28
  import type { WorkspaceTheme } from "./constants.ts";
29
+ import { ICON_SIZE } from "../design-tokens.ts";
30
+ import { IconButton } from "../ui.tsx";
31
+ import { useMessages } from "../use-app-language.ts";
29
32
 
30
33
  export type AgentsSectionStyles = AgentRowStyles & {
31
34
  agentsSection: ViewStyle;
@@ -160,6 +163,7 @@ export function AgentsSection({
160
163
  /** Bump when workspace changes to collapse search. */
161
164
  resetKey: string;
162
165
  }): ReactNode {
166
+ const m = useMessages();
163
167
  const [agentSearchOpen, setAgentSearchOpen] = useState(false);
164
168
  const [searchSlotWidth, setSearchSlotWidth] = useState(0);
165
169
  const [pageIndex, setPageIndex] = useState(0);
@@ -198,8 +202,8 @@ export function AgentsSection({
198
202
  if (!agentSearchOpen) return;
199
203
  Animated.timing(searchProgress, {
200
204
  toValue: 0,
201
- duration: SEARCH_ANIM_MS,
202
- easing: Easing.in(Easing.cubic),
205
+ duration: SEARCH_CLOSE_ANIM_MS,
206
+ easing: Easing.out(Easing.cubic),
203
207
  useNativeDriver: false,
204
208
  }).start(({ finished }) => {
205
209
  if (!finished) return;
@@ -225,8 +229,8 @@ export function AgentsSection({
225
229
  else active.push(item);
226
230
  }
227
231
  const groups: Array<[string, AgentUsageItem[]]> = [];
228
- if (active.length > 0) groups.push(["Active", active]);
229
- if (archived.length > 0) groups.push(["Archived", archived]);
232
+ if (active.length > 0) groups.push([m.workspace.options.status.active, active]);
233
+ if (archived.length > 0) groups.push([m.workspace.options.status.archived, archived]);
230
234
  return groups;
231
235
  }
232
236
  const map = new Map<string, AgentUsageItem[]>();
@@ -238,7 +242,7 @@ export function AgentsSection({
238
242
  return [...map.entries()].sort((a, b) =>
239
243
  providerLabel(a[0]).localeCompare(providerLabel(b[0])),
240
244
  );
241
- }, [agentGroup, pageItems]);
245
+ }, [agentGroup, pageItems, m]);
242
246
 
243
247
  const subAgentCounts = useMemo(
244
248
  () => countSubAgentsByParent(agentItems, statusFilters),
@@ -270,7 +274,7 @@ export function AgentsSection({
270
274
  <View style={styles.agentsSection}>
271
275
  <View style={styles.agentsHeaderWrap}>
272
276
  <View style={styles.agentsHeaderRow}>
273
- <Text style={styles.sectionTitle}>Agents</Text>
277
+ <Text style={styles.sectionTitle}>{m.common.agents}</Text>
274
278
  <View
275
279
  style={styles.agentsHeaderSearchSlot}
276
280
  onLayout={(event) => {
@@ -295,51 +299,41 @@ export function AgentsSection({
295
299
  },
296
300
  ]}
297
301
  >
298
- <Icon name="Search" size={14} color={theme.colors.foregroundMuted} />
302
+ <Icon name="Search" size={ICON_SIZE.inline} color={theme.colors.foregroundMuted} />
299
303
  <TextInput
300
304
  ref={searchInputRef as never}
301
305
  value={searchQuery}
302
306
  onChangeText={onSearchQueryChange}
303
- placeholder="Search agents"
307
+ placeholder={m.workspace.searchPlaceholder}
304
308
  placeholderTextColor={theme.colors.foregroundMuted}
305
309
  autoCapitalize="none"
306
310
  autoCorrect={false}
307
311
  returnKeyType="search"
308
312
  editable={agentSearchOpen}
309
313
  style={styles.searchInput}
310
- accessibilityLabel="Search agents by title"
314
+ accessibilityLabel={m.workspace.searchLabel}
311
315
  />
312
316
  </Animated.View>
313
317
  </View>
314
318
  <View style={styles.headerActions}>
315
- <Pressable
316
- accessibilityRole="button"
317
- accessibilityLabel={agentSearchOpen ? "Close agent search" : "Search agents"}
318
- accessibilityState={{ expanded: agentSearchOpen }}
319
- hitSlop={8}
319
+ <IconButton
320
+ icon={agentSearchOpen ? "X" : "Search"}
321
+ label={agentSearchOpen ? m.workspace.closeSearch : m.workspace.openSearch}
322
+ expanded={agentSearchOpen}
320
323
  onPress={() => {
321
324
  if (agentSearchOpen) closeAgentSearch();
322
325
  else openAgentSearch();
323
326
  }}
324
- style={styles.titleAction}
325
- >
326
- <Icon
327
- name={agentSearchOpen ? "X" : "Search"}
328
- size={14}
329
- color={theme.colors.foregroundMuted}
330
- />
331
- </Pressable>
327
+ color={theme.colors.foregroundMuted}
328
+ />
332
329
  <View ref={triggerRef} collapsable={false}>
333
- <Pressable
334
- accessibilityRole="button"
335
- accessibilityLabel="Agent display options"
336
- accessibilityState={{ expanded: menuOpen }}
337
- hitSlop={8}
330
+ <IconButton
331
+ icon="Settings2"
332
+ label={m.workspace.displayOptions}
333
+ expanded={menuOpen}
338
334
  onPress={onToggleMenu}
339
- style={styles.titleAction}
340
- >
341
- <Icon name="Settings2" size={14} color={theme.colors.foregroundMuted} />
342
- </Pressable>
335
+ color={theme.colors.foregroundMuted}
336
+ />
343
337
  </View>
344
338
  </View>
345
339
  </View>
@@ -357,39 +351,30 @@ export function AgentsSection({
357
351
  : pageItems.map(renderAgentRow)}
358
352
  {visibleAgentItems.length === 0 ? (
359
353
  <Text style={styles.empty}>
360
- {statusFiltersEmpty ? "No filters selected" : "No matching agents"}
354
+ {statusFiltersEmpty ? m.workspace.noFilters : m.workspace.noMatches}
361
355
  </Text>
362
356
  ) : null}
363
357
  {showPager ? (
364
358
  <View style={styles.pagerRow}>
365
- <Pressable
366
- accessibilityRole="button"
367
- accessibilityLabel="Previous agents page"
368
- accessibilityState={{ disabled: safePage === 0 }}
369
- disabled={safePage === 0}
370
- hitSlop={8}
359
+ <IconButton
360
+ icon="ChevronLeft"
361
+ label={m.workspace.previousPage}
371
362
  onPress={() => setPageIndex((p) => Math.max(0, p - 1))}
372
- style={[styles.pagerButton, safePage === 0 ? styles.pagerButtonDisabled : null]}
373
- >
374
- <Icon name="ChevronLeft" size={14} color={theme.colors.foregroundMuted} />
375
- </Pressable>
363
+ color={theme.colors.foregroundMuted}
364
+ disabled={safePage === 0}
365
+ style={safePage === 0 ? styles.pagerButtonDisabled : undefined}
366
+ />
376
367
  <Text style={styles.pagerLabel}>
377
368
  {safePage + 1} / {pageCount}
378
369
  </Text>
379
- <Pressable
380
- accessibilityRole="button"
381
- accessibilityLabel="Next agents page"
382
- accessibilityState={{ disabled: safePage >= pageCount - 1 }}
383
- disabled={safePage >= pageCount - 1}
384
- hitSlop={8}
370
+ <IconButton
371
+ icon="ChevronRight"
372
+ label={m.workspace.nextPage}
385
373
  onPress={() => setPageIndex((p) => Math.min(pageCount - 1, p + 1))}
386
- style={[
387
- styles.pagerButton,
388
- safePage >= pageCount - 1 ? styles.pagerButtonDisabled : null,
389
- ]}
390
- >
391
- <Icon name="ChevronRight" size={14} color={theme.colors.foregroundMuted} />
392
- </Pressable>
374
+ color={theme.colors.foregroundMuted}
375
+ disabled={safePage >= pageCount - 1}
376
+ style={safePage >= pageCount - 1 ? styles.pagerButtonDisabled : undefined}
377
+ />
393
378
  </View>
394
379
  ) : null}
395
380
  </View>
@@ -81,11 +81,12 @@ export type MenuOption = { id: string; label: string; icon: string };
81
81
  /** Agents header row / search pill height — keep fixed to avoid layout jump. */
82
82
  export const AGENT_HEADER_HEIGHT = 28;
83
83
  export const SEARCH_ANIM_MS = 220;
84
+ /** Closing stays faster than opening (084). */
85
+ export const SEARCH_CLOSE_ANIM_MS = 160;
84
86
  export const SEARCH_TITLE_GAP = 8;
85
87
  /** Host MenuFlyout overlap between root surface and submenu (`SUBMENU_OVERLAP`). */
86
88
  export const MENU_SUBMENU_OVERLAP = 5;
87
89
  export const MENU_WIDTH = 232;
88
- export const MENU_OPTION_ICON_SIZE = 14;
89
90
  /** Approx list-row height (padding + title/meta) for stable Skills/MCP section size. */
90
91
  export const RANK_ROW_ESTIMATE = 42;
91
92
  /** Visible agents per page in Explorer; pager hidden when pageCount ≤ 1. */
@@ -131,11 +132,12 @@ export const LIFECYCLE_FILTER_OPTIONS: ReadonlyArray<
131
132
  { id: "closed", label: "Closed", icon: "CircleOff" },
132
133
  ];
133
134
 
134
- export function optionLabel<T extends string>(
135
- options: ReadonlyArray<{ id: T; label: string }>,
136
- id: T,
137
- ): string {
138
- return options.find((option) => option.id === id)?.label ?? id;
135
+ /** Swap option labels for localized copy (066); ids / icons unchanged. */
136
+ export function localizeOptions<T extends string>(
137
+ options: ReadonlyArray<MenuOption & { id: T }>,
138
+ labels: Record<T, string>,
139
+ ): ReadonlyArray<MenuOption & { id: T }> {
140
+ return options.map((option) => ({ ...option, label: labels[option.id] ?? option.label }));
139
141
  }
140
142
 
141
143
  /** 0 = attention-worthy, then running / idle / initializing / closed (unknown). */
@@ -1,7 +1,8 @@
1
- import { Icon } from "@getpaseo/plugin/client/react-native";
1
+ import { Icon } from "@getpaseo/plugin/client/ui";
2
2
  import type { ReactNode } from "react";
3
3
  import { Pressable, Text, View, type TextStyle, type ViewStyle } from "react-native";
4
- import { MENU_OPTION_ICON_SIZE, type MenuOption } from "./constants.ts";
4
+ import { type MenuOption } from "./constants.ts";
5
+ import { ICON_SIZE } from "../design-tokens.ts";
5
6
 
6
7
  export type MenuStyles = {
7
8
  menuPage: ViewStyle;
@@ -57,7 +58,7 @@ export function MenuSubTrigger({
57
58
  {value}
58
59
  </Text>
59
60
  ) : null}
60
- <Icon name="ChevronRight" size={14} color={chevronColor} />
61
+ <Icon name="ChevronRight" size={ICON_SIZE.inline} color={chevronColor} />
61
62
  </View>
62
63
  </Pressable>
63
64
  </View>
@@ -98,14 +99,14 @@ export function MenuOptionList({
98
99
  ]}
99
100
  >
100
101
  <View style={styles.menuLeadingSlot}>
101
- <Icon name={option.icon} size={MENU_OPTION_ICON_SIZE} color={iconColor} />
102
+ <Icon name={option.icon} size={ICON_SIZE.inline} color={iconColor} />
102
103
  </View>
103
104
  <Text style={styles.menuOptionLabel} numberOfLines={1}>
104
105
  {option.label}
105
106
  </Text>
106
107
  {selected ? (
107
108
  <View style={styles.menuTrailing}>
108
- <Icon name="Check" size={16} color={checkColor} />
109
+ <Icon name="Check" size={ICON_SIZE.action} color={checkColor} />
109
110
  </View>
110
111
  ) : null}
111
112
  </Pressable>
@@ -42,7 +42,7 @@ test("formatAgentMeta joins selected fields; prompt last", () => {
42
42
  assert.equal(formatAgentMeta(item, fields(), byId, "en-US"), null);
43
43
  assert.equal(
44
44
  formatAgentMeta(item, fields("messages", "prompt"), byId, "en-US", "ship it"),
45
- "5 messages · ship it",
45
+ "5 prompts · ship it",
46
46
  );
47
47
  assert.equal(
48
48
  formatAgentMeta(item, fields("prompt"), byId, "en-US", null),
@@ -1,5 +1,6 @@
1
1
  import { matchesAgentTitleSearch } from "../../shared/agent-title-search.ts";
2
2
  import { formatActivityTime } from "../../shared/format.ts";
3
+ import { messagesFor } from "../../shared/i18n.ts";
3
4
  import { providerLabel, type AgentUsageItem } from "../../shared/usage.ts";
4
5
  import {
5
6
  type AgentShowField,
@@ -23,9 +24,10 @@ export function formatAgentMeta(
23
24
  promptPreview?: string | null,
24
25
  ): string | null {
25
26
  const parts: string[] = [];
27
+ const { units } = messagesFor(locale);
26
28
  if (showFields.has("provider")) parts.push(providerLabel(item.provider));
27
- if (showFields.has("calls")) parts.push(`${item.callCount} calls`);
28
- if (showFields.has("messages")) parts.push(`${item.messageCount} messages`);
29
+ if (showFields.has("calls")) parts.push(units.calls(item.callCount));
30
+ if (showFields.has("messages")) parts.push(units.prompts(item.messageCount));
29
31
  if (showFields.has("updated")) {
30
32
  const at = agentUpdatedAt(item, byId);
31
33
  if (at) parts.push(formatActivityTime(at, locale));