chore(llm): improve tool card slightly

This commit is contained in:
Elian Doran
2026-04-03 21:15:02 +03:00
parent 25bf62faa3
commit 073873c33c
2 changed files with 6 additions and 9 deletions

View File

@@ -55,17 +55,13 @@
color: var(--main-text-color);
}
.llm-chat-tool-call-input,
.llm-chat-tool-call-result {
margin-top: 0.5rem;
}
.llm-chat-tool-call-input strong,
.llm-chat-tool-call-result strong {
display: block;
font-size: 0.75rem;
color: var(--muted-text-color);
margin-bottom: 0.25rem;
text-transform: uppercase;
}
.llm-chat-tool-call pre {
@@ -176,9 +172,9 @@
}
.llm-chat-tool-call-table td {
padding: 0.25rem 0.5rem;
padding: 0.25rem 0;
padding-right: 0.75rem;
vertical-align: top;
border-bottom: 1px solid var(--main-border-color);
}
.llm-chat-tool-call-table tr:last-child td {
@@ -188,6 +184,7 @@
.llm-chat-tool-call-table-key {
font-weight: 600;
white-space: nowrap;
width: 0;
color: var(--muted-text-color);
}

View File

@@ -171,12 +171,12 @@ export default function ToolCallCard({ toolCall }: { toolCall: ToolCall }) {
</summary>
<div className="llm-chat-tool-call-inline-body">
<div className="llm-chat-tool-call-input">
<strong>{t("llm_chat.input")}:</strong>
<strong>{t("llm_chat.input")}</strong>
<KeyValueTable data={toolCall.input} />
</div>
{toolCall.result && (
<div className={`llm-chat-tool-call-result ${toolCall.isError ? "llm-chat-tool-call-result-error" : ""}`}>
<strong>{toolCall.isError ? t("llm_chat.error") : t("llm_chat.result")}:</strong>
<strong>{toolCall.isError ? t("llm_chat.error") : t("llm_chat.result")}</strong>
<KeyValueTable data={toolCall.result} />
</div>
)}