Phase 6.2: account info на AgentCard (provider + account)
This commit is contained in:
parent
bf0f977d9d
commit
e3f94d124e
3 changed files with 19 additions and 5 deletions
|
|
@ -14,6 +14,8 @@ class Agent(BaseModel):
|
|||
tokens_limit: int = 100000
|
||||
budget_used: float = 0
|
||||
budget_limit: float = 50
|
||||
account: str = ""
|
||||
provider: str = ""
|
||||
|
||||
class AgentUpdate(BaseModel):
|
||||
status: Literal["online", "offline", "busy"]
|
||||
|
|
|
|||
|
|
@ -19,12 +19,22 @@ export function AgentCard({ agent }: { agent: any }) {
|
|||
>
|
||||
{/* Header */}
|
||||
<div className="flex items-start justify-between mb-6">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className={`w-5 h-5 rounded-2xl ${statusColor} flex-shrink-0 ring-4 ring-background`} />
|
||||
<div>
|
||||
<div className="font-semibold text-xl tracking-tight">{agent.name}</div>
|
||||
<div className="text-muted-foreground text-sm">{agent.runtime} · {agent.model}</div>
|
||||
<div>
|
||||
<div className="flex items-center gap-4">
|
||||
<div className={`w-5 h-5 rounded-2xl ${statusColor} flex-shrink-0 ring-4 ring-background`} />
|
||||
<div>
|
||||
<div className="font-semibold text-xl tracking-tight">{agent.name}</div>
|
||||
<div className="text-muted-foreground text-sm">{agent.runtime} · {agent.model}</div>
|
||||
</div>
|
||||
</div>
|
||||
{agent.provider && (
|
||||
<div className="mt-3 flex items-center gap-2 text-xs">
|
||||
<div className="px-2.5 py-0.5 bg-secondary rounded-full text-muted-foreground">
|
||||
{agent.provider}
|
||||
</div>
|
||||
<div className="text-muted-foreground font-mono">{agent.account}</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="text-xs uppercase tracking-widest text-emerald-500 font-medium">{agent.status}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ export function AgentGrid() {
|
|||
tokens_limit: 200000,
|
||||
budget_used: [12.4, 42.5, 5.2, 28.0][i] || 20,
|
||||
budget_limit: 100,
|
||||
account: ['kimi-k2.7-main', 'kimi-k2.7-fast', 'gemini-3-flash', 'deepseek-v4-pro'][i] || '?',
|
||||
provider: ['OpenCode Go', 'OpenCode Go', 'Google', 'NVIDIA'][i] || '?',
|
||||
}))
|
||||
setAgents(mapped)
|
||||
return mapped
|
||||
|
|
|
|||
Loading…
Reference in a new issue