Research Agents: Lets users define research agents that answer chat questions from SEC filings, uploaded documents, and the web, with every figure cited.
| 1 | import type { ReactElement } from 'react' |
| 2 | |
| 3 | /** A bar filled to `part` of `whole`. */ |
| 4 | export function Meter({ part, whole }: { part: number; whole: number }): ReactElement { |
| 5 | return ( |
| 6 | <div className="ag-meter"> |
| 7 | <div |
| 8 | className="ag-meter-fill" |
| 9 | style={{ width: `${Math.min(100, Math.round((100 * part) / Math.max(whole, 1)))}%` }} |
| 10 | /> |
| 11 | </div> |
| 12 | ) |
| 13 | } |