diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index f63cb85c1..386168550 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "1.1.10", + "version": "1.1.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "1.1.10", + "version": "1.1.11", "license": "Apache-2.0", "dependencies": { "@continuedev/fetch": "^1.0.3", @@ -171,7 +171,7 @@ "@babel/preset-env": "^7.24.7", "@biomejs/biome": "1.6.4", "@google/generative-ai": "^0.11.4", - "@types/diff": "^5.2.2", + "@types/diff": "^7.0.1", "@types/follow-redirects": "^1.14.4", "@types/jest": "^29.5.12", "@types/jquery": "^3.5.29", diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 57039e3d3..de8f5cd1e 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -283,9 +283,7 @@ async function processDiff( }); } - if (action === "accept") { - await sidebar.webviewProtocol.request("exitEditMode", undefined); - } + await sidebar.webviewProtocol.request("exitEditMode", undefined); } function waitForSidebarReady( diff --git a/gui/package-lock.json b/gui/package-lock.json index 1cbed6f46..f1812e290 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -172,7 +172,7 @@ "@babel/preset-env": "^7.24.7", "@biomejs/biome": "1.6.4", "@google/generative-ai": "^0.11.4", - "@types/diff": "^5.2.2", + "@types/diff": "^7.0.1", "@types/follow-redirects": "^1.14.4", "@types/jest": "^29.5.12", "@types/jquery": "^3.5.29", diff --git a/gui/src/components/Layout.tsx b/gui/src/components/Layout.tsx index a10fc7b6e..b098bda70 100644 --- a/gui/src/components/Layout.tsx +++ b/gui/src/components/Layout.tsx @@ -204,17 +204,21 @@ const Layout = () => { ); const isInEditMode = useAppSelector(selectIsInEditMode); - useWebviewListener("exitEditMode", async () => { - if (!isInEditMode) { - return; - } - dispatch( - loadLastSession({ - saveCurrentSession: false, - }), - ); - dispatch(exitEditMode()); - }); + useWebviewListener( + "exitEditMode", + async () => { + if (!isInEditMode) { + return; + } + dispatch( + loadLastSession({ + saveCurrentSession: false, + }), + ); + dispatch(exitEditMode()); + }, + [isInEditMode], + ); useEffect(() => { const handleKeyDown = (event: any) => { diff --git a/gui/src/components/mainInput/InputToolbar.tsx b/gui/src/components/mainInput/InputToolbar.tsx index ace2ae991..d948dc288 100644 --- a/gui/src/components/mainInput/InputToolbar.tsx +++ b/gui/src/components/mainInput/InputToolbar.tsx @@ -6,6 +6,8 @@ import styled from "styled-components"; import { defaultBorderRadius, lightGray, + vscButtonBackground, + vscButtonForeground, vscForeground, vscInputBackground, } from ".."; @@ -46,14 +48,15 @@ const StyledDiv = styled.div<{ isHidden?: boolean }>` } `; -const EnterButton = styled.button` +const EnterButton = styled.button<{ isPrimary?: boolean }>` all: unset; padding: 2px 4px; display: flex; align-items: center; - background-color: ${lightGray}33; + background-color: ${(props) => + props.isPrimary ? vscButtonBackground : lightGray + "33"}; border-radius: ${defaultBorderRadius}; - color: ${vscForeground}; + color: ${(props) => (props.isPrimary ? vscButtonForeground : vscForeground)}; cursor: pointer; :disabled { @@ -79,6 +82,7 @@ interface InputToolbarProps { activeKey: string | null; toolbarOptions?: ToolbarOptions; disabled?: boolean; + isMainInput?: boolean; } function InputToolbar(props: InputToolbarProps) { @@ -207,6 +211,7 @@ function InputToolbar(props: InputToolbarProps) { )} { if (props.onEnter) { diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 35e993a54..046da1021 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -424,7 +424,8 @@ function TipTapEditor(props: TipTapEditorProps) { }, Escape: () => { if (inDropdownRef.current || !isInEditModeRef.current) { - return false; + ideMessenger.post("focusEditor", undefined); + return true; } (async () => { await dispatch( @@ -988,6 +989,7 @@ function TipTapEditor(props: TipTapEditorProps) { }} />