Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

625 B
Raw Blame
import { describe, expect, it } from 'vitest';

import { buildTokenDistributionRows } from '../components/new-chat/HomeUsageDashboard';

describe('HomeUsageDashboard', () => {
  it('merges token distribution rows with the same display model', () => {
    const rows = buildTokenDistributionRows([
      { model: 'gpt-5.5', tokens: 1_000 },
      { model: 'gpt-5.5', tokens: 2_000 },
      { model: 'claude-sonnet-4-6', tokens: 500 },
      { model: 'unused-zero', tokens: 0 },
    ]);

    expect(rows).toEqual([
      { model: 'gpt-5.5', tokens: 3_000 },
      { model: 'claude-sonnet-4-6', tokens: 500 },
    ]);
  });
});