mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
[ide-mode] Create an IDE manager class to handle connecting to and exposing methods from the IDE server (#4797)
This commit is contained in:
@@ -45,6 +45,7 @@ import {
|
||||
import { ClearcutLogger } from '../telemetry/clearcut-logger/clearcut-logger.js';
|
||||
import { shouldAttemptBrowserLaunch } from '../utils/browser.js';
|
||||
import { MCPOAuthConfig } from '../mcp/oauth-provider.js';
|
||||
import { IdeClient } from '../ide/ide-client.js';
|
||||
|
||||
// Re-export OAuth config type
|
||||
export type { MCPOAuthConfig };
|
||||
@@ -180,6 +181,7 @@ export interface ConfigParameters {
|
||||
noBrowser?: boolean;
|
||||
summarizeToolOutput?: Record<string, SummarizeToolOutputSettings>;
|
||||
ideMode?: boolean;
|
||||
ideClient?: IdeClient;
|
||||
}
|
||||
|
||||
export class Config {
|
||||
@@ -221,6 +223,7 @@ export class Config {
|
||||
private readonly extensionContextFilePaths: string[];
|
||||
private readonly noBrowser: boolean;
|
||||
private readonly ideMode: boolean;
|
||||
private readonly ideClient: IdeClient | undefined;
|
||||
private modelSwitchedDuringSession: boolean = false;
|
||||
private readonly maxSessionTurns: number;
|
||||
private readonly listExtensions: boolean;
|
||||
@@ -286,6 +289,7 @@ export class Config {
|
||||
this.noBrowser = params.noBrowser ?? false;
|
||||
this.summarizeToolOutput = params.summarizeToolOutput;
|
||||
this.ideMode = params.ideMode ?? false;
|
||||
this.ideClient = params.ideClient;
|
||||
|
||||
if (params.contextFileName) {
|
||||
setGeminiMdFilename(params.contextFileName);
|
||||
@@ -574,6 +578,10 @@ export class Config {
|
||||
return this.ideMode;
|
||||
}
|
||||
|
||||
getIdeClient(): IdeClient | undefined {
|
||||
return this.ideClient;
|
||||
}
|
||||
|
||||
async getGitService(): Promise<GitService> {
|
||||
if (!this.gitService) {
|
||||
this.gitService = new GitService(this.targetDir);
|
||||
|
||||
Reference in New Issue
Block a user