remove legacy config.js
This commit is contained in:
@@ -22,7 +22,7 @@ export interface IContinueServerClient {
|
||||
connected: boolean;
|
||||
url: URL | undefined;
|
||||
getUserToken(): string | undefined;
|
||||
getConfig(): Promise<{ configJson: string; configJs: string }>;
|
||||
getConfig(): Promise<{ configJson: string }>;
|
||||
getFromIndexCache<T extends ArtifactType>(
|
||||
keys: string[],
|
||||
artifactId: T,
|
||||
|
||||
@@ -30,7 +30,7 @@ export class ContinueServerClient implements IContinueServerClient {
|
||||
return this.url !== undefined && this.userToken !== undefined;
|
||||
}
|
||||
|
||||
public async getConfig(): Promise<{ configJson: string; configJs: string }> {
|
||||
public async getConfig(): Promise<{ configJson: string }> {
|
||||
const userToken = await this.userToken;
|
||||
const response = await fetch(new URL("sync", this.url).href, {
|
||||
method: "GET",
|
||||
|
||||
@@ -2,10 +2,7 @@ import * as fs from "fs";
|
||||
|
||||
import { ContinueServerClient } from "core/continueServer/stubs/client";
|
||||
import { EXTENSION_NAME } from "core/control-plane/env";
|
||||
import {
|
||||
getConfigJsPathForRemote,
|
||||
getConfigJsonPathForRemote,
|
||||
} from "core/util/paths";
|
||||
import { getConfigJsonPathForRemote } from "core/util/paths";
|
||||
import * as vscode from "vscode";
|
||||
|
||||
import { CONTINUE_WORKSPACE_KEY } from "../util/workspaceConfig";
|
||||
@@ -126,16 +123,12 @@ export class RemoteConfigSync {
|
||||
remoteConfigServerUrl.toString(),
|
||||
userToken,
|
||||
);
|
||||
const { configJson, configJs } = await client.getConfig();
|
||||
const { configJson } = await client.getConfig();
|
||||
|
||||
fs.writeFileSync(
|
||||
getConfigJsonPathForRemote(remoteConfigServerUrl),
|
||||
configJson,
|
||||
);
|
||||
fs.writeFileSync(
|
||||
getConfigJsPathForRemote(remoteConfigServerUrl),
|
||||
configJs,
|
||||
);
|
||||
this.triggerReloadConfig();
|
||||
} catch (e) {
|
||||
vscode.window.showWarningMessage(`Failed to sync remote config: ${e}`);
|
||||
|
||||
Reference in New Issue
Block a user