refactor: rename GEMINI.md to QWEN.md across the codebase

This commit is contained in:
AstroAir
2025-08-09 10:33:02 +08:00
parent c09abb817f
commit 4807434d9f
10 changed files with 41 additions and 41 deletions

View File

@@ -20,7 +20,7 @@ vi.mock('fs', () => ({
describe('initCommand', () => {
let mockContext: CommandContext;
const targetDir = '/test/dir';
const geminiMdPath = path.join(targetDir, 'GEMINI.md');
const geminiMdPath = path.join(targetDir, 'QWEN.md');
beforeEach(() => {
// Create a fresh mock context for each test
@@ -38,7 +38,7 @@ describe('initCommand', () => {
vi.clearAllMocks();
});
it('should inform the user if GEMINI.md already exists', async () => {
it('should inform the user if QWEN.md already exists', async () => {
// Arrange: Simulate that the file exists
vi.mocked(fs.existsSync).mockReturnValue(true);
@@ -50,13 +50,13 @@ describe('initCommand', () => {
type: 'message',
messageType: 'info',
content:
'A GEMINI.md file already exists in this directory. No changes were made.',
'A QWEN.md file already exists in this directory. No changes were made.',
});
// Assert: Ensure no file was written
expect(fs.writeFileSync).not.toHaveBeenCalled();
});
it('should create GEMINI.md and submit a prompt if it does not exist', async () => {
it('should create QWEN.md and submit a prompt if it does not exist', async () => {
// Arrange: Simulate that the file does not exist
vi.mocked(fs.existsSync).mockReturnValue(false);
@@ -70,7 +70,7 @@ describe('initCommand', () => {
expect(mockContext.ui.addItem).toHaveBeenCalledWith(
{
type: 'info',
text: 'Empty GEMINI.md created. Now analyzing the project to populate it.',
text: 'Empty QWEN.md created. Now analyzing the project to populate it.',
},
expect.any(Number),
);

View File

@@ -15,7 +15,7 @@ import {
export const initCommand: SlashCommand = {
name: 'init',
description: 'Analyzes the project and creates a tailored GEMINI.md file.',
description: 'Analyzes the project and creates a tailored QWEN.md file.',
kind: CommandKind.BUILT_IN,
action: async (
context: CommandContext,
@@ -29,24 +29,24 @@ export const initCommand: SlashCommand = {
};
}
const targetDir = context.services.config.getTargetDir();
const geminiMdPath = path.join(targetDir, 'GEMINI.md');
const geminiMdPath = path.join(targetDir, 'QWEN.md');
if (fs.existsSync(geminiMdPath)) {
return {
type: 'message',
messageType: 'info',
content:
'A GEMINI.md file already exists in this directory. No changes were made.',
'A QWEN.md file already exists in this directory. No changes were made.',
};
}
// Create an empty GEMINI.md file
// Create an empty QWEN.md file
fs.writeFileSync(geminiMdPath, '', 'utf8');
context.ui.addItem(
{
type: 'info',
text: 'Empty GEMINI.md created. Now analyzing the project to populate it.',
text: 'Empty QWEN.md created. Now analyzing the project to populate it.',
},
Date.now(),
);
@@ -54,7 +54,7 @@ export const initCommand: SlashCommand = {
return {
type: 'submit_prompt',
content: `
You are an AI agent that brings the power of Gemini directly into the terminal. Your task is to analyze the current directory and generate a comprehensive GEMINI.md file to be used as instructional context for future interactions.
You are an AI agent that brings the power of Gemini directly into the terminal. Your task is to analyze the current directory and generate a comprehensive QWEN.md file to be used as instructional context for future interactions.
**Analysis Process:**
@@ -70,7 +70,7 @@ You are an AI agent that brings the power of Gemini directly into the terminal.
* **Code Project:** Look for clues like \`package.json\`, \`requirements.txt\`, \`pom.xml\`, \`go.mod\`, \`Cargo.toml\`, \`build.gradle\`, or a \`src\` directory. If you find them, this is likely a software project.
* **Non-Code Project:** If you don't find code-related files, this might be a directory for documentation, research papers, notes, or something else.
**GEMINI.md Content Generation:**
**QWEN.md Content Generation:**
**For a Code Project:**
@@ -86,7 +86,7 @@ You are an AI agent that brings the power of Gemini directly into the terminal.
**Final Output:**
Write the complete content to the \`GEMINI.md\` file. The output must be well-formatted Markdown.
Write the complete content to the \`QWEN.md\` file. The output must be well-formatted Markdown.
`,
};
},