Changesets · Branches · Tags · Compare
| Changeset | cf44248155ac366c39a34e10d2ebf962c105ae8bd6e9f61b03a1be8b5fbc9fd4 |
|---|---|
| Author | chezsmithy <chezsmithy@me.com> · 2025-08-26 23:34 -07:00 |
| Committer | chezsmithy <chezsmithy@me.com> · 2025-08-26 23:34 -07:00 |
| Parents | c24a0eea7573 |
1 file changed
modified gui/src/components/UnifiedTerminal/UnifiedTerminal.tsx +17 −44
| @@ -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,11 @@ | ||
| 69 | 63 | |
| 70 | 64 | const StyledTerminalContainer = styled.div<{ |
| 71 | 65 | fontSize?: number; |
| 72 | - bgColor: string; | |
| 73 | 66 | }>` |
| 74 | - background-color: ${(props) => props.bgColor}; | |
| 75 | - font-family: | |
| 76 | - var(--vscode-font-family), | |
| 77 | - system-ui, | |
| 78 | - -apple-system, | |
| 79 | - BlinkMacSystemFont, | |
| 80 | - "Segoe UI", | |
| 81 | - Roboto, | |
| 82 | - Oxygen, | |
| 83 | - Ubuntu, | |
| 84 | - Cantarell, | |
| 85 | - "Open Sans", | |
| 86 | - "Helvetica Neue", | |
| 87 | - sans-serif; | |
| 67 | + background-color: var(--background); | |
| 68 | + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; | |
| 88 | 69 | font-size: ${(props) => props.fontSize || getFontSize()}px; |
| 89 | - color: ${vscForeground}; | |
| 70 | + color: var(--foreground); | |
| 90 | 71 | line-height: 1.5; |
| 91 | 72 | |
| 92 | 73 | > *:last-child { |
| @@ -109,27 +90,18 @@ | ||
| 109 | 90 | display: none; |
| 110 | 91 | } |
| 111 | 92 | word-wrap: break-word; |
| 112 | - border-radius: ${defaultBorderRadius}; | |
| 113 | - background-color: ${vscEditorBackground}; | |
| 93 | + border-radius: 0.5rem; | |
| 94 | + background-color: var(--editor-background); | |
| 114 | 95 | font-size: ${getFontSize() - 2}px; |
| 115 | - font-family: var(--vscode-editor-font-family); | |
| 96 | + font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; | |
| 116 | 97 | } |
| 117 | 98 | |
| 118 | 99 | code:not(pre > code) { |
| 119 | - font-family: var(--vscode-editor-font-family); | |
| 120 | - color: var(--vscode-input-placeholderForeground); | |
| 100 | + font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; | |
| 101 | + color: var(--input-placeholder); | |
| 121 | 102 | } |
| 122 | 103 | `; |
| 123 | 104 | |
| 124 | -const ToolbarContainer = styled.div<{ isExpanded: boolean }>` | |
| 125 | - font-size: ${getFontSize() - 2}px; | |
| 126 | -`; | |
| 127 | - | |
| 128 | -const CommandLine = styled.div` | |
| 129 | - padding-bottom: 0.5rem; | |
| 130 | - color: var(--vscode-terminal-ansiGreen, #0dbc79); | |
| 131 | -`; | |
| 132 | - | |
| 133 | 105 | function ansiToJSON( |
| 134 | 106 | input: string, |
| 135 | 107 | use_classes: boolean = false, |
| @@ -434,7 +406,6 @@ | ||
| 434 | 406 | return ( |
| 435 | 407 | <StyledTerminalContainer |
| 436 | 408 | fontSize={getFontSize()} |
| 437 | - bgColor={vscBackground} | |
| 438 | 409 | className="mb-4" |
| 439 | 410 | > |
| 440 | 411 | <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 @@ | ||
| 450 | 421 | <div className="flex max-w-[50%] flex-row items-center"> |
| 451 | 422 | <ChevronDownIcon |
| 452 | 423 | onClick={() => setIsExpanded(!isExpanded)} |
| 453 | - className={`text-lightgray h-3.5 w-3.5 flex-shrink-0 cursor-pointer hover:brightness-125 ${ | |
| 424 | + className={`text-description h-3.5 w-3.5 flex-shrink-0 cursor-pointer hover:brightness-125 ${ | |
| 454 | 425 | isExpanded ? "rotate-0" : "-rotate-90" |
| 455 | 426 | }`} |
| 456 | 427 | /> |
| 457 | - <span className="text-lightgray ml-2 select-none">Terminal</span> | |
| 428 | + <span className="text-description ml-2 select-none">Terminal</span> | |
| 458 | 429 | </div> |
| 459 | 430 | |
| 460 | 431 | <div className="flex items-center gap-2.5"> |
| @@ -474,8 +445,7 @@ | ||
| 474 | 445 | <code> |
| 475 | 446 | {/* Command is always visible */} |
| 476 | 447 | <div |
| 477 | - className="pb-2" | |
| 478 | - style={{ color: "var(--vscode-terminal-ansiGreen, #0DBC79)" }} | |
| 448 | + className="pb-2 text-terminal" | |
| 479 | 449 | > |
| 480 | 450 | $ {command} |
| 481 | 451 | </div> |
| @@ -528,7 +498,10 @@ | ||
| 528 | 498 | |
| 529 | 499 | {/* Status information */} |
| 530 | 500 | {(statusMessage || isRunning) && ( |
| 531 | - <div className="text-description mt-2 flex items-center px-2 pb-2 text-xs"> | |
| 501 | + <div | |
| 502 | + className="text-description flex items-center px-2 pb-2 pt-2 text-xs" | |
| 503 | + style={{ borderTop: '1px solid var(--vscode-commandCenter-inactiveBorder, #555555)' }} | |
| 504 | + > | |
| 532 | 505 | <StatusIcon status={statusType} /> |
| 533 | 506 | {isRunning ? "Running" : statusMessage} |
| 534 | 507 | {isRunning && toolCallId && ( |