make /init respect configured context filename and align docs with QWEN.md

This commit is contained in:
tanzhenxin
2025-08-11 11:56:12 +08:00
parent 96a9b683b2
commit 6b67cd1b57
8 changed files with 103 additions and 61 deletions

View File

@@ -1,17 +1,17 @@
# Memory Import Processor
The Memory Import Processor is a feature that allows you to modularize your GEMINI.md files by importing content from other files using the `@file.md` syntax.
The Memory Import Processor is a feature that allows you to modularize your context files (e.g., `QWEN.md`) by importing content from other files using the `@file.md` syntax.
## Overview
This feature enables you to break down large GEMINI.md files into smaller, more manageable components that can be reused across different contexts. The import processor supports both relative and absolute paths, with built-in safety features to prevent circular imports and ensure file access security.
This feature enables you to break down large context files (e.g., `QWEN.md`) into smaller, more manageable components that can be reused across different contexts. The import processor supports both relative and absolute paths, with built-in safety features to prevent circular imports and ensure file access security.
## Syntax
Use the `@` symbol followed by the path to the file you want to import:
```markdown
# Main GEMINI.md file
# Main QWEN.md file
This is the main content.
@@ -39,7 +39,7 @@ More content here.
### Basic Import
```markdown
# My GEMINI.md
# My QWEN.md
Welcome to my project!
@@ -110,13 +110,13 @@ The import processor uses the `marked` library to detect code blocks and inline
## Import Tree Structure
The processor returns an import tree that shows the hierarchy of imported files, similar to Claude's `/memory` feature. This helps users debug problems with their GEMINI.md files by showing which files were read and their import relationships.
The processor returns an import tree that shows the hierarchy of imported files. This helps users debug problems with their context files by showing which files were read and their import relationships.
Example tree structure:
```
Memory Files
L project: GEMINI.md
Memory Files
L project: QWEN.md
L a.md
L b.md
L c.md
@@ -138,7 +138,7 @@ Note: The import tree is mainly for clarity during development and has limited r
### `processImports(content, basePath, debugMode?, importState?)`
Processes import statements in GEMINI.md content.
Processes import statements in context file content.
**Parameters:**