remove legacy config.js

This commit is contained in:
Nate
2025-01-24 20:45:07 -08:00
parent 1a21a287c5
commit 463122ccfe
3 changed files with 4 additions and 11 deletions

View File

@@ -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,

View File

@@ -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",

View File

@@ -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}`);