mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Add UI memory indicator. (#348)
Co-authored-by: Gregory Shikhman <shikhman@google.com>
This commit is contained in:
@@ -37,6 +37,7 @@ export class Config {
|
||||
private readonly mcpServerCommand: string | undefined,
|
||||
private readonly userAgent: string,
|
||||
private userMemory: string = '', // Made mutable for refresh
|
||||
private geminiMdFileCount: number = 0,
|
||||
) {
|
||||
// toolRegistry still needs initialization based on the instance
|
||||
this.toolRegistry = createToolRegistry(this);
|
||||
@@ -89,7 +90,6 @@ export class Config {
|
||||
return this.userAgent;
|
||||
}
|
||||
|
||||
// Added getter for userMemory
|
||||
getUserMemory(): string {
|
||||
return this.userMemory;
|
||||
}
|
||||
@@ -97,6 +97,14 @@ export class Config {
|
||||
setUserMemory(newUserMemory: string): void {
|
||||
this.userMemory = newUserMemory;
|
||||
}
|
||||
|
||||
getGeminiMdFileCount(): number {
|
||||
return this.geminiMdFileCount;
|
||||
}
|
||||
|
||||
setGeminiMdFileCount(count: number): void {
|
||||
this.geminiMdFileCount = count;
|
||||
}
|
||||
}
|
||||
|
||||
function findEnvFile(startDir: string): string | null {
|
||||
@@ -139,7 +147,8 @@ export function createServerConfig(
|
||||
toolCallCommand?: string,
|
||||
mcpServerCommand?: string,
|
||||
userAgent?: string,
|
||||
userMemory?: string, // Added userMemory parameter
|
||||
userMemory?: string,
|
||||
geminiMdFileCount?: number,
|
||||
): Config {
|
||||
return new Config(
|
||||
apiKey,
|
||||
@@ -153,7 +162,8 @@ export function createServerConfig(
|
||||
toolCallCommand,
|
||||
mcpServerCommand,
|
||||
userAgent ?? 'GeminiCLI/unknown', // Default user agent
|
||||
userMemory ?? '', // Pass userMemory, default to empty string
|
||||
userMemory ?? '',
|
||||
geminiMdFileCount ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user