mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
refactor(ui): migrate TaskHeader styles to kilo-ui component system
Consolidate TaskHeader styling by moving CSS from vscode-specific chat.css to the shared kilo-ui component system. Update TaskHeader component to use data-component and data-slot attributes instead of class-based selectors, enabling consistent styling across packages while maintaining the same visual appearance and functionality.
This commit is contained in:
@@ -2,21 +2,33 @@
|
||||
/* Kilo Task Header overrides */
|
||||
|
||||
[data-component="task-header"] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background-color: var(--background-base);
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--border-weak-base);
|
||||
flex-shrink: 0;
|
||||
min-height: 32px;
|
||||
|
||||
[data-slot="task-header-title"] {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: var(--text-strong);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[data-slot="task-header-stats"] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-shrink: 0;
|
||||
font-size: 13px;
|
||||
color: var(--text-weak);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[data-slot="task-header-progress"] {
|
||||
|
||||
@@ -36,15 +36,15 @@ export const TaskHeader: Component = () => {
|
||||
|
||||
return (
|
||||
<Show when={hasMessages()}>
|
||||
<div class="task-header">
|
||||
<div class="task-header-title" title={title()}>
|
||||
<div data-component="task-header">
|
||||
<div data-slot="task-header-title" title={title()}>
|
||||
{title()}
|
||||
</div>
|
||||
<div class="task-header-stats">
|
||||
<div data-slot="task-header-stats">
|
||||
<Show when={cost()}>
|
||||
{(c) => (
|
||||
<Tooltip value="Session cost" placement="bottom">
|
||||
<span class="task-header-stat">{c()}</span>
|
||||
<span>{c()}</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Show>
|
||||
@@ -54,7 +54,7 @@ export const TaskHeader: Component = () => {
|
||||
value={ctx().pct ? `${ctx().tokens} tokens (${ctx().pct} of context)` : `${ctx().tokens} tokens`}
|
||||
placement="bottom"
|
||||
>
|
||||
<span class="task-header-stat">{ctx().pct ?? ctx().tokens}</span>
|
||||
<span>{ctx().pct ?? ctx().tokens}</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Show>
|
||||
|
||||
@@ -20,44 +20,6 @@
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Task Header
|
||||
============================================ */
|
||||
|
||||
.task-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 12px;
|
||||
background: var(--vscode-sideBar-background);
|
||||
border-bottom: 1px solid var(--vscode-panel-border);
|
||||
flex-shrink: 0;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.task-header-title {
|
||||
flex: 1;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--vscode-foreground);
|
||||
}
|
||||
|
||||
.task-header-stats {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.task-header-stat {
|
||||
font-size: 11px;
|
||||
color: var(--vscode-descriptionForeground);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.chat-input {
|
||||
flex-shrink: 0;
|
||||
border-top: 1px solid var(--vscode-panel-border);
|
||||
|
||||
Reference in New Issue
Block a user