refactor(message): shrink agent card max height and localize running indicator with spinner
This commit is contained in:
@@ -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 */}
|
||||||
|
|||||||
@@ -1719,6 +1719,7 @@
|
|||||||
"nameLabel": "الاسم:",
|
"nameLabel": "الاسم:",
|
||||||
"agentPromptLabel": "المطالبة",
|
"agentPromptLabel": "المطالبة",
|
||||||
"agentModelLabel": "النموذج",
|
"agentModelLabel": "النموذج",
|
||||||
|
"agentRunning": "قيد التشغيل...",
|
||||||
"agentStatsBash": "الأوامر",
|
"agentStatsBash": "الأوامر",
|
||||||
"agentStatsRead": "الملفات المقروءة",
|
"agentStatsRead": "الملفات المقروءة",
|
||||||
"agentStatsSearch": "عمليات البحث",
|
"agentStatsSearch": "عمليات البحث",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -1719,6 +1719,7 @@
|
|||||||
"nameLabel": "名前:",
|
"nameLabel": "名前:",
|
||||||
"agentPromptLabel": "プロンプト",
|
"agentPromptLabel": "プロンプト",
|
||||||
"agentModelLabel": "モデル",
|
"agentModelLabel": "モデル",
|
||||||
|
"agentRunning": "実行中...",
|
||||||
"agentStatsBash": "コマンド",
|
"agentStatsBash": "コマンド",
|
||||||
"agentStatsRead": "ファイル読取",
|
"agentStatsRead": "ファイル読取",
|
||||||
"agentStatsSearch": "検索",
|
"agentStatsSearch": "検索",
|
||||||
|
|||||||
@@ -1719,6 +1719,7 @@
|
|||||||
"nameLabel": "이름:",
|
"nameLabel": "이름:",
|
||||||
"agentPromptLabel": "프롬프트",
|
"agentPromptLabel": "프롬프트",
|
||||||
"agentModelLabel": "모델",
|
"agentModelLabel": "모델",
|
||||||
|
"agentRunning": "실행 중...",
|
||||||
"agentStatsBash": "명령",
|
"agentStatsBash": "명령",
|
||||||
"agentStatsRead": "파일 읽기",
|
"agentStatsRead": "파일 읽기",
|
||||||
"agentStatsSearch": "검색",
|
"agentStatsSearch": "검색",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -1719,6 +1719,7 @@
|
|||||||
"nameLabel": "名称:",
|
"nameLabel": "名称:",
|
||||||
"agentPromptLabel": "提示词",
|
"agentPromptLabel": "提示词",
|
||||||
"agentModelLabel": "模型",
|
"agentModelLabel": "模型",
|
||||||
|
"agentRunning": "运行中...",
|
||||||
"agentStatsBash": "命令",
|
"agentStatsBash": "命令",
|
||||||
"agentStatsRead": "读取文件",
|
"agentStatsRead": "读取文件",
|
||||||
"agentStatsSearch": "搜索",
|
"agentStatsSearch": "搜索",
|
||||||
|
|||||||
@@ -1719,6 +1719,7 @@
|
|||||||
"nameLabel": "名稱:",
|
"nameLabel": "名稱:",
|
||||||
"agentPromptLabel": "提示詞",
|
"agentPromptLabel": "提示詞",
|
||||||
"agentModelLabel": "模型",
|
"agentModelLabel": "模型",
|
||||||
|
"agentRunning": "執行中...",
|
||||||
"agentStatsBash": "命令",
|
"agentStatsBash": "命令",
|
||||||
"agentStatsRead": "讀取檔案",
|
"agentStatsRead": "讀取檔案",
|
||||||
"agentStatsSearch": "搜尋",
|
"agentStatsSearch": "搜尋",
|
||||||
|
|||||||
Reference in New Issue
Block a user