|
| 1 | +<script setup lang="ts"> |
| 2 | +import type { ProgressGroupItem } from '@nuxt/ui' |
| 3 | +
|
| 4 | +const max = 128 |
| 5 | +
|
| 6 | +const items: ProgressGroupItem[] = [ |
| 7 | + { label: 'System prompt', value: 4.2, color: 'var(--color-neutral-400)' }, |
| 8 | + { label: 'Tool definitions', value: 18.4, color: 'var(--color-violet-400)' }, |
| 9 | + { label: 'Rules', value: 12.8, color: 'var(--color-green-400)' }, |
| 10 | + { label: 'Skills', value: 7.1, color: 'var(--color-amber-400)' }, |
| 11 | + { label: 'MCP & dynamic tools', value: 17.1, color: 'var(--color-rose-400)' }, |
| 12 | + { label: 'Subagent definitions', value: 5.5, color: 'var(--color-sky-400)' }, |
| 13 | + { label: 'Conversation', value: 24.6, color: 'var(--color-orange-400)' } |
| 14 | +] |
| 15 | +
|
| 16 | +const used = items.reduce((total, item) => total + (item.value ?? 0), 0) |
| 17 | +</script> |
| 18 | + |
| 19 | +<template> |
| 20 | + <UProgressGroup :items="items" :max="max" status class="w-96" :ui="{ status: 'w-full justify-between' }"> |
| 21 | + <template #status="{ percent }"> |
| 22 | + <p>{{ percent }}% Full</p> |
| 23 | + <p class="text-muted"> |
| 24 | + ~{{ used.toFixed(1) }}K / {{ max }}K Tokens |
| 25 | + </p> |
| 26 | + </template> |
| 27 | + |
| 28 | + <template #item-trailing="{ item }"> |
| 29 | + {{ item.value }}K |
| 30 | + </template> |
| 31 | + </UProgressGroup> |
| 32 | +</template> |
0 commit comments