Changesets · Branches · Tags · Compare
| Changeset | 06370262b995c03b85e97e48960fd829b4a3028484cece1225fd2124dbeb93b3 |
|---|---|
| Author | Nate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-08-27 21:49 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-08-27 21:49 -07:00 |
| Parents | 8b25799b1f27, 0edd3d43967b |
4 files changed
modified gui/src/components/UnifiedTerminal/UnifiedTerminal.tsx +28 −49
| @@ -7,12 +7,6 @@ | ||
| 7 | 7 | import { useAppDispatch } from "../../redux/hooks"; |
| 8 | 8 | import { moveTerminalProcessToBackground } from "../../redux/thunks/moveTerminalProcessToBackground"; |
| 9 | 9 | import { getFontSize } from "../../util"; |
| 10 | -import { | |
| 11 | - defaultBorderRadius, | |
| 12 | - vscBackground, | |
| 13 | - vscEditorBackground, | |
| 14 | - vscForeground, | |
| 15 | -} from "../index"; | |
| 16 | 10 | import { CopyButton } from "../StyledMarkdownPreview/StepContainerPreToolbar/CopyButton"; |
| 17 | 11 | import { RunInTerminalButton } from "../StyledMarkdownPreview/StepContainerPreToolbar/RunInTerminalButton"; |
| 18 | 12 | import { ButtonContent, SpoilerButton } from "../ui/SpoilerButton"; |
| @@ -26,7 +20,7 @@ | ||
| 26 | 20 | &::after { |
| 27 | 21 | content: "█"; |
| 28 | 22 | animation: ${blinkCursor} 1s infinite; |
| 29 | - color: ${vscForeground}; | |
| 23 | + color: var(--foreground); | |
| 30 | 24 | } |
| 31 | 25 | `; |
| 32 | 26 | |
| @@ -60,7 +54,7 @@ | ||
| 60 | 54 | `; |
| 61 | 55 | |
| 62 | 56 | const AnsiLink = styled.a` |
| 63 | - color: var(--vscode-textLink-foreground, #3794ff); | |
| 57 | + color: var(--link); | |
| 64 | 58 | text-decoration: none; |
| 65 | 59 | &:hover { |
| 66 | 60 | text-decoration: underline; |
| @@ -69,24 +63,21 @@ | ||
| 69 | 63 | |
| 70 | 64 | const StyledTerminalContainer = styled.div<{ |
| 71 | 65 | fontSize?: number; |
| 72 | - bgColor: string; | |
| 73 | 66 | }>` |
| 74 | - background-color: ${(props) => props.bgColor}; | |
| 67 | + background-color: var(--background); | |
| 75 | 68 | font-family: |
| 76 | - var(--vscode-font-family), | |
| 69 | + ui-sans-serif, | |
| 77 | 70 | system-ui, |
| 78 | 71 | -apple-system, |
| 79 | 72 | BlinkMacSystemFont, |
| 80 | 73 | "Segoe UI", |
| 81 | 74 | Roboto, |
| 82 | - Oxygen, | |
| 83 | - Ubuntu, | |
| 84 | - Cantarell, | |
| 85 | - "Open Sans", | |
| 86 | 75 | "Helvetica Neue", |
| 76 | + Arial, | |
| 77 | + "Noto Sans", | |
| 87 | 78 | sans-serif; |
| 88 | 79 | font-size: ${(props) => props.fontSize || getFontSize()}px; |
| 89 | - color: ${vscForeground}; | |
| 80 | + color: var(--foreground); | |
| 90 | 81 | line-height: 1.5; |
| 91 | 82 | |
| 92 | 83 | > *:last-child { |
| @@ -97,10 +88,6 @@ | ||
| 97 | 88 | const TerminalContent = styled.div` |
| 98 | 89 | pre { |
| 99 | 90 | 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)); | |
| 104 | 91 | max-width: calc(100vw - 24px); |
| 105 | 92 | overflow-x: scroll; |
| 106 | 93 | overflow-y: hidden; |
| @@ -113,27 +100,22 @@ | ||
| 113 | 100 | display: none; |
| 114 | 101 | } |
| 115 | 102 | word-wrap: break-word; |
| 116 | - border-radius: ${defaultBorderRadius}; | |
| 117 | - background-color: ${vscEditorBackground}; | |
| 103 | + border-radius: 0.5rem; | |
| 104 | + background-color: var(--editor-background); | |
| 118 | 105 | 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; | |
| 120 | 109 | } |
| 121 | 110 | |
| 122 | 111 | 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); | |
| 125 | 116 | } |
| 126 | 117 | `; |
| 127 | 118 | |
| 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 | - | |
| 137 | 119 | function ansiToJSON( |
| 138 | 120 | input: string, |
| 139 | 121 | use_classes: boolean = false, |
| @@ -436,11 +418,7 @@ | ||
| 436 | 418 | }, [command, output, hasOutput]); |
| 437 | 419 | |
| 438 | 420 | return ( |
| 439 | - <StyledTerminalContainer | |
| 440 | - fontSize={getFontSize()} | |
| 441 | - bgColor={vscBackground} | |
| 442 | - className="mb-4" | |
| 443 | - > | |
| 421 | + <StyledTerminalContainer fontSize={getFontSize()} className="mb-4"> | |
| 444 | 422 | <div className="outline-command-border -outline-offset-0.5 rounded-default bg-editor !my-2 flex min-w-0 flex-col outline outline-1"> |
| 445 | 423 | {/* Toolbar */} |
| 446 | 424 | <div |
| @@ -454,11 +432,11 @@ | ||
| 454 | 432 | <div className="flex max-w-[50%] flex-row items-center"> |
| 455 | 433 | <ChevronDownIcon |
| 456 | 434 | 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 ${ | |
| 458 | 436 | isExpanded ? "rotate-0" : "-rotate-90" |
| 459 | 437 | }`} |
| 460 | 438 | /> |
| 461 | - <span className="text-lightgray ml-2 select-none">Terminal</span> | |
| 439 | + <span className="text-description ml-2 select-none">Terminal</span> | |
| 462 | 440 | </div> |
| 463 | 441 | |
| 464 | 442 | <div className="flex items-center gap-2.5"> |
| @@ -474,15 +452,10 @@ | ||
| 474 | 452 | {/* Content */} |
| 475 | 453 | {isExpanded && ( |
| 476 | 454 | <TerminalContent> |
| 477 | - <pre> | |
| 455 | + <pre className="bg-editor"> | |
| 478 | 456 | <code> |
| 479 | 457 | {/* 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> | |
| 486 | 459 | |
| 487 | 460 | {/* Running state with cursor */} |
| 488 | 461 | {isRunning && !hasOutput && ( |
| @@ -532,7 +505,13 @@ | ||
| 532 | 505 | |
| 533 | 506 | {/* Status information */} |
| 534 | 507 | {(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 | + > | |
| 536 | 515 | <StatusIcon status={statusType} /> |
| 537 | 516 | {isRunning ? "Running" : statusMessage} |
| 538 | 517 | {isRunning && toolCallId && ( |
modified gui/src/pages/gui/ToolCallDiv/FindAndReplace.tsx +2 −2
| @@ -198,7 +198,7 @@ | ||
| 198 | 198 | className={`${config?.ui?.showChatScrollbar ? "thin-scrollbar" : "no-scrollbar"} max-h-72 overflow-auto`} |
| 199 | 199 | > |
| 200 | 200 | <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"}`} | |
| 202 | 202 | > |
| 203 | 203 | {diffResult.diff.map((part, index) => { |
| 204 | 204 | if (part.removed) { |
| @@ -245,7 +245,7 @@ | ||
| 245 | 245 | ); |
| 246 | 246 | } else { |
| 247 | 247 | return ( |
| 248 | - <div key={index} className="bg-background"> | |
| 248 | + <div key={index}> | |
| 249 | 249 | {part.value.split("\n").map((line, lineIndex) => { |
| 250 | 250 | if ( |
| 251 | 251 | line === "" && |
modified gui/src/styles/theme.ts +4 −0
| @@ -140,6 +140,10 @@ | ||
| 140 | 140 | vars: ["--vscode-textLink-foreground"], |
| 141 | 141 | default: "#5c9ce6", // medium blue |
| 142 | 142 | }, |
| 143 | + terminal: { | |
| 144 | + vars: ["--vscode-terminal-ansiGreen"], | |
| 145 | + default: "#0dbc79", // green | |
| 146 | + }, | |
| 143 | 147 | textCodeBlockBackground: { |
| 144 | 148 | vars: ["--vscode-textCodeBlock-background"], |
| 145 | 149 | default: "#1e1e1e", // same as editor-background |
modified gui/tailwind.config.cjs +1 −0
| @@ -86,6 +86,7 @@ | ||
| 86 | 86 | error: varWithFallback("error"), |
| 87 | 87 | link: varWithFallback("link"), |
| 88 | 88 | accent: varWithFallback("accent"), |
| 89 | + terminal: varWithFallback("terminal"), | |
| 89 | 90 | findMatch: { |
| 90 | 91 | DEFAULT: THEME_COLORS["find-match"].default, |
| 91 | 92 | selected: varWithFallback("find-match-selected"), |