diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 6a5ed9919..3b85fa5d0 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -12,7 +12,6 @@ "@electron/rebuild": "^3.2.10", "@reduxjs/toolkit": "^1.9.3", "axios": "^1.2.5", - "cargo-cp-artifact": "^0.1", "core": "file:../../core", "cors": "^2.8.5", "downshift": "^7.6.0", @@ -75,7 +74,6 @@ "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "cargo-cp-artifact": "^0.1", "dotenv": "^16.3.1", "handlebars": "^4.7.8", "js-tiktoken": "^1.0.8", @@ -2473,14 +2471,6 @@ "node": ">= 6" } }, - "node_modules/cargo-cp-artifact": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz", - "integrity": "sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==", - "bin": { - "cargo-cp-artifact": "bin/cargo-cp-artifact.js" - } - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -11475,11 +11465,6 @@ "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz", "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==" }, - "cargo-cp-artifact": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz", - "integrity": "sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA==" - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", diff --git a/extensions/vscode/src/continueIdeClient.ts b/extensions/vscode/src/continueIdeClient.ts index 1e32eedcc..6cbe1de57 100644 --- a/extensions/vscode/src/continueIdeClient.ts +++ b/extensions/vscode/src/continueIdeClient.ts @@ -1,4 +1,6 @@ import { FileEdit, RangeInFile } from "core/types"; +import { getConfigJsonPath } from "core/util/paths"; +import { readFileSync } from "fs"; import * as vscode from "vscode"; import { windowId } from "./activation/activate"; import { debugPanelWebview, getSidebarContent } from "./debugPanel"; @@ -39,9 +41,15 @@ class IdeProtocolClient { // Listen for file saving vscode.workspace.onDidSaveTextDocument((event) => { const filepath = event.uri.fsPath; - const contents = event.getText(); - const config = JSON.parse(contents); - this.configUpdate(config); + + if ( + filepath.endsWith(".continue/config.json") || + filepath.endsWith(".continue\\config.json") + ) { + const config = readFileSync(getConfigJsonPath(), "utf8"); + const configJson = JSON.parse(config); + this.configUpdate(configJson); + } }); // Register a content provider for the readonly virtual documents diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index 6965ec9b1..577255cc9 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -1146,11 +1146,6 @@ camelcase@^6.0.0: resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -cargo-cp-artifact@^0.1: - version "0.1.8" - resolved "https://registry.npmjs.org/cargo-cp-artifact/-/cargo-cp-artifact-0.1.8.tgz" - integrity sha512-3j4DaoTrsCD1MRkTF2Soacii0Nx7UHCce0EwUf4fHnggwiE4fbmF2AbnfzayR36DF8KGadfh7M/Yfy625kgPlA== - caseless@~0.12.0: version "0.12.0" resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" diff --git a/gui/package-lock.json b/gui/package-lock.json index 1f803becd..ed39a2b75 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -60,7 +60,6 @@ "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "cargo-cp-artifact": "^0.1", "dotenv": "^16.3.1", "handlebars": "^4.7.8", "js-tiktoken": "^1.0.8", diff --git a/gui/src/hooks/useChatHandler.ts b/gui/src/hooks/useChatHandler.ts index 9a7f0cf90..021d6c8c8 100644 --- a/gui/src/hooks/useChatHandler.ts +++ b/gui/src/hooks/useChatHandler.ts @@ -156,6 +156,7 @@ function useChatHandler(dispatch: Dispatch) { dispatch(setInactive()); } catch (e) { + console.log("Continue: error streaming response: ", e); errorPopup(e.message); } } diff --git a/gui/src/redux/slices/stateSlice.ts b/gui/src/redux/slices/stateSlice.ts index ca08f9170..6927f1835 100644 --- a/gui/src/redux/slices/stateSlice.ts +++ b/gui/src/redux/slices/stateSlice.ts @@ -109,7 +109,11 @@ export const stateSlice = createSlice({ }; }, addLogs: (state, { payload }: { payload: [string, string][] }) => { - state.history[state.history.length - 1].promptLogs.push(...payload); + if (state.history[state.history.length - 1].promptLogs) { + state.history[state.history.length - 1].promptLogs.push(...payload); + } else { + state.history[state.history.length - 1].promptLogs = payload; + } }, addContextItemsAtIndex: (state, action) => { if (action.payload.index < state.history.length) {