From 010978d4dec132b5eb8d7b72533ef7bde9e00a49 Mon Sep 17 00:00:00 2001 From: Nithish Date: Mon, 25 Mar 2024 23:33:32 +0530 Subject: [PATCH 1/3] fix issue with /edit not acknowledging highlighted code after retrying --- gui/src/components/mainInput/TipTapEditor.tsx | 3 ++- gui/src/redux/slices/stateSlice.ts | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index 80c8142ff..c10f6dc7d 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -29,7 +29,7 @@ import useHistory from "../../hooks/useHistory"; import useUpdatingRef from "../../hooks/useUpdatingRef"; import { useWebviewListener } from "../../hooks/useWebviewListener"; import { defaultModelSelector } from "../../redux/selectors/modelSelectors"; -import { setEditingContextItemAtIndex } from "../../redux/slices/stateSlice"; +import { addHighlightedCode, setEditingContextItemAtIndex } from "../../redux/slices/stateSlice"; import { RootState } from "../../redux/store"; import { isMetaEquivalentKeyPressed } from "../../util"; import { isJetBrains, postToIde } from "../../util/ide"; @@ -497,6 +497,7 @@ function TipTapEditor(props: TipTapEditorProps) { editor.commands.blur(); editor.commands.focus("end"); }, 20); + dispatch(addHighlightedCode({rangeInFileWithContents: rif, edit: true})); } setIgnoreHighlightedCode(false); }, diff --git a/gui/src/redux/slices/stateSlice.ts b/gui/src/redux/slices/stateSlice.ts index f151df3bc..9c2a1fc3e 100644 --- a/gui/src/redux/slices/stateSlice.ts +++ b/gui/src/redux/slices/stateSlice.ts @@ -239,7 +239,7 @@ export const stateSlice = createSlice({ contextItems: [], }); - state.contextItems = []; + state.contextItems = state.contextItems; state.active = true; }, initNewActiveMessage: ( @@ -262,7 +262,7 @@ export const stateSlice = createSlice({ }, contextItems: [], }); - state.contextItems = []; + state.contextItems = state.contextItems; state.active = true; }, setMessageAtIndex: ( @@ -402,7 +402,7 @@ export const stateSlice = createSlice({ const lineNums = `(${ payload.rangeInFileWithContents.range.start.line + 1 }-${payload.rangeInFileWithContents.range.end.line + 1})`; - contextItems.push({ + contextItems = [{ name: `${base} ${lineNums}`, description: payload.rangeInFileWithContents.filepath, id: { @@ -412,7 +412,7 @@ export const stateSlice = createSlice({ content: payload.rangeInFileWithContents.contents, editing: true, editable: true, - }); + }]; return { ...state, contextItems }; }, From f2c1c9d6535c951681cd969490cbf0e4f77084d8 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 28 Mar 2024 23:17:37 -0700 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9D=20explain=20where=20to=20find?= =?UTF-8?q?=20config.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/customization/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customization/overview.md b/docs/docs/customization/overview.md index 8581225b8..21620617d 100644 --- a/docs/docs/customization/overview.md +++ b/docs/docs/customization/overview.md @@ -6,7 +6,7 @@ keywords: [custom, slash commands, models, context providers] # Overview -Continue can be deeply customized by editing `~/.continue/config.json` (`%userprofile%\.continue\config.json` for Windows) and `config.ts` on your machine. These files are created the first time you run Continue. +Continue can be deeply customized by editing `~/.continue/config.json` (`%userprofile%\.continue\config.json` for Windows) and `config.ts` on your machine. These files are created the first time you run Continue. To open `config.json`, click the gear icon in the bottom right corner of the Continue sidebar. Currently, you can customize the following: From 6d02469005d4f9a609a20766ca47b8a5ce31d242 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 1 Apr 2024 12:06:46 -0700 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=A9=B9=20tweak=20/edit=20solution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/yarn.lock | 5 ----- gui/src/components/mainInput/TipTapEditor.tsx | 3 +-- gui/src/redux/slices/stateSlice.ts | 10 ++++++---- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 6ab6ac9f7..391c3c86d 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.92", + "version": "0.8.22", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.92", + "version": "0.8.22", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 9268fc252..313c3b653 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -691,11 +691,6 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== -"@lancedb/vectordb-darwin-arm64@*": - version "0.4.13" - resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.13.tgz" - integrity sha512-JfroNCG8yKIU931Y+x8d0Fp8C9DHUSC5j+CjI+e5err7rTWtie4j3JbsXlWAnPFaFEOg0Xk3BWkSikCvhPGJGg== - "@lancedb/vectordb-darwin-arm64@0.4.12": version "0.4.12" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.12.tgz" diff --git a/gui/src/components/mainInput/TipTapEditor.tsx b/gui/src/components/mainInput/TipTapEditor.tsx index c10f6dc7d..80c8142ff 100644 --- a/gui/src/components/mainInput/TipTapEditor.tsx +++ b/gui/src/components/mainInput/TipTapEditor.tsx @@ -29,7 +29,7 @@ import useHistory from "../../hooks/useHistory"; import useUpdatingRef from "../../hooks/useUpdatingRef"; import { useWebviewListener } from "../../hooks/useWebviewListener"; import { defaultModelSelector } from "../../redux/selectors/modelSelectors"; -import { addHighlightedCode, setEditingContextItemAtIndex } from "../../redux/slices/stateSlice"; +import { setEditingContextItemAtIndex } from "../../redux/slices/stateSlice"; import { RootState } from "../../redux/store"; import { isMetaEquivalentKeyPressed } from "../../util"; import { isJetBrains, postToIde } from "../../util/ide"; @@ -497,7 +497,6 @@ function TipTapEditor(props: TipTapEditorProps) { editor.commands.blur(); editor.commands.focus("end"); }, 20); - dispatch(addHighlightedCode({rangeInFileWithContents: rif, edit: true})); } setIgnoreHighlightedCode(false); }, diff --git a/gui/src/redux/slices/stateSlice.ts b/gui/src/redux/slices/stateSlice.ts index 9c2a1fc3e..b099d22a0 100644 --- a/gui/src/redux/slices/stateSlice.ts +++ b/gui/src/redux/slices/stateSlice.ts @@ -239,7 +239,8 @@ export const stateSlice = createSlice({ contextItems: [], }); - state.contextItems = state.contextItems; + // https://github.com/continuedev/continue/pull/1021 + // state.contextItems = []; state.active = true; }, initNewActiveMessage: ( @@ -262,7 +263,8 @@ export const stateSlice = createSlice({ }, contextItems: [], }); - state.contextItems = state.contextItems; + // https://github.com/continuedev/continue/pull/1021 + // state.contextItems = []; state.active = true; }, setMessageAtIndex: ( @@ -402,7 +404,7 @@ export const stateSlice = createSlice({ const lineNums = `(${ payload.rangeInFileWithContents.range.start.line + 1 }-${payload.rangeInFileWithContents.range.end.line + 1})`; - contextItems = [{ + contextItems.push({ name: `${base} ${lineNums}`, description: payload.rangeInFileWithContents.filepath, id: { @@ -412,7 +414,7 @@ export const stateSlice = createSlice({ content: payload.rangeInFileWithContents.contents, editing: true, editable: true, - }]; + }); return { ...state, contextItems }; },