Files
magpie/internal
yetone cefdbfd4e3 library: Library → Instructions lists Qwen Code and writes its ~/.qwen/QWEN.md (wongxy on Discord)
What: Qwen Code is a Library instructions target. magpie's block goes into
QWEN.md in Qwen's global folder ($QWEN_HOME, else ~/.qwen), after what the
user wrote there. When the user's settings.json sets context.fileName (a
name or a list, JSONC), the first non-empty name, trimmed, is used instead,
which is the file Qwen Code writes itself. Qwen joins ownFolder, so one in
a running WSL distro gets the same place under the distro's home.

Why: wongxy found that Qwen Code has a user-level instructions file but the
Library didn't list Qwen Code. Qwen Code had no Library target at all.
Source: QwenLM/qwen-code c5098a27: Storage.getGlobalQwenDir
(config/storage.ts, QWEN_HOME), getMemoryFilePaths (memory/
memoryDiscovery.ts, reads <global dir>/<each memory filename>),
memory-constants.ts (QWEN.md then AGENTS.md by default;
getCurrentMemoryFilename skips empty entries), packages/cli
config.ts (settings.context.fileName → setMemoryFilename).

Run:
- TestQwenInstructions (new): default ~/.qwen/QWEN.md, the user's text
  kept, settings.json untouched, Takes("qwen-code"); QWEN_HOME with a JSONC
  context.fileName list whose first entry is blank; a single name.
  Broken by hand three ways, each FAIL: qwen case removed (no target),
  context.fileName ignored (got qwen-home/QWEN.md), no trim/skip of empty
  names (got the folder itself).
- Real Qwen Code 0.21.9 (Homebrew) in a sandbox HOME against a fake OpenAI
  endpoint: `qwen -p hi` sent the model the magpie block from
  ~/.qwen/QWEN.md; with QWEN_HOME and context.fileName ["AGENTS.md"] it
  sent the block from AGENTS.md and not the QWEN.md beside it. The files
  were written in the format the test checks, not by a built magpie.
- go test -tags nogui ./internal/library, gofmt -l, go vet (darwin),
  GOOS=linux go vet -tags nogui, GOOS=windows go vet on ./internal/library,
  after rebasing on origin/main.
Not done: Qwen Code's MCP servers and skills are still not given by the
Library. No GUI strings changed (the page draws rows from the target data).
2026-10-13 14:14:41 +08:00
..
…
…