Changesets · Branches · Tags · Compare
| Changeset | 1b82fee9b1defbbe5ab328b560f7b36c2caca337e5d3950a57fb92971c2b5bae |
|---|---|
| Author | Nate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-07-03 18:12 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-07-03 18:12 -07:00 |
| Parents | 9d00fb246880, f377ad524836 |
13 files changed
added .continue/rules/css-units.md +5 −0
| @@ -0,0 +1,5 @@ | ||
| 1 | +--- | |
| 2 | +globs: "gui/**/*.tsx" | |
| 3 | +--- | |
| 4 | + | |
| 5 | +You should try to use the `rem` CSS unit whenever possible for scalability instead of `px`. |
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/GetTheme.kt +4 −0
| @@ -166,6 +166,9 @@ | ||
| 166 | 166 | val findMatchSelectedBackground = namedColor("SearchMatch.selectedBackground") ?: |
| 167 | 167 | editorScheme.getAttributes(EditorColors.SEARCH_RESULT_ATTRIBUTES)?.backgroundColor |
| 168 | 168 | |
| 169 | + // Use editor background with slight tint for code blocks | |
| 170 | + val textCodeBlockBackground = slightChange(editorBackground, 3) ?: editorBackground | |
| 171 | + | |
| 169 | 172 | // These should match the keys in GUI's theme.ts |
| 170 | 173 | val theme = mapOf( |
| 171 | 174 | "background" to background, |
| @@ -197,6 +200,7 @@ | ||
| 197 | 200 | "warning" to warningColor, |
| 198 | 201 | "error" to errorColor, |
| 199 | 202 | "link" to link, |
| 203 | + "textCodeBlockBackground" to textCodeBlockBackground, | |
| 200 | 204 | "accent" to accentColor, |
| 201 | 205 | "find-match" to findMatchBackground, |
| 202 | 206 | "find-match-selected" to findMatchSelectedBackground, |
modified gui/src/components/Layout.tsx +1 −2
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | import { useContext, useEffect } from "react"; |
| 3 | 3 | import { Outlet, useLocation, useNavigate } from "react-router-dom"; |
| 4 | 4 | import styled from "styled-components"; |
| 5 | -import { CustomScrollbarDiv, defaultBorderRadius } from "."; | |
| 5 | +import { CustomScrollbarDiv } from "."; | |
| 6 | 6 | import { AuthProvider } from "../context/Auth"; |
| 7 | 7 | import { IdeMessengerContext } from "../context/IdeMessenger"; |
| 8 | 8 | import { LocalStorageProvider } from "../context/LocalStorage"; |
| @@ -31,7 +31,6 @@ | ||
| 31 | 31 | |
| 32 | 32 | const LayoutTopDiv = styled(CustomScrollbarDiv)` |
| 33 | 33 | height: 100%; |
| 34 | - border-radius: ${defaultBorderRadius}; | |
| 35 | 34 | position: relative; |
| 36 | 35 | overflow-x: hidden; |
| 37 | 36 | `; |
modified gui/src/components/StyledMarkdownPreview/index.tsx +1 −2
| @@ -76,7 +76,7 @@ | ||
| 76 | 76 | display: none; |
| 77 | 77 | } |
| 78 | 78 | word-wrap: break-word; |
| 79 | - border-radius: ${defaultBorderRadius}; | |
| 79 | + border-radius: 0.3125rem; | |
| 80 | 80 | background-color: ${vscEditorBackground}; |
| 81 | 81 | font-size: ${getFontSize() - 2}px; |
| 82 | 82 | font-family: var(--vscode-editor-font-family); |
| @@ -84,7 +84,6 @@ | ||
| 84 | 84 | |
| 85 | 85 | code:not(pre > code) { |
| 86 | 86 | font-family: var(--vscode-editor-font-family); |
| 87 | - color: var(--vscode-input-placeholderForeground); | |
| 88 | 87 | } |
| 89 | 88 | |
| 90 | 89 | background-color: ${(props) => props.bgColor}; |
modified gui/src/components/index.ts +4 −1
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | import styled, { keyframes } from "styled-components"; |
| 2 | 2 | import { varWithFallback } from "../styles/theme"; |
| 3 | 3 | |
| 4 | -export const defaultBorderRadius = "5px"; | |
| 4 | +export const defaultBorderRadius = "0.5rem"; | |
| 5 | 5 | export const lightGray = "#999998"; |
| 6 | 6 | export const greenButtonColor = "#189e72"; |
| 7 | 7 | |
| @@ -12,6 +12,9 @@ | ||
| 12 | 12 | export const vscButtonBackground = varWithFallback("primary-background"); |
| 13 | 13 | export const vscButtonForeground = varWithFallback("primary-foreground"); |
| 14 | 14 | export const vscEditorBackground = varWithFallback("editor-background"); |
| 15 | +export const vscTextCodeBlockBackground = varWithFallback( | |
| 16 | + "textCodeBlockBackground", | |
| 17 | +); | |
| 15 | 18 | export const vscListActiveBackground = varWithFallback("list-active"); |
| 16 | 19 | export const vscFocusBorder = varWithFallback("border-focus"); |
| 17 | 20 | export const vscListActiveForeground = varWithFallback( |
modified gui/src/components/mainInput/ContinueInputBox.tsx +2 −38
| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | import { Editor, JSONContent } from "@tiptap/react"; |
| 2 | 2 | import { ContextItemWithId, InputModifiers, RuleWithSource } from "core"; |
| 3 | 3 | import { useMemo } from "react"; |
| 4 | -import styled, { keyframes } from "styled-components"; | |
| 5 | 4 | import { defaultBorderRadius, vscBackground } from ".."; |
| 6 | 5 | import { useAppSelector } from "../../redux/hooks"; |
| 7 | 6 | import { selectSlashCommandComboBoxInputs } from "../../redux/selectors"; |
| 8 | 7 | import { ContextItemsPeek } from "./belowMainInput/ContextItemsPeek"; |
| 9 | 8 | import { RulesPeek } from "./belowMainInput/RulesPeek"; |
| 9 | +import { GradientBorder } from "./GradientBorder"; | |
| 10 | 10 | import { ToolbarOptions } from "./InputToolbar"; |
| 11 | 11 | import { Lump } from "./Lump"; |
| 12 | 12 | import { TipTapEditor } from "./TipTapEditor"; |
| @@ -38,43 +38,6 @@ | ||
| 38 | 38 | "repo-map", |
| 39 | 39 | ]; |
| 40 | 40 | |
| 41 | -const gradient = keyframes` | |
| 42 | - 0% { | |
| 43 | - background-position: 0px 0; | |
| 44 | - } | |
| 45 | - 100% { | |
| 46 | - background-position: 100em 0; | |
| 47 | - } | |
| 48 | -`; | |
| 49 | - | |
| 50 | -const GradientBorder = styled.div<{ | |
| 51 | - borderRadius?: string; | |
| 52 | - borderColor?: string; | |
| 53 | - loading: 0 | 1; | |
| 54 | -}>` | |
| 55 | - border-radius: ${(props) => props.borderRadius || "0"}; | |
| 56 | - padding: 1px; | |
| 57 | - background: ${(props) => | |
| 58 | - props.borderColor | |
| 59 | - ? props.borderColor | |
| 60 | - : `repeating-linear-gradient( | |
| 61 | - 101.79deg, | |
| 62 | - #1BBE84 0%, | |
| 63 | - #331BBE 16%, | |
| 64 | - #BE1B55 33%, | |
| 65 | - #A6BE1B 55%, | |
| 66 | - #BE1B55 67%, | |
| 67 | - #331BBE 85%, | |
| 68 | - #1BBE84 99% | |
| 69 | - )`}; | |
| 70 | - animation: ${(props) => (props.loading ? gradient : "")} 6s linear infinite; | |
| 71 | - background-size: 200% 200%; | |
| 72 | - width: 100%; | |
| 73 | - display: flex; | |
| 74 | - flex-direction: row; | |
| 75 | - align-items: center; | |
| 76 | -`; | |
| 77 | - | |
| 78 | 41 | function ContinueInputBox(props: ContinueInputBoxProps) { |
| 79 | 42 | const isStreaming = useAppSelector((state) => state.session.isStreaming); |
| 80 | 43 | const availableSlashCommands = useAppSelector( |
| @@ -146,6 +109,7 @@ | ||
| 146 | 109 | /> |
| 147 | 110 | </GradientBorder> |
| 148 | 111 | </div> |
| 112 | + | |
| 149 | 113 | {(appliedRules.length > 0 || contextItems.length > 0) && ( |
| 150 | 114 | <div className="mt-2 flex flex-col"> |
| 151 | 115 | <RulesPeek appliedRules={props.appliedRules} /> |
added gui/src/components/mainInput/GradientBorder.tsx +38 −0
| @@ -0,0 +1,38 @@ | ||
| 1 | +import styled, { keyframes } from "styled-components"; | |
| 2 | + | |
| 3 | +const gradient = keyframes` | |
| 4 | + 0% { | |
| 5 | + background-position: 0px 0; | |
| 6 | + } | |
| 7 | + 100% { | |
| 8 | + background-position: 100em 0; | |
| 9 | + } | |
| 10 | +`; | |
| 11 | + | |
| 12 | +export const GradientBorder = styled.div<{ | |
| 13 | + borderRadius?: string; | |
| 14 | + borderColor?: string; | |
| 15 | + loading: 0 | 1; | |
| 16 | +}>` | |
| 17 | + border-radius: ${(props) => props.borderRadius || "0"}; | |
| 18 | + padding: 1px; | |
| 19 | + background: ${(props) => | |
| 20 | + props.borderColor | |
| 21 | + ? props.borderColor | |
| 22 | + : `repeating-linear-gradient( | |
| 23 | + 101.79deg, | |
| 24 | + #1BBE84 0%, | |
| 25 | + #331BBE 16%, | |
| 26 | + #BE1B55 33%, | |
| 27 | + #A6BE1B 55%, | |
| 28 | + #BE1B55 67%, | |
| 29 | + #331BBE 85%, | |
| 30 | + #1BBE84 99% | |
| 31 | + )`}; | |
| 32 | + animation: ${(props) => (props.loading ? gradient : "")} 6s linear infinite; | |
| 33 | + background-size: 200% 200%; | |
| 34 | + width: 100%; | |
| 35 | + display: flex; | |
| 36 | + flex-direction: row; | |
| 37 | + align-items: center; | |
| 38 | +`; |
modified gui/src/components/mainInput/InputToolbar/EnterButton.tsx +1 −2
| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | import styled from "styled-components"; |
| 2 | 2 | import { |
| 3 | - defaultBorderRadius, | |
| 4 | 3 | lightGray, |
| 5 | 4 | vscButtonBackground, |
| 6 | 5 | vscButtonForeground, |
| @@ -18,7 +17,7 @@ | ||
| 18 | 17 | !props.disabled && props.isPrimary |
| 19 | 18 | ? vscButtonBackground |
| 20 | 19 | : lightGray + "33"}; |
| 21 | - border-radius: ${defaultBorderRadius}; | |
| 20 | + border-radius: 0.3125rem; | |
| 22 | 21 | color: ${(props) => |
| 23 | 22 | !props.disabled && props.isPrimary ? vscButtonForeground : vscForeground}; |
| 24 | 23 | cursor: pointer; |
modified gui/src/components/mainInput/Lump/index.tsx +2 −2
| @@ -10,8 +10,8 @@ | ||
| 10 | 10 | |
| 11 | 11 | const LumpDiv = styled.div` |
| 12 | 12 | background-color: ${vscInputBackground}; |
| 13 | - margin-left: 4px; | |
| 14 | - margin-right: 4px; | |
| 13 | + margin-left: 6px; | |
| 14 | + margin-right: 6px; | |
| 15 | 15 | border-radius: ${defaultBorderRadius} ${defaultBorderRadius} 0 0; |
| 16 | 16 | border-top: 1px solid ${vscCommandCenterInactiveBorder}; |
| 17 | 17 | border-left: 1px solid ${vscCommandCenterInactiveBorder}; |
modified gui/src/components/mainInput/TipTapEditor/TipTapEditor.tsx +5 −1
| @@ -179,7 +179,11 @@ | ||
| 179 | 179 | onBlur={handleBlur} |
| 180 | 180 | onKeyDown={handleKeyDown} |
| 181 | 181 | onKeyUp={handleKeyUp} |
| 182 | - className={shouldHideToolbar ? "cursor-default" : "cursor-text"} | |
| 182 | + className={ | |
| 183 | + !props.isMainInput && shouldHideToolbar | |
| 184 | + ? "cursor-pointer hover:brightness-105" | |
| 185 | + : "cursor-text" | |
| 186 | + } | |
| 183 | 187 | onClick={() => { |
| 184 | 188 | editor?.commands.focus(); |
| 185 | 189 | }} |
modified gui/src/components/mainInput/TipTapEditor/components/StyledComponents.ts +1 −2
| @@ -1,6 +1,5 @@ | ||
| 1 | 1 | import styled from "styled-components"; |
| 2 | 2 | import { |
| 3 | - defaultBorderRadius, | |
| 4 | 3 | lightGray, |
| 5 | 4 | vscBadgeBackground, |
| 6 | 5 | vscCommandCenterActiveBorder, |
| @@ -14,7 +13,7 @@ | ||
| 14 | 13 | export const InputBoxDiv = styled.div<{}>` |
| 15 | 14 | resize: none; |
| 16 | 15 | font-family: inherit; |
| 17 | - border-radius: ${defaultBorderRadius}; | |
| 16 | + border-radius: 0.5rem; | |
| 18 | 17 | padding-bottom: 1px; |
| 19 | 18 | margin: 0; |
| 20 | 19 | height: auto; |
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 | + textCodeBlockBackground: { | |
| 144 | + vars: ["--vscode-textCodeBlock-background"], | |
| 145 | + default: "#1e1e1e", // same as editor-background | |
| 146 | + }, | |
| 143 | 147 | accent: { |
| 144 | 148 | vars: ["--vscode-tab-activeBorderTop", "--vscode-focusBorder"], |
| 145 | 149 | default: "#4d8bf0", // bright blue |
modified gui/tailwind.config.cjs +1 −1
| @@ -27,7 +27,7 @@ | ||
| 27 | 27 | "spin-slow": "spin 6s linear infinite", |
| 28 | 28 | }, |
| 29 | 29 | borderRadius: { |
| 30 | - default: "5px", | |
| 30 | + default: "0.5rem", | |
| 31 | 31 | }, |
| 32 | 32 | colors: { |
| 33 | 33 | background: varWithFallback("background"), |