mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
Extensibility: Gemini.md files (#944)
This commit is contained in:
parent
24c61147b8
commit
4160d904da
7 changed files with 139 additions and 27 deletions
|
|
@ -112,6 +112,7 @@ async function parseArguments(): Promise<CliArgs> {
|
|||
export async function loadHierarchicalGeminiMemory(
|
||||
currentWorkingDirectory: string,
|
||||
debugMode: boolean,
|
||||
extensionContextFilePaths: string[] = [],
|
||||
): Promise<{ memoryContent: string; fileCount: number }> {
|
||||
if (debugMode) {
|
||||
logger.debug(
|
||||
|
|
@ -120,7 +121,11 @@ export async function loadHierarchicalGeminiMemory(
|
|||
}
|
||||
// Directly call the server function.
|
||||
// The server function will use its own homedir() for the global path.
|
||||
return loadServerHierarchicalMemory(currentWorkingDirectory, debugMode);
|
||||
return loadServerHierarchicalMemory(
|
||||
currentWorkingDirectory,
|
||||
debugMode,
|
||||
extensionContextFilePaths,
|
||||
);
|
||||
}
|
||||
|
||||
export async function loadCliConfig(
|
||||
|
|
@ -145,10 +150,15 @@ export async function loadCliConfig(
|
|||
setServerGeminiMdFilename(getCurrentGeminiMdFilename());
|
||||
}
|
||||
|
||||
const extensionContextFilePaths = extensions
|
||||
.map((e) => e.contextFileName)
|
||||
.filter((p): p is string => !!p);
|
||||
|
||||
// Call the (now wrapper) loadHierarchicalGeminiMemory which calls the server's version
|
||||
const { memoryContent, fileCount } = await loadHierarchicalGeminiMemory(
|
||||
process.cwd(),
|
||||
debugMode,
|
||||
extensionContextFilePaths,
|
||||
);
|
||||
|
||||
const contentGeneratorConfig = await createContentGeneratorConfig(argv);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue