fix: 💄 Fix border width, and status separator

This commit is contained in:
chezsmithy 2025-08-26 23:34:45 -07:00
parent 1c43524bad
commit b56cbf269d

View file

@ -7,12 +7,6 @@ import styled, { keyframes } from "styled-components";
import { useAppDispatch } from "../../redux/hooks";
import { moveTerminalProcessToBackground } from "../../redux/thunks/moveTerminalProcessToBackground";
import { getFontSize } from "../../util";
import {
defaultBorderRadius,
vscBackground,
vscEditorBackground,
vscForeground,
} from "../index";
import { CopyButton } from "../StyledMarkdownPreview/StepContainerPreToolbar/CopyButton";
import { RunInTerminalButton } from "../StyledMarkdownPreview/StepContainerPreToolbar/RunInTerminalButton";
import { ButtonContent, SpoilerButton } from "../ui/SpoilerButton";
@ -26,7 +20,7 @@ const BlinkingCursor = styled.span`
&::after {
content: "█";
animation: ${blinkCursor} 1s infinite;
color: ${vscForeground};
color: var(--foreground);
}
`;
@ -60,7 +54,7 @@ const AnsiSpan = styled.span<{
`;
const AnsiLink = styled.a`
color: var(--vscode-textLink-foreground, #3794ff);
color: var(--link);
text-decoration: none;
&:hover {
text-decoration: underline;
@ -69,24 +63,11 @@ const AnsiLink = styled.a`
const StyledTerminalContainer = styled.div<{
fontSize?: number;
bgColor: string;
}>`
background-color: ${(props) => props.bgColor};
font-family:
var(--vscode-font-family),
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Oxygen,
Ubuntu,
Cantarell,
"Open Sans",
"Helvetica Neue",
sans-serif;
background-color: var(--background);
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
font-size: ${(props) => props.fontSize || getFontSize()}px;
color: ${vscForeground};
color: var(--foreground);
line-height: 1.5;
> *:last-child {
@ -109,27 +90,18 @@ const TerminalContent = styled.div`
display: none;
}
word-wrap: break-word;
border-radius: ${defaultBorderRadius};
background-color: ${vscEditorBackground};
border-radius: 0.5rem;
background-color: var(--editor-background);
font-size: ${getFontSize() - 2}px;
font-family: var(--vscode-editor-font-family);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}
code:not(pre > code) {
font-family: var(--vscode-editor-font-family);
color: var(--vscode-input-placeholderForeground);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
color: var(--input-placeholder);
}
`;
const ToolbarContainer = styled.div<{ isExpanded: boolean }>`
font-size: ${getFontSize() - 2}px;
`;
const CommandLine = styled.div`
padding-bottom: 0.5rem;
color: var(--vscode-terminal-ansiGreen, #0dbc79);
`;
function ansiToJSON(
input: string,
use_classes: boolean = false,
@ -434,7 +406,6 @@ export function UnifiedTerminalCommand({
return (
<StyledTerminalContainer
fontSize={getFontSize()}
bgColor={vscBackground}
className="mb-4"
>
<div className="outline-command-border -outline-offset-0.5 rounded-default bg-editor !my-2 flex min-w-0 flex-col outline outline-1">
@ -450,11 +421,11 @@ export function UnifiedTerminalCommand({
<div className="flex max-w-[50%] flex-row items-center">
<ChevronDownIcon
onClick={() => setIsExpanded(!isExpanded)}
className={`text-lightgray h-3.5 w-3.5 flex-shrink-0 cursor-pointer hover:brightness-125 ${
className={`text-description h-3.5 w-3.5 flex-shrink-0 cursor-pointer hover:brightness-125 ${
isExpanded ? "rotate-0" : "-rotate-90"
}`}
/>
<span className="text-lightgray ml-2 select-none">Terminal</span>
<span className="text-description ml-2 select-none">Terminal</span>
</div>
<div className="flex items-center gap-2.5">
@ -474,8 +445,7 @@ export function UnifiedTerminalCommand({
<code>
{/* Command is always visible */}
<div
className="pb-2"
style={{ color: "var(--vscode-terminal-ansiGreen, #0DBC79)" }}
className="pb-2 text-terminal"
>
$ {command}
</div>
@ -528,7 +498,10 @@ export function UnifiedTerminalCommand({
{/* Status information */}
{(statusMessage || isRunning) && (
<div className="text-description mt-2 flex items-center px-2 pb-2 text-xs">
<div
className="text-description flex items-center px-2 pb-2 pt-2 text-xs"
style={{ borderTop: '1px solid var(--vscode-commandCenter-inactiveBorder, #555555)' }}
>
<StatusIcon status={statusType} />
{isRunning ? "Running" : statusMessage}
{isRunning && toolCallId && (