refactor(message): shrink agent card max height and localize running indicator with spinner

This commit is contained in:
xintaofei
2026-04-18 18:43:04 +08:00
parent 75c2dd4cc5
commit 07ef376438
11 changed files with 18 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ import {
ChevronDownIcon, ChevronDownIcon,
ChevronRightIcon, ChevronRightIcon,
CompassIcon, CompassIcon,
Loader2,
MapIcon, MapIcon,
TerminalIcon, TerminalIcon,
WrenchIcon, WrenchIcon,
@@ -192,7 +193,7 @@ export const AgentToolCallPart = memo(function AgentToolCallPart({
{/* Collapsible body */} {/* Collapsible body */}
<CollapsibleContent> <CollapsibleContent>
<div className="max-h-[32rem] overflow-y-auto space-y-3 px-4 pb-4"> <div className="max-h-72 overflow-y-auto space-y-3 px-4 pb-4">
{/* Model + duration summary */} {/* Model + duration summary */}
{(model || durationSuffix) && ( {(model || durationSuffix) && (
<div className="flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground"> <div className="flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground">
@@ -241,9 +242,12 @@ export const AgentToolCallPart = memo(function AgentToolCallPart({
{/* Running indicator */} {/* Running indicator */}
{isRunning && !part.output && ( {isRunning && !part.output && (
<Shimmer className="text-sm" duration={2}> <div className="flex items-center gap-2">
Running... <Loader2 className="size-3.5 animate-spin text-muted-foreground" />
</Shimmer> <Shimmer className="text-sm" duration={2}>
{t("agentRunning")}
</Shimmer>
</div>
)} )}
{/* Error output */} {/* Error output */}

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "الاسم:", "nameLabel": "الاسم:",
"agentPromptLabel": "المطالبة", "agentPromptLabel": "المطالبة",
"agentModelLabel": "النموذج", "agentModelLabel": "النموذج",
"agentRunning": "قيد التشغيل...",
"agentStatsBash": "الأوامر", "agentStatsBash": "الأوامر",
"agentStatsRead": "الملفات المقروءة", "agentStatsRead": "الملفات المقروءة",
"agentStatsSearch": "عمليات البحث", "agentStatsSearch": "عمليات البحث",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "Bezeichnung:", "nameLabel": "Bezeichnung:",
"agentPromptLabel": "Eingabe", "agentPromptLabel": "Eingabe",
"agentModelLabel": "Modell", "agentModelLabel": "Modell",
"agentRunning": "Läuft...",
"agentStatsBash": "Befehle", "agentStatsBash": "Befehle",
"agentStatsRead": "Dateien gelesen", "agentStatsRead": "Dateien gelesen",
"agentStatsSearch": "Suchen", "agentStatsSearch": "Suchen",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "Name:", "nameLabel": "Name:",
"agentPromptLabel": "Prompt", "agentPromptLabel": "Prompt",
"agentModelLabel": "Model", "agentModelLabel": "Model",
"agentRunning": "Running...",
"agentStatsBash": "Commands", "agentStatsBash": "Commands",
"agentStatsRead": "Files read", "agentStatsRead": "Files read",
"agentStatsSearch": "Searches", "agentStatsSearch": "Searches",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "Nombre:", "nameLabel": "Nombre:",
"agentPromptLabel": "Instrucción", "agentPromptLabel": "Instrucción",
"agentModelLabel": "Modelo", "agentModelLabel": "Modelo",
"agentRunning": "Ejecutando...",
"agentStatsBash": "Comandos", "agentStatsBash": "Comandos",
"agentStatsRead": "Archivos leídos", "agentStatsRead": "Archivos leídos",
"agentStatsSearch": "Búsquedas", "agentStatsSearch": "Búsquedas",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "Nom :", "nameLabel": "Nom :",
"agentPromptLabel": "Instruction", "agentPromptLabel": "Instruction",
"agentModelLabel": "Modèle", "agentModelLabel": "Modèle",
"agentRunning": "En cours...",
"agentStatsBash": "Commandes", "agentStatsBash": "Commandes",
"agentStatsRead": "Fichiers lus", "agentStatsRead": "Fichiers lus",
"agentStatsSearch": "Recherches", "agentStatsSearch": "Recherches",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "名前:", "nameLabel": "名前:",
"agentPromptLabel": "プロンプト", "agentPromptLabel": "プロンプト",
"agentModelLabel": "モデル", "agentModelLabel": "モデル",
"agentRunning": "実行中...",
"agentStatsBash": "コマンド", "agentStatsBash": "コマンド",
"agentStatsRead": "ファイル読取", "agentStatsRead": "ファイル読取",
"agentStatsSearch": "検索", "agentStatsSearch": "検索",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "이름:", "nameLabel": "이름:",
"agentPromptLabel": "프롬프트", "agentPromptLabel": "프롬프트",
"agentModelLabel": "모델", "agentModelLabel": "모델",
"agentRunning": "실행 중...",
"agentStatsBash": "명령", "agentStatsBash": "명령",
"agentStatsRead": "파일 읽기", "agentStatsRead": "파일 읽기",
"agentStatsSearch": "검색", "agentStatsSearch": "검색",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "Nome:", "nameLabel": "Nome:",
"agentPromptLabel": "Instrução", "agentPromptLabel": "Instrução",
"agentModelLabel": "Modelo", "agentModelLabel": "Modelo",
"agentRunning": "Em execução...",
"agentStatsBash": "Comandos", "agentStatsBash": "Comandos",
"agentStatsRead": "Arquivos lidos", "agentStatsRead": "Arquivos lidos",
"agentStatsSearch": "Pesquisas", "agentStatsSearch": "Pesquisas",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "名称:", "nameLabel": "名称:",
"agentPromptLabel": "提示词", "agentPromptLabel": "提示词",
"agentModelLabel": "模型", "agentModelLabel": "模型",
"agentRunning": "运行中...",
"agentStatsBash": "命令", "agentStatsBash": "命令",
"agentStatsRead": "读取文件", "agentStatsRead": "读取文件",
"agentStatsSearch": "搜索", "agentStatsSearch": "搜索",

View File

@@ -1719,6 +1719,7 @@
"nameLabel": "名稱:", "nameLabel": "名稱:",
"agentPromptLabel": "提示詞", "agentPromptLabel": "提示詞",
"agentModelLabel": "模型", "agentModelLabel": "模型",
"agentRunning": "執行中...",
"agentStatsBash": "命令", "agentStatsBash": "命令",
"agentStatsRead": "讀取檔案", "agentStatsRead": "讀取檔案",
"agentStatsSearch": "搜尋", "agentStatsSearch": "搜尋",