MCPcopy Create free account
hub / github.com/anus-dev/ANUS / handleUpdate

Function handleUpdate

packages/cli/src/ui/contexts/SessionContext.tsx:78–90  ·  view source on GitHub ↗
({
      metrics,
      lastPromptTokenCount,
    }: {
      metrics: SessionMetrics;
      lastPromptTokenCount: number;
    })

Source from the content-addressed store, hash-verified

76
77 useEffect(() => {
78 const handleUpdate = ({
79 metrics,
80 lastPromptTokenCount,
81 }: {
82 metrics: SessionMetrics;
83 lastPromptTokenCount: number;
84 }) => {
85 setStats((prevState) => ({
86 ...prevState,
87 metrics,
88 lastPromptTokenCount,
89 }));
90 };
91
92 uiTelemetryService.on('update', handleUpdate);
93 // Set initial state

Callers 1

SessionStatsProviderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected