summaryrefslogtreecommitdiff
path: root/extension/src/bridge.ts
blob: 0d665826868ff76a17fe33ce68d25c7ae884b910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import * as vscode from "vscode";
import { extensionContext } from "./activation/activate";

export function getContinueServerUrl() {
  // If in debug mode, always use 8001
  if (
    extensionContext &&
    extensionContext.extensionMode === vscode.ExtensionMode.Development
  ) {
    return "http://localhost:8001";
  }
  return (
    vscode.workspace.getConfiguration("continue").get<string>("serverUrl") ||
    "http://localhost:65432"
  );
}