@koinzhang/paseo-plugin-activity 0.6.0 → 0.7.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 (62) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/README.md +14 -7
  3. package/client/activity-heatmap.tsx +115 -74
  4. package/client/agent-creations.tsx +97 -88
  5. package/client/attention-pill.tsx +16 -5
  6. package/client/attention-popover.tsx +19 -23
  7. package/client/design-tokens.test.ts +39 -0
  8. package/client/design-tokens.ts +168 -0
  9. package/client/formatted-time.tsx +4 -4
  10. package/client/global-surface.tsx +236 -268
  11. package/client/header-button.ts +136 -0
  12. package/client/hourly-activity-timeline.tsx +136 -103
  13. package/client/panel-visibility.test.ts +25 -0
  14. package/client/panel-visibility.ts +45 -0
  15. package/client/panel.tsx +83 -108
  16. package/client/provider-dropdown.tsx +131 -0
  17. package/client/provider-filter.test.ts +17 -13
  18. package/client/provider-filter.ts +5 -7
  19. package/client/rank-color.ts +3 -3
  20. package/client/ranking-bars.tsx +291 -0
  21. package/client/ui.tsx +339 -0
  22. package/client/usage-popover.tsx +62 -134
  23. package/client/usage-stats.tsx +29 -11
  24. package/client/use-agent-turn-end.ts +2 -1
  25. package/client/use-app-language.ts +17 -0
  26. package/client/web.ts +73 -18
  27. package/client/workspace/agent-row.tsx +18 -25
  28. package/client/workspace/agents-section.tsx +23 -20
  29. package/client/workspace/constants.ts +6 -6
  30. package/client/workspace/display-menu.tsx +5 -4
  31. package/client/workspace/filters.test.ts +1 -1
  32. package/client/workspace/filters.ts +4 -2
  33. package/client/workspace/panel.tsx +89 -103
  34. package/client/workspace/rank-section.tsx +36 -62
  35. package/client/workspace/terminals-section.tsx +13 -9
  36. package/index.client.tsx +40 -20
  37. package/index.server.ts +53 -51
  38. package/package.json +2 -2
  39. package/paseo-plugin.json +2 -1
  40. package/server/agents.ts +20 -2
  41. package/server/background-sync.ts +34 -4
  42. package/server/handlers-query.test.ts +27 -1
  43. package/server/handlers.ts +75 -31
  44. package/server/ingest.test.ts +8 -0
  45. package/server/messages.test.ts +96 -1
  46. package/server/prompt-dedupe.ts +52 -0
  47. package/server/rpc-cache.test.ts +74 -0
  48. package/server/rpc-cache.ts +48 -0
  49. package/server/store.test.ts +122 -0
  50. package/server/store.ts +313 -19
  51. package/server/ttl-cache.ts +3 -0
  52. package/shared/activity.test.ts +36 -0
  53. package/shared/activity.ts +37 -0
  54. package/shared/classify.test.ts +1 -10
  55. package/shared/classify.ts +3 -10
  56. package/shared/format.ts +10 -7
  57. package/shared/i18n.test.ts +34 -0
  58. package/shared/i18n.ts +363 -0
  59. package/shared/insights.test.ts +120 -81
  60. package/shared/insights.ts +124 -63
  61. package/shared/usage.test.ts +121 -0
  62. package/shared/usage.ts +191 -2
@@ -10,14 +10,14 @@ import { useAppLanguage } from "./use-app-language.ts";
10
10
  export function FormattedTime({
11
11
  iso,
12
12
  style,
13
- prefix,
13
+ format,
14
14
  }: {
15
15
  iso: string | null | undefined;
16
16
  style?: TextStyle;
17
- /** e.g. `"Last "` — concatenated before the stamp */
18
- prefix?: string;
17
+ /** Wraps the stamp in localized copy, e.g. `messages.common.lastUsed`. */
18
+ format?: (stamp: string) => string;
19
19
  }): ReactNode {
20
20
  const locale = useAppLanguage();
21
21
  const stamp = formatActivityTime(iso, locale);
22
- return <Text style={style}>{prefix ? `${prefix}${stamp}` : stamp}</Text>;
22
+ return <Text style={style}>{format ? format(stamp) : stamp}</Text>;
23
23
  }