mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-22 01:37:50 +00:00
feat: add --show_memory_usage flag to display memory usage in status bar (#606)
This commit is contained in:
@@ -54,6 +54,7 @@ export interface ConfigParameters {
|
||||
geminiMdFileCount?: number;
|
||||
alwaysSkipModificationConfirmation?: boolean;
|
||||
vertexai?: boolean;
|
||||
showMemoryUsage?: boolean;
|
||||
}
|
||||
|
||||
export class Config {
|
||||
@@ -75,6 +76,7 @@ export class Config {
|
||||
private geminiMdFileCount: number;
|
||||
private alwaysSkipModificationConfirmation: boolean;
|
||||
private readonly vertexai: boolean | undefined;
|
||||
private readonly showMemoryUsage: boolean;
|
||||
|
||||
constructor(params: ConfigParameters) {
|
||||
this.apiKey = params.apiKey;
|
||||
@@ -95,6 +97,7 @@ export class Config {
|
||||
this.alwaysSkipModificationConfirmation =
|
||||
params.alwaysSkipModificationConfirmation ?? false;
|
||||
this.vertexai = params.vertexai;
|
||||
this.showMemoryUsage = params.showMemoryUsage ?? false;
|
||||
|
||||
this.toolRegistry = createToolRegistry(this);
|
||||
}
|
||||
@@ -181,6 +184,10 @@ export class Config {
|
||||
getVertexAI(): boolean | undefined {
|
||||
return this.vertexai;
|
||||
}
|
||||
|
||||
getShowMemoryUsage(): boolean {
|
||||
return this.showMemoryUsage;
|
||||
}
|
||||
}
|
||||
|
||||
function findEnvFile(startDir: string): string | null {
|
||||
|
||||
Reference in New Issue
Block a user