Skip to content

Commit

Permalink
Merge pull request #3843 from continuedev/nate/config-js
Browse files Browse the repository at this point in the history
remove legacy config.js
  • Loading branch information
sestinj authored Jan 28, 2025
2 parents 18de35b + 463122c commit 2e4d90d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion core/continueServer/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion core/continueServer/stubs/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 2 additions & 9 deletions extensions/vscode/src/stubs/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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}`);
Expand Down

0 comments on commit 2e4d90d

Please sign in to comment.