Skip to content

fix(cli): /memory show respects context.fileName#1428

Merged
tanzhenxin merged 2 commits intoQwenLM:mainfrom
liqiongyu:fix/727-memory-show-respects-context-file
Jan 9, 2026
Merged

fix(cli): /memory show respects context.fileName#1428
tanzhenxin merged 2 commits intoQwenLM:mainfrom
liqiongyu:fix/727-memory-show-respects-context-file

Conversation

@liqiongyu
Copy link
Copy Markdown
Contributor

Fixes #727.

Problem

/memory show --project and /memory show --global were hard-coded to read QWEN.md, ignoring the configured context filename (now context.fileName). This makes the UI look empty / inconsistent when users configure a different context file (e.g. AGENTS.md).

Solution

  • Use getCurrentGeminiMdFilename() when resolving both the project and global memory file paths.
  • Prefer config.getWorkingDir() for the project path when available (fallback to process.cwd()).
  • Add regression tests covering both flags with a non-default filename.

@liqiongyu
Copy link
Copy Markdown
Contributor Author

Follow-up: the initial run failed on Windows due to path separator differences in the new tests. I switched the expected paths to be built via node:path.join() (instead of hard-coded POSIX paths). Re-run CI is green now.

Copy link
Copy Markdown
Collaborator

@tanzhenxin tanzhenxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tanzhenxin tanzhenxin merged commit 155d1f9 into QwenLM:main Jan 9, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

contextFileName does not work in settings.json

2 participants