Skip to content

Build your personal knowledge base with Trilium Notes

style(llm): improve style of tool calls

Elian Doran16d8c9824ac6
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.css b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.css
index e139116994..4473e0d16d 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.css
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.css
@@ -1,5 +1,13 @@
/* Tool call specific styles (card/section structure is in ExpandableCard.css) */
+/* Elevated tool-call card — a filled surface lifted off the message area with a
+ soft shadow, so a tool call reads as a distinct card rather than an outline. */
+.expandable-card.llm-chat-tool-call-card {
+ box-shadow: var(--card-box-shadow);
+ border: 1px solid var(--card-border-color);
+ background: var(--card-background-color);
+}
+
.llm-chat-tool-call-detail {
font-weight: 400;
color: var(--muted-text-color);
@@ -35,9 +43,7 @@
.expandable-section-body pre {
margin: 0;
- padding: 0.5rem;
- background: var(--main-background-color);
- border-radius: 4px;
+ padding: 0;
font-size: 0.8rem;
font-family: var(--monospace-font-family, monospace);
}
@@ -57,9 +63,6 @@
table-layout: auto;
border-collapse: collapse;
font-size: 0.8rem;
- background: var(--main-background-color);
- border-radius: 4px;
- overflow: hidden;
}
.llm-chat-tool-call-table td {
@@ -82,14 +85,12 @@
.llm-chat-tool-call-table-value pre {
margin: 0;
padding: 0;
- background: none;
white-space: pre-wrap;
word-break: break-word;
}
/* Nested tables */
.llm-chat-tool-call-table-value .llm-chat-tool-call-table {
- background: none;
width: auto;
min-width: 100%;
}
@@ -99,10 +100,6 @@
flex-direction: column;
}
-.llm-chat-tool-call-table-array > .llm-chat-tool-call-table {
- background: none;
-}
-
.llm-chat-tool-call-table-array > .llm-chat-tool-call-table + .llm-chat-tool-call-table {
border-top: 1px solid var(--main-border-color);
}
diff --git a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.tsx b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.tsx
index 9baa4c121e..c637ca7007 100644
--- a/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.tsx
+++ b/apps/client/src/widgets/type_widgets/llm_chat/ToolCallCard.tsx
@@ -251,7 +251,7 @@ function groupByToolName(toolCalls: ToolCall[]): Array<ToolCall | ToolCall[]> {
export default function ToolCallCard({ toolCalls }: { toolCalls: ToolCall[] }) {
const groups = groupByToolName(toolCalls);
return (
- <ExpandableCard>
+ <ExpandableCard className="llm-chat-tool-call-card">
{groups.map((group, idx) => (
Array.isArray(group)
? <ToolCallGroupSection key={idx} toolCalls={group} />