wip: context-meter + model-label UI and provider/inference tweaks
Checkpoint of in-flight work so the orchestrator branch can rebase onto a clean main: ContextBar → ContextMeter, model-label helper, model/agent picker + provider-snapshot/registry changes, inference payload + message-columns. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { formatAgo } from '@/lib/format';
|
||||
import { Check, ChevronDown } from 'lucide-react';
|
||||
import { Bot, Check, ChevronDown } from 'lucide-react';
|
||||
import { toast } from 'sonner';
|
||||
import { api } from '@/api/client';
|
||||
import type { Agent, AgentParseError, ToolCostStat } from '@/api/types';
|
||||
@@ -90,11 +90,14 @@ export function AgentPicker({ projectId, value, onChange }: Props) {
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className="text-xs text-muted-foreground hover:text-foreground flex items-center gap-1 px-1.5 py-0.5 rounded hover:bg-muted/60"
|
||||
title={selectedAgent?.description ?? undefined}
|
||||
className="inline-flex items-center gap-1.5 rounded-full border border-border px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground max-md:min-h-[36px] max-md:min-w-[36px]"
|
||||
title={selectedAgent?.name ? `Agent: ${selectedAgent.name}` : 'No agent'}
|
||||
aria-label={`Agent: ${triggerLabel}`}
|
||||
>
|
||||
<span className="truncate max-w-[160px]">{triggerLabel}</span>
|
||||
<ChevronDown className="size-3 opacity-70" />
|
||||
<Bot className="size-3.5 shrink-0" />
|
||||
{/* Mobile = icon only; desktop keeps the agent name + chevron. */}
|
||||
<span className="truncate max-w-[160px] max-md:hidden">{triggerLabel}</span>
|
||||
<ChevronDown className="size-3 opacity-70 shrink-0 max-md:hidden" />
|
||||
</button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start" className="max-h-80 overflow-y-auto w-96">
|
||||
|
||||
Reference in New Issue
Block a user