mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
feat: add --show_memory_usage flag to display memory usage in status bar (#606)
This commit is contained in:
parent
3291ffbe09
commit
01768d7759
10 changed files with 205 additions and 12 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue