mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 17:27:54 +00:00
This commit introduces the hierarchical memory feature, allowing GEMI… (#327)
This commit is contained in:
@@ -36,6 +36,7 @@ export class Config {
|
||||
private readonly toolCallCommand: string | undefined,
|
||||
private readonly mcpServerCommand: string | undefined,
|
||||
private readonly userAgent: string,
|
||||
private userMemory: string = '', // Made mutable for refresh
|
||||
) {
|
||||
// toolRegistry still needs initialization based on the instance
|
||||
this.toolRegistry = createToolRegistry(this);
|
||||
@@ -87,6 +88,15 @@ export class Config {
|
||||
getUserAgent(): string {
|
||||
return this.userAgent;
|
||||
}
|
||||
|
||||
// Added getter for userMemory
|
||||
getUserMemory(): string {
|
||||
return this.userMemory;
|
||||
}
|
||||
|
||||
setUserMemory(newUserMemory: string): void {
|
||||
this.userMemory = newUserMemory;
|
||||
}
|
||||
}
|
||||
|
||||
function findEnvFile(startDir: string): string | null {
|
||||
@@ -129,6 +139,7 @@ export function createServerConfig(
|
||||
toolCallCommand?: string,
|
||||
mcpServerCommand?: string,
|
||||
userAgent?: string,
|
||||
userMemory?: string, // Added userMemory parameter
|
||||
): Config {
|
||||
return new Config(
|
||||
apiKey,
|
||||
@@ -142,6 +153,7 @@ export function createServerConfig(
|
||||
toolCallCommand,
|
||||
mcpServerCommand,
|
||||
userAgent ?? 'GeminiCLI/unknown', // Default user agent
|
||||
userMemory ?? '', // Pass userMemory, default to empty string
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user