Remove continueServerClientPromise

This commit is contained in:
chezsmithy 2025-06-02 13:02:48 -07:00
parent cd944cb220
commit 764d136633
3 changed files with 3 additions and 46 deletions

View file

@ -40,7 +40,7 @@ import {
RangeInFile,
type ContextItem,
type ContextItemId,
type IDE
type IDE,
} from ".";
import { ConfigYaml } from "@continuedev/config-yaml";
@ -66,7 +66,6 @@ export class Core {
configHandler: ConfigHandler;
codeBaseIndexer: CodebaseIndexer;
completionProvider: CompletionProvider;
continueServerClientPromise: Promise<ContinueServerClient>;
private docsService: DocsService;
private globalContext = new GlobalContext();
llmLogger = new LLMLogger();
@ -165,18 +164,11 @@ export class Core {
dataLogger.ideInfoPromise = ideInfoPromise;
dataLogger.ideSettingsPromise = ideSettingsPromise;
let continueServerClientResolve: (_: any) => void | undefined;
this.continueServerClientPromise = new Promise(
(resolve) => (continueServerClientResolve = resolve),
);
void ideSettingsPromise.then((ideSettings) => {
const continueServerClient = new ContinueServerClient(
const continueServerClient = new ContinueServerClient(
ideSettings.remoteConfigServerUrl,
ideSettings.userToken,
);
continueServerClientResolve(continueServerClient);
// Index on initialization
void this.ide.getWorkspaceDirs().then(async (dirs) => {

View file

@ -4,21 +4,14 @@ import * as fs from "node:fs";
import { ContextMenuConfig, ILLM, ModelInstaller } from "core";
import { CompletionProvider } from "core/autocomplete/CompletionProvider";
import { ConfigHandler } from "core/config/ConfigHandler";
import { ContinueServerClient } from "core/continueServer/stubs/client";
import { EXTENSION_NAME } from "core/control-plane/env";
import { Core } from "core/core";
import { LOCAL_DEV_DATA_VERSION } from "core/data/log";
import { walkDirAsync } from "core/indexing/walkDir";
import { isModelInstaller } from "core/llm";
import { extractMinimalStackTraceInfo } from "core/util/extractMinimalStackTraceInfo";
import { startLocalOllama } from "core/util/ollamaHelper";
import {
getConfigJsonPath,
getConfigYamlPath,
getDevDataFilePath,
} from "core/util/paths";
import { getConfigJsonPath, getConfigYamlPath } from "core/util/paths";
import { Telemetry } from "core/util/posthog";
import readLastLines from "read-last-lines";
import * as vscode from "vscode";
import * as YAML from "yaml";
@ -173,7 +166,6 @@ const getCommandsMap: (
consoleView: ContinueConsoleWebviewViewProvider,
configHandler: ConfigHandler,
verticalDiffManager: VerticalDiffManager,
continueServerClientPromise: Promise<ContinueServerClient>,
battery: Battery,
quickEdit: QuickEdit,
core: Core,
@ -185,7 +177,6 @@ const getCommandsMap: (
consoleView,
configHandler,
verticalDiffManager,
continueServerClientPromise,
battery,
quickEdit,
core,
@ -686,9 +677,6 @@ const getCommandsMap: (
description:
getMetaKeyLabel() + " + K, " + getMetaKeyLabel() + " + A",
},
{
label: "$(feedback) Give feedback",
},
{
kind: vscode.QuickPickItemKind.Separator,
label: "Switch model",
@ -721,8 +709,6 @@ const getCommandsMap: (
title: selectedOption,
});
}
} else if (selectedOption === "$(feedback) Give feedback") {
vscode.commands.executeCommand("continue.giveAutocompleteFeedback");
} else if (selectedOption === "$(comment) Open chat") {
vscode.commands.executeCommand("continue.focusContinueInput");
} else if (selectedOption === "$(screen-full) Open full screen chat") {
@ -735,23 +721,6 @@ const getCommandsMap: (
});
quickPick.show();
},
"continue.giveAutocompleteFeedback": async () => {
const feedback = await vscode.window.showInputBox({
ignoreFocusOut: true,
prompt:
"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.",
});
if (feedback) {
const client = await continueServerClientPromise;
const completionsPath = getDevDataFilePath(
"autocomplete",
LOCAL_DEV_DATA_VERSION,
);
const lastLines = await readLastLines.read(completionsPath, 2);
client.sendFeedback(feedback, lastLines);
}
},
"continue.navigateTo": (path: string, toggle: boolean) => {
sidebar.webviewProtocol?.request("navigateTo", { path, toggle });
focusGUI();
@ -895,7 +864,6 @@ export function registerAllCommands(
consoleView: ContinueConsoleWebviewViewProvider,
configHandler: ConfigHandler,
verticalDiffManager: VerticalDiffManager,
continueServerClientPromise: Promise<ContinueServerClient>,
battery: Battery,
quickEdit: QuickEdit,
core: Core,
@ -909,7 +877,6 @@ export function registerAllCommands(
consoleView,
configHandler,
verticalDiffManager,
continueServerClientPromise,
battery,
quickEdit,
core,

View file

@ -244,8 +244,6 @@ export class VsCodeExtension {
this.consoleView,
this.configHandler,
this.verticalDiffManager,
// This is expected to exist, but it's no longer used? Can I remove it?
this.core.continueServerClientPromise,
this.battery,
quickEdit,
this.core,