Elffuss BraidHub

kikocis/continue public

Merge pull request #7403 from chezsmithy/fix-align-ux

fix: :lipstick: Align component styles
Changeset06370262b995c03b85e97e48960fd829b4a3028484cece1225fd2124dbeb93b3
AuthorNate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-08-27 21:49 -07:00
CommitterGitHub <noreply@github.com> · 2025-08-27 21:49 -07:00
Parents8b25799b1f27, 0edd3d43967b

Browse the files at this changeset

4 files changed

modified gui/src/components/UnifiedTerminal/UnifiedTerminal.tsx +28 −49
@@ -7,12 +7,6 @@
77 import { useAppDispatch } from "../../redux/hooks";
88 import { moveTerminalProcessToBackground } from "../../redux/thunks/moveTerminalProcessToBackground";
99 import { getFontSize } from "../../util";
10-import {
11- defaultBorderRadius,
12- vscBackground,
13- vscEditorBackground,
14- vscForeground,
15-} from "../index";
1610 import { CopyButton } from "../StyledMarkdownPreview/StepContainerPreToolbar/CopyButton";
1711 import { RunInTerminalButton } from "../StyledMarkdownPreview/StepContainerPreToolbar/RunInTerminalButton";
1812 import { ButtonContent, SpoilerButton } from "../ui/SpoilerButton";
@@ -26,7 +20,7 @@
2620 &::after {
2721 content: "█";
2822 animation: ${blinkCursor} 1s infinite;
29- color: ${vscForeground};
23+ color: var(--foreground);
3024 }
3125 `;
3226
@@ -60,7 +54,7 @@
6054 `;
6155
6256 const AnsiLink = styled.a`
63- color: var(--vscode-textLink-foreground, #3794ff);
57+ color: var(--link);
6458 text-decoration: none;
6559 &:hover {
6660 text-decoration: underline;
@@ -69,24 +63,21 @@
6963
7064 const StyledTerminalContainer = styled.div<{
7165 fontSize?: number;
72- bgColor: string;
7366 }>`
74- background-color: ${(props) => props.bgColor};
67+ background-color: var(--background);
7568 font-family:
76- var(--vscode-font-family),
69+ ui-sans-serif,
7770 system-ui,
7871 -apple-system,
7972 BlinkMacSystemFont,
8073 "Segoe UI",
8174 Roboto,
82- Oxygen,
83- Ubuntu,
84- Cantarell,
85- "Open Sans",
8675 "Helvetica Neue",
76+ Arial,
77+ "Noto Sans",
8778 sans-serif;
8879 font-size: ${(props) => props.fontSize || getFontSize()}px;
89- color: ${vscForeground};
80+ color: var(--foreground);
9081 line-height: 1.5;
9182
9283 > *:last-child {
@@ -97,10 +88,6 @@
9788 const TerminalContent = styled.div`
9889 pre {
9990 white-space: pre-wrap;
100- background-color: ${vscEditorBackground};
101- border-radius: ${defaultBorderRadius};
102- border: 1px solid
103- var(--vscode-editorWidget-border, rgba(127, 127, 127, 0.3));
10491 max-width: calc(100vw - 24px);
10592 overflow-x: scroll;
10693 overflow-y: hidden;
@@ -113,27 +100,22 @@
113100 display: none;
114101 }
115102 word-wrap: break-word;
116- border-radius: ${defaultBorderRadius};
117- background-color: ${vscEditorBackground};
103+ border-radius: 0.5rem;
104+ background-color: var(--editor-background);
118105 font-size: ${getFontSize() - 2}px;
119- font-family: var(--vscode-editor-font-family);
106+ font-family:
107+ ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono",
108+ Menlo, monospace;
120109 }
121110
122111 code:not(pre > code) {
123- font-family: var(--vscode-editor-font-family);
124- color: var(--vscode-input-placeholderForeground);
112+ font-family:
113+ ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono",
114+ Menlo, monospace;
115+ color: var(--input-placeholder);
125116 }
126117 `;
127118
128-const ToolbarContainer = styled.div<{ isExpanded: boolean }>`
129- font-size: ${getFontSize() - 2}px;
130-`;
131-
132-const CommandLine = styled.div`
133- padding-bottom: 0.5rem;
134- color: var(--vscode-terminal-ansiGreen, #0dbc79);
135-`;
136-
137119 function ansiToJSON(
138120 input: string,
139121 use_classes: boolean = false,
@@ -436,11 +418,7 @@
436418 }, [command, output, hasOutput]);
437419
438420 return (
439- <StyledTerminalContainer
440- fontSize={getFontSize()}
441- bgColor={vscBackground}
442- className="mb-4"
443- >
421+ <StyledTerminalContainer fontSize={getFontSize()} className="mb-4">
444422 <div className="outline-command-border -outline-offset-0.5 rounded-default bg-editor !my-2 flex min-w-0 flex-col outline outline-1">
445423 {/* Toolbar */}
446424 <div
@@ -454,11 +432,11 @@
454432 <div className="flex max-w-[50%] flex-row items-center">
455433 <ChevronDownIcon
456434 onClick={() => setIsExpanded(!isExpanded)}
457- className={`text-lightgray h-3.5 w-3.5 flex-shrink-0 cursor-pointer hover:brightness-125 ${
435+ className={`text-description h-3.5 w-3.5 flex-shrink-0 cursor-pointer hover:brightness-125 ${
458436 isExpanded ? "rotate-0" : "-rotate-90"
459437 }`}
460438 />
461- <span className="text-lightgray ml-2 select-none">Terminal</span>
439+ <span className="text-description ml-2 select-none">Terminal</span>
462440 </div>
463441
464442 <div className="flex items-center gap-2.5">
@@ -474,15 +452,10 @@
474452 {/* Content */}
475453 {isExpanded && (
476454 <TerminalContent>
477- <pre>
455+ <pre className="bg-editor">
478456 <code>
479457 {/* Command is always visible */}
480- <div
481- className="pb-2"
482- style={{ color: "var(--vscode-terminal-ansiGreen, #0DBC79)" }}
483- >
484- $ {command}
485- </div>
458+ <div className="text-terminal pb-2">$ {command}</div>
486459
487460 {/* Running state with cursor */}
488461 {isRunning && !hasOutput && (
@@ -532,7 +505,13 @@
532505
533506 {/* Status information */}
534507 {(statusMessage || isRunning) && (
535- <div className="text-description mt-2 flex items-center px-2 pb-2 text-xs">
508+ <div
509+ className="text-description flex items-center px-2 pb-2 pt-2 text-xs"
510+ style={{
511+ borderTop:
512+ "1px solid var(--vscode-commandCenter-inactiveBorder, #555555)",
513+ }}
514+ >
536515 <StatusIcon status={statusType} />
537516 {isRunning ? "Running" : statusMessage}
538517 {isRunning && toolCallId && (
modified gui/src/pages/gui/ToolCallDiv/FindAndReplace.tsx +2 −2
@@ -198,7 +198,7 @@
198198 className={`${config?.ui?.showChatScrollbar ? "thin-scrollbar" : "no-scrollbar"} max-h-72 overflow-auto`}
199199 >
200200 <pre
201- className={`m-0 text-xs leading-tight ${config?.ui?.codeWrap ? "w-full whitespace-pre-wrap" : "w-min whitespace-pre"}`}
201+ className={`bg-editor m-0 w-full text-xs leading-tight ${config?.ui?.codeWrap ? "whitespace-pre-wrap" : "whitespace-pre"}`}
202202 >
203203 {diffResult.diff.map((part, index) => {
204204 if (part.removed) {
@@ -245,7 +245,7 @@
245245 );
246246 } else {
247247 return (
248- <div key={index} className="bg-background">
248+ <div key={index}>
249249 {part.value.split("\n").map((line, lineIndex) => {
250250 if (
251251 line === "" &&
modified gui/src/styles/theme.ts +4 −0
@@ -140,6 +140,10 @@
140140 vars: ["--vscode-textLink-foreground"],
141141 default: "#5c9ce6", // medium blue
142142 },
143+ terminal: {
144+ vars: ["--vscode-terminal-ansiGreen"],
145+ default: "#0dbc79", // green
146+ },
143147 textCodeBlockBackground: {
144148 vars: ["--vscode-textCodeBlock-background"],
145149 default: "#1e1e1e", // same as editor-background
modified gui/tailwind.config.cjs +1 −0
@@ -86,6 +86,7 @@
8686 error: varWithFallback("error"),
8787 link: varWithFallback("link"),
8888 accent: varWithFallback("accent"),
89+ terminal: varWithFallback("terminal"),
8990 findMatch: {
9091 DEFAULT: THEME_COLORS["find-match"].default,
9192 selected: varWithFallback("find-match-selected"),