mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 10:02:04 +08:00
* feat(kilo-ui): enhance MCP tool display with input/output sections and improved styling - Add subtitle and args display to MCP tool triggers for better context - Separate input and output sections with labels and dividers - Format input and output as JSON with proper syntax highlighting - Reposition copy button tooltip to prevent clipping in tool output - Add styling for MCP section labels and tool dividers * feat(kilo-ui): i18n for MCP input/output labels * chore: add changeset --------- Co-authored-by: Sylwester Liljegren <sylwester.liljegren@softronic.se>
190 lines
4.3 KiB
CSS
190 lines
4.3 KiB
CSS
/* Prevent tool-trigger content from pushing the collapsible arrow off-screen */
|
|
[data-component="tool-trigger"] {
|
|
[data-slot="basic-tool-tool-trigger-content"] {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
[data-slot="basic-tool-tool-info"] {
|
|
font-size: 12px;
|
|
text-align: start;
|
|
}
|
|
|
|
[data-slot="basic-tool-tool-info-structured"] {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
[data-slot="message-part-title"] {
|
|
align-items: baseline;
|
|
}
|
|
|
|
[data-slot="message-part-title-area"] {
|
|
align-items: baseline;
|
|
}
|
|
|
|
[data-slot="basic-tool-tool-info-main"] {
|
|
align-items: baseline;
|
|
overflow: hidden;
|
|
}
|
|
|
|
[data-slot="basic-tool-icon"] {
|
|
display: none;
|
|
}
|
|
|
|
[data-slot="basic-tool-tool-subtitle"] {
|
|
font-size: 12px;
|
|
}
|
|
|
|
[data-slot="basic-tool-tool-title"] {
|
|
font-size: 14px;
|
|
}
|
|
|
|
[data-slot="message-part-title-text"] {
|
|
font-size: 14px;
|
|
}
|
|
|
|
[data-slot="message-part-title-filename"] {
|
|
font-size: 12px;
|
|
}
|
|
|
|
[data-slot="message-part-meta-line"] {
|
|
display: inline-flex;
|
|
align-items: baseline;
|
|
gap: 4px;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
min-width: 0;
|
|
flex-shrink: 1;
|
|
font-size: 12px;
|
|
|
|
&.clickable {
|
|
cursor: pointer;
|
|
transition: color 0.15s ease;
|
|
|
|
&:hover {
|
|
color: var(--text-base);
|
|
}
|
|
}
|
|
}
|
|
|
|
[data-slot="message-part-title-filename"] {
|
|
flex-shrink: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
direction: rtl;
|
|
text-align: left;
|
|
}
|
|
|
|
[data-slot="message-part-directory-inline"] {
|
|
color: var(--text-weak);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
direction: rtl;
|
|
text-align: left;
|
|
flex-shrink: 1;
|
|
min-width: 0;
|
|
font-size: 12px;
|
|
}
|
|
|
|
[data-slot="webfetch-meta"] {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
overflow: hidden;
|
|
min-width: 0;
|
|
flex-shrink: 1;
|
|
}
|
|
}
|
|
|
|
/* Tool icon in trigger: visible in VS Code theme */
|
|
html[data-theme="kilo-vscode"] [data-component="tool-trigger"] {
|
|
[data-slot="basic-tool-icon"] {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
color: var(--icon-base);
|
|
|
|
[data-component="icon"] {
|
|
display: flex;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* Card styling for tool calls in the VS Code sidebar theme */
|
|
html[data-theme="kilo-vscode"] [data-component="tool-part-wrapper"][data-part-type="tool"] {
|
|
border-radius: var(--radius-md);
|
|
border: 1px solid var(--border-weak-base, var(--vscode-panel-border));
|
|
overflow: hidden;
|
|
|
|
/* Header trigger — add bottom border when the collapsible is open */
|
|
[data-component="collapsible"].tool-collapsible {
|
|
gap: 0px;
|
|
border-radius: 0;
|
|
|
|
[data-slot="collapsible-trigger"] {
|
|
padding: 0 8px;
|
|
height: 36px;
|
|
background-color: var(--surface-inset-base, var(--vscode-sideBar-background));
|
|
|
|
&:hover {
|
|
background-color: var(--surface-inset-base-hover, var(--vscode-list-hoverBackground));
|
|
}
|
|
}
|
|
|
|
[data-slot="collapsible-trigger"][aria-expanded="true"] {
|
|
border-bottom: 1px solid var(--border-weak-base, var(--vscode-panel-border));
|
|
}
|
|
|
|
/* Arrow always visible (no fade-on-hover) */
|
|
[data-slot="collapsible-arrow"] {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Arrow: DOWN when collapsed, UP when expanded (matches question-dock toggle) */
|
|
[data-slot="collapsible-arrow-icon"] {
|
|
transform: translateZ(0) rotate(0deg);
|
|
}
|
|
|
|
[data-slot="collapsible-trigger"][aria-expanded="true"] [data-slot="collapsible-arrow-icon"] {
|
|
transform: translateZ(0) rotate(180deg);
|
|
}
|
|
}
|
|
|
|
/* Reposition copy button tooltip to appear below (not above) to avoid clipping */
|
|
[data-component="tool-output"] [data-slot="markdown-copy-button"]::after {
|
|
bottom: auto;
|
|
top: calc(100% + 4px);
|
|
}
|
|
|
|
[data-slot="mcp-section-label"] {
|
|
padding: 6px 12px 0;
|
|
font-size: 11px;
|
|
color: var(--text-weak, var(--vscode-descriptionForeground));
|
|
}
|
|
|
|
[data-slot="mcp-tool-divider"] {
|
|
height: 1px;
|
|
background: var(--border-weak-base, var(--vscode-panel-border));
|
|
margin-top: 4px;
|
|
}
|
|
|
|
/* Expandable tool output content */
|
|
[data-component="tool-output"] {
|
|
padding: 8px 12px;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
|
|
&[data-scrollable] {
|
|
overflow-y: auto;
|
|
}
|
|
}
|
|
}
|