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
|
tokens_limit: int = 100000
|
||||||
budget_used: float = 0
|
budget_used: float = 0
|
||||||
budget_limit: float = 50
|
budget_limit: float = 50
|
||||||
|
account: str = ""
|
||||||
|
provider: str = ""
|
||||||
|
|
||||||
class AgentUpdate(BaseModel):
|
class AgentUpdate(BaseModel):
|
||||||
status: Literal["online", "offline", "busy"]
|
status: Literal["online", "offline", "busy"]
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ export function AgentCard({ agent }: { agent: any }) {
|
||||||
>
|
>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-start justify-between mb-6">
|
<div className="flex items-start justify-between mb-6">
|
||||||
|
<div>
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<div className={`w-5 h-5 rounded-2xl ${statusColor} flex-shrink-0 ring-4 ring-background`} />
|
<div className={`w-5 h-5 rounded-2xl ${statusColor} flex-shrink-0 ring-4 ring-background`} />
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -26,6 +27,15 @@ export function AgentCard({ agent }: { agent: any }) {
|
||||||
<div className="text-muted-foreground text-sm">{agent.runtime} · {agent.model}</div>
|
<div className="text-muted-foreground text-sm">{agent.runtime} · {agent.model}</div>
|
||||||
</div>
|
</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 className="text-xs uppercase tracking-widest text-emerald-500 font-medium">{agent.status}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ export function AgentGrid() {
|
||||||
tokens_limit: 200000,
|
tokens_limit: 200000,
|
||||||
budget_used: [12.4, 42.5, 5.2, 28.0][i] || 20,
|
budget_used: [12.4, 42.5, 5.2, 28.0][i] || 20,
|
||||||
budget_limit: 100,
|
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)
|
setAgents(mapped)
|
||||||
return mapped
|
return mapped
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue