Skip to content

Commit 764d136

Browse files
committed
Remove continueServerClientPromise
1 parent cd944cb commit 764d136

File tree

3 files changed

+3
-46
lines changed

3 files changed

+3
-46
lines changed

core/core.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
RangeInFile,
4141
type ContextItem,
4242
type ContextItemId,
43-
type IDE
43+
type IDE,
4444
} from ".";
4545

4646
import { ConfigYaml } from "@continuedev/config-yaml";
@@ -66,7 +66,6 @@ export class Core {
6666
configHandler: ConfigHandler;
6767
codeBaseIndexer: CodebaseIndexer;
6868
completionProvider: CompletionProvider;
69-
continueServerClientPromise: Promise<ContinueServerClient>;
7069
private docsService: DocsService;
7170
private globalContext = new GlobalContext();
7271
llmLogger = new LLMLogger();
@@ -165,18 +164,11 @@ export class Core {
165164
dataLogger.ideInfoPromise = ideInfoPromise;
166165
dataLogger.ideSettingsPromise = ideSettingsPromise;
167166

168-
let continueServerClientResolve: (_: any) => void | undefined;
169-
this.continueServerClientPromise = new Promise(
170-
(resolve) => (continueServerClientResolve = resolve),
171-
);
172-
173-
174167
void ideSettingsPromise.then((ideSettings) => {
175-
const continueServerClient = new ContinueServerClient(
168+
const continueServerClient = new ContinueServerClient(
176169
ideSettings.remoteConfigServerUrl,
177170
ideSettings.userToken,
178171
);
179-
continueServerClientResolve(continueServerClient);
180172

181173
// Index on initialization
182174
void this.ide.getWorkspaceDirs().then(async (dirs) => {

extensions/vscode/src/commands.ts

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,14 @@ import * as fs from "node:fs";
44
import { ContextMenuConfig, ILLM, ModelInstaller } from "core";
55
import { CompletionProvider } from "core/autocomplete/CompletionProvider";
66
import { ConfigHandler } from "core/config/ConfigHandler";
7-
import { ContinueServerClient } from "core/continueServer/stubs/client";
87
import { EXTENSION_NAME } from "core/control-plane/env";
98
import { Core } from "core/core";
10-
import { LOCAL_DEV_DATA_VERSION } from "core/data/log";
119
import { walkDirAsync } from "core/indexing/walkDir";
1210
import { isModelInstaller } from "core/llm";
1311
import { extractMinimalStackTraceInfo } from "core/util/extractMinimalStackTraceInfo";
1412
import { startLocalOllama } from "core/util/ollamaHelper";
15-
import {
16-
getConfigJsonPath,
17-
getConfigYamlPath,
18-
getDevDataFilePath,
19-
} from "core/util/paths";
13+
import { getConfigJsonPath, getConfigYamlPath } from "core/util/paths";
2014
import { Telemetry } from "core/util/posthog";
21-
import readLastLines from "read-last-lines";
2215
import * as vscode from "vscode";
2316
import * as YAML from "yaml";
2417

@@ -173,7 +166,6 @@ const getCommandsMap: (
173166
consoleView: ContinueConsoleWebviewViewProvider,
174167
configHandler: ConfigHandler,
175168
verticalDiffManager: VerticalDiffManager,
176-
continueServerClientPromise: Promise<ContinueServerClient>,
177169
battery: Battery,
178170
quickEdit: QuickEdit,
179171
core: Core,
@@ -185,7 +177,6 @@ const getCommandsMap: (
185177
consoleView,
186178
configHandler,
187179
verticalDiffManager,
188-
continueServerClientPromise,
189180
battery,
190181
quickEdit,
191182
core,
@@ -686,9 +677,6 @@ const getCommandsMap: (
686677
description:
687678
getMetaKeyLabel() + " + K, " + getMetaKeyLabel() + " + A",
688679
},
689-
{
690-
label: "$(feedback) Give feedback",
691-
},
692680
{
693681
kind: vscode.QuickPickItemKind.Separator,
694682
label: "Switch model",
@@ -721,8 +709,6 @@ const getCommandsMap: (
721709
title: selectedOption,
722710
});
723711
}
724-
} else if (selectedOption === "$(feedback) Give feedback") {
725-
vscode.commands.executeCommand("continue.giveAutocompleteFeedback");
726712
} else if (selectedOption === "$(comment) Open chat") {
727713
vscode.commands.executeCommand("continue.focusContinueInput");
728714
} else if (selectedOption === "$(screen-full) Open full screen chat") {
@@ -735,23 +721,6 @@ const getCommandsMap: (
735721
});
736722
quickPick.show();
737723
},
738-
"continue.giveAutocompleteFeedback": async () => {
739-
const feedback = await vscode.window.showInputBox({
740-
ignoreFocusOut: true,
741-
prompt:
742-
"Please share what went wrong with the last completion. The details of the completion as well as this message will be sent to the Continue team in order to improve.",
743-
});
744-
if (feedback) {
745-
const client = await continueServerClientPromise;
746-
const completionsPath = getDevDataFilePath(
747-
"autocomplete",
748-
LOCAL_DEV_DATA_VERSION,
749-
);
750-
751-
const lastLines = await readLastLines.read(completionsPath, 2);
752-
client.sendFeedback(feedback, lastLines);
753-
}
754-
},
755724
"continue.navigateTo": (path: string, toggle: boolean) => {
756725
sidebar.webviewProtocol?.request("navigateTo", { path, toggle });
757726
focusGUI();
@@ -895,7 +864,6 @@ export function registerAllCommands(
895864
consoleView: ContinueConsoleWebviewViewProvider,
896865
configHandler: ConfigHandler,
897866
verticalDiffManager: VerticalDiffManager,
898-
continueServerClientPromise: Promise<ContinueServerClient>,
899867
battery: Battery,
900868
quickEdit: QuickEdit,
901869
core: Core,
@@ -909,7 +877,6 @@ export function registerAllCommands(
909877
consoleView,
910878
configHandler,
911879
verticalDiffManager,
912-
continueServerClientPromise,
913880
battery,
914881
quickEdit,
915882
core,

extensions/vscode/src/extension/VsCodeExtension.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ export class VsCodeExtension {
244244
this.consoleView,
245245
this.configHandler,
246246
this.verticalDiffManager,
247-
// This is expected to exist, but it's no longer used? Can I remove it?
248-
this.core.continueServerClientPromise,
249247
this.battery,
250248
quickEdit,
251249
this.core,

0 commit comments

Comments
 (0)