mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
refactor: rename GEMINI.md to QWEN.md across the codebase
This commit is contained in:
@@ -60,8 +60,8 @@ vi.mock('../tools/read-many-files');
|
||||
vi.mock('../tools/memoryTool', () => ({
|
||||
MemoryTool: vi.fn(),
|
||||
setGeminiMdFilename: vi.fn(),
|
||||
getCurrentGeminiMdFilename: vi.fn(() => 'GEMINI.md'), // Mock the original filename
|
||||
DEFAULT_CONTEXT_FILENAME: 'GEMINI.md',
|
||||
getCurrentGeminiMdFilename: vi.fn(() => 'QWEN.md'), // Mock the original filename
|
||||
DEFAULT_CONTEXT_FILENAME: 'QWEN.md',
|
||||
GEMINI_CONFIG_DIR: '.gemini',
|
||||
}));
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ export const GEMINI_CONFIG_DIR = '.qwen';
|
||||
export const DEFAULT_CONTEXT_FILENAME = 'QWEN.md';
|
||||
export const MEMORY_SECTION_HEADER = '## Qwen Added Memories';
|
||||
|
||||
// This variable will hold the currently configured filename for GEMINI.md context files.
|
||||
// This variable will hold the currently configured filename for QWEN.md context files.
|
||||
// It defaults to DEFAULT_CONTEXT_FILENAME but can be overridden by setGeminiMdFilename.
|
||||
let currentGeminiMdFilename: string | string[] = DEFAULT_CONTEXT_FILENAME;
|
||||
|
||||
|
||||
@@ -202,8 +202,8 @@ describe('bfsFileSearch', () => {
|
||||
await createEmptyDir(`dir${i}`, 'subdir1', 'deep');
|
||||
if (i < 10) {
|
||||
// Add target files in some directories
|
||||
await createTestFile('content', `dir${i}`, 'GEMINI.md');
|
||||
await createTestFile('content', `dir${i}`, 'subdir1', 'GEMINI.md');
|
||||
await createTestFile('content', `dir${i}`, 'QWEN.md');
|
||||
await createTestFile('content', `dir${i}`, 'subdir1', 'QWEN.md');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ describe('bfsFileSearch', () => {
|
||||
for (let i = 0; i < iterations; i++) {
|
||||
const searchStartTime = performance.now();
|
||||
const result = await bfsFileSearch(testRootDir, {
|
||||
fileName: 'GEMINI.md',
|
||||
fileName: 'QWEN.md',
|
||||
maxDirs: 200,
|
||||
debug: false,
|
||||
});
|
||||
@@ -242,7 +242,7 @@ describe('bfsFileSearch', () => {
|
||||
console.log(
|
||||
`📊 Min/Max Duration: ${minDuration.toFixed(2)}ms / ${maxDuration.toFixed(2)}ms`,
|
||||
);
|
||||
console.log(`📁 Found ${foundFiles} GEMINI.md files`);
|
||||
console.log(`📁 Found ${foundFiles} QWEN.md files`);
|
||||
console.log(
|
||||
`🏎️ Processing ~${Math.round(200 / (avgDuration / 1000))} dirs/second`,
|
||||
);
|
||||
|
||||
@@ -365,7 +365,7 @@ My code memory
|
||||
|
||||
it('should load extension context file paths', async () => {
|
||||
const extensionFilePath = await createTestFile(
|
||||
path.join(testRootDir, 'extensions/ext1/GEMINI.md'),
|
||||
path.join(testRootDir, 'extensions/ext1/QWEN.md'),
|
||||
'Extension memory content',
|
||||
);
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ function concatenateInstructions(
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads hierarchical GEMINI.md files and concatenates their content.
|
||||
* Loads hierarchical QWEN.md files and concatenates their content.
|
||||
* This function is intended for use by the server.
|
||||
*/
|
||||
export async function loadServerHierarchicalMemory(
|
||||
@@ -282,7 +282,7 @@ export async function loadServerHierarchicalMemory(
|
||||
maxDirs,
|
||||
);
|
||||
if (filePaths.length === 0) {
|
||||
if (debugMode) logger.debug('No GEMINI.md files found in hierarchy.');
|
||||
if (debugMode) logger.debug('No QWEN.md files found in hierarchy.');
|
||||
return { memoryContent: '', fileCount: 0 };
|
||||
}
|
||||
const contentsWithPaths = await readGeminiMdFiles(
|
||||
|
||||
@@ -191,7 +191,7 @@ function findCodeRegions(content: string): Array<[number, number]> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes import statements in GEMINI.md content
|
||||
* Processes import statements in QWEN.md content
|
||||
* Supports @path/to/file syntax for importing content from other files
|
||||
* @param content - The content to process for imports
|
||||
* @param basePath - The directory path where the current file is located
|
||||
|
||||
Reference in New Issue
Block a user