Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions packages/cli/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,14 +701,21 @@ export async function loadCliConfig(
}

// Automatically load output-language.md if it exists
let outputLanguageFilePath: string | undefined = path.join(
const projectStorage = new Storage(cwd);
const projectOutputLanguagePath = path.join(
projectStorage.getQwenDir(),
'output-language.md',
);
const globalOutputLanguagePath = path.join(
Storage.getGlobalQwenDir(),
'output-language.md',
);
if (fs.existsSync(outputLanguageFilePath)) {
// output-language.md found - will be added to context files
} else {
outputLanguageFilePath = undefined;

let outputLanguageFilePath: string | undefined;
if (fs.existsSync(projectOutputLanguagePath)) {
outputLanguageFilePath = projectOutputLanguagePath;
} else if (fs.existsSync(globalOutputLanguagePath)) {
outputLanguageFilePath = globalOutputLanguagePath;
}

const fileService = new FileDiscoveryService(cwd);
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/subagents/subagent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,11 @@ Important Rules:
- Use tools only when necessary to obtain facts or make changes.
- When the task is complete, return the final result as a normal model response (not a tool call) and stop.`;

const userMemory = this.runtimeContext.getUserMemory();
if (userMemory && userMemory.trim().length > 0) {
finalPrompt += `\n\n---\n\n${userMemory.trim()}`;
}

return finalPrompt;
}
}