@@ -9,8 +9,7 @@ import * as vscode from "vscode";
99import { createWorkspaceIdentifier , extractAgents } from "./api/api-helper" ;
1010import { CoderApi } from "./api/coderApi" ;
1111import { needToken } from "./api/utils" ;
12- import { BinaryManager } from "./core/binaryManager" ;
13- import { CliConfigManager } from "./core/cliConfig" ;
12+ import { CliManager } from "./core/cliManager" ;
1413import { MementoManager } from "./core/mementoManager" ;
1514import { PathResolver } from "./core/pathResolver" ;
1615import { SecretsManager } from "./core/secretsManager" ;
@@ -25,7 +24,6 @@ import {
2524} from "./workspacesProvider" ;
2625
2726export class Commands {
28- private readonly cliConfigManager : CliConfigManager ;
2927 // These will only be populated when actively connected to a workspace and are
3028 // used in commands. Because commands can be executed by the user, it is not
3129 // possible to pass in arguments, so we have to store the current workspace
@@ -44,10 +42,8 @@ export class Commands {
4442 private readonly pathResolver : PathResolver ,
4543 private readonly mementoManager : MementoManager ,
4644 private readonly secretsManager : SecretsManager ,
47- private readonly binaryManager : BinaryManager ,
48- ) {
49- this . cliConfigManager = new CliConfigManager ( pathResolver ) ;
50- }
45+ private readonly cliManager : CliManager ,
46+ ) { }
5147
5248 /**
5349 * Find the requested agent if specified, otherwise return the agent if there
@@ -209,7 +205,7 @@ export class Commands {
209205 await this . secretsManager . setSessionToken ( res . token ) ;
210206
211207 // Store on disk to be used by the cli.
212- await this . cliConfigManager . configure ( label , url , res . token ) ;
208+ await this . cliManager . configure ( label , url , res . token ) ;
213209
214210 // These contexts control various menu items and the sidebar.
215211 await vscode . commands . executeCommand (
@@ -515,7 +511,7 @@ export class Commands {
515511 if ( ! url ) {
516512 throw new Error ( "No coder url found for sidebar" ) ;
517513 }
518- const binary = await this . binaryManager . fetchBinary (
514+ const binary = await this . cliManager . fetchBinary (
519515 this . restClient ,
520516 toSafeHost ( url ) ,
521517 ) ;
0 commit comments